File: otags.html

package info (click to toggle)
otags 4.05.1-1
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid
  • size: 424 kB
  • ctags: 356
  • sloc: ml: 1,267; sh: 212; makefile: 194
file content (644 lines) | stat: -rw-r--r-- 8,360 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><HEAD><TITLE>Man page of OTAGS</TITLE>
</HEAD><BODY>
<H1>OTAGS</H1>
Section: User Manuals (1)<BR>Updated: August 2010<BR><A HREF="#index">Index</A>
<HR>

<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>

otags - generate tags files for emacs and vi/vim from OCaml sources
<A NAME="lbAC">&nbsp;</A>
<H2>SYNOPSIS</H2>

<B>otags</B>

[<I>STATIC-OPTION</I>] ... [<I>FILE</I>] ... [<I>DYNAMIC-OPTION</I>] ... [<I>FILE</I>] ...
<A NAME="lbAD">&nbsp;</A>
<H2>DESCRIPTION</H2>


<B>otags</B>

generates
<I>TAGS</I>

files for 
<B>emacs</B>

and
<I>tags</I>

files for
<B>vi</B>/<B>vim</B>

to give these editors the ability to directly jump to function
and value definitions (use 
<B>M-.</B>

in Emacs and
<B>^]</B>

in vi[m] with the cursor on the symbol).

<P>

<B>otags</B>

uses the standard
<B>OCaml</B>

parser from the
<I>compiler-libs</I>

library. This is more precise than regular expression based
tagging. On the downside, 
<B>otags</B>

can only tag syntactically correct files. Furthermore,
<B>otags</B>

is 
<B>OCaml</B>

version specific: Sources to be compiled with 
<B>OCaml </B>

version 
<I>X.Y</I>

can, in general, only be tagged with 
<B>otags</B>

version
<I>X.Y</I>.

This version of
<B>otags</B>

does not support
<I>-pp</I>

or
<I>-ppx</I>

preprocessors and can therefore not tag files using syntax
extensions or containing top level directives. For tagging all
files in a directory tree, see option
<B>-r</B>

below.

<P>

<B>otags</B>

tags all toplevel items in structures and signatures, including
infix operators and nested modules and signatures. It also tags
instance variables and methods in classes.
Filenames 
<B>FILE</B>

on the command line are parsed as interfaces if they have a 
<B>.mli</B>

suffix and as implementations if they have a
<B>.ml</B>

suffix. (See also the dynamic options 
<B>-intf</B>

and
<B>-impl</B>.)




































<P>

Tag files can contain absolute and/or relative file names. 
<B>Otags</B>

uses the file names from the command line for the tags file.
Specifying relative file names on the command line will therefore
give you a tag file with relative file names. Obviously, a tag
file with relative file names will only work if it is located in
the directory where
<B>otags</B>

was started. 
<B>Otags </B>

supports writing a tags file with relative file names in a parent
directory via option
<I>-add-path</I>.






<A NAME="lbAE">&nbsp;</A>
<H2>STATIC OPTIONS</H2>

Static options take effect on the whole program run, regardless
of their position in the command line.

<DL COMPACT>
<DT>-r<DD>
Descend into directories. With this option, if one of the 
<I>FILE</I>

arguments is a directory 
<B>otags</B>

will recursively tag all files in this whole directory tree.

<DT>-o file<DD>
Write tags to
<I>file</I>.

The default is
<I>TAGS</I>

(for
<B>emacs</B>)

and 
<I>tags</I>

for 
<B>vi</B>

(if the 
<B>-vi</B>

option is given) in the current directory. If
<I>file</I>

is a dash (
<I>-</I>

) the tags are written to standard output.

<DT>-a<DD>
Append to an existing TAGS file (does only work for emacs TAGS files).

<DT>-vi<DD>
Generate tags for 
<B>vi</B>

and change the default output file into
<I>tags</I>.


<DT>-add-path path<DD>
Add
<I>path</I>

at the front of every relative file name in the tags file.
Useful when you want to put the tags file in a parent directory.













<DT>-version<DD>
Print version and exit.

<DT>-v<DD>
Verbose. Print file names as they are parsed and the command
lines for externally started 
<B>camlp4</B>

parsing processes (if any). If
<B>-v</B>

is the first command line argument, backtraces for exceptions are
enabled and printed if an exception escapes and terminates 
<B>otags</B>

(which is considered a bug, about which I would appreciate a
bug report).

<DT>-q<DD>
Be quiet.

<DT>-help<DD>
Print the option list.

<DT>--help<DD>
Alias for
<B>-help</B>






</DL>
<A NAME="lbAF">&nbsp;</A>
<H2>DYNAMIC OPTIONS</H2>

Dynamic options do only affect arguments that follow them on the
command line. 

<DL COMPACT>
<DT>-intf FILE<DD>
Parse and tag 
<B>FILE</B>

as an interface.

<DT>-impl FILE<DD>
Parse and tag
<B>FILE</B>

as implementation.













































</DL>
<A NAME="lbAG">&nbsp;</A>
<H2>EXAMPLES</H2>


<B>Tag all</B>

<I>.ml</I>

and
<I>.mli</I>

files in the current directory tree:
<P>

<DL COMPACT><DT><DD>
<B>otags </B>

<B>-r </B>.

</DL>

<P>

Files with syntax errors will be ignored. The error messages can
be disabled with option
<I>-q</I>.

<P>









































<A NAME="lbAH">&nbsp;</A>
<H2>DIAGNOSTICS</H2>


Parse errors are reported with normal
<B>OCaml</B>

error messages. No tags are generated for files that produce
errors. Tagging continues with the next file, in this case.
Warnings are always completely disabled.
<P>


The errors &quot;Original source not available&quot; and &quot;The parser
delivered an invalid location&quot; 
might be reported if the file contains a line directive that refers to
a position and/or a file that cannot be resolved.
<P>


For files containing a toplevel directive,
<B>Otags</B>

simply reports a syntax error (as
<B>ocamlc</B>

does). 
<P>


Escaping exceptions and assertions that terminate 
<B>otags</B>

are considered to be bugs. If they occur, please use option
<B>-v</B>

as 
<B>first</B>

command line switch to obtain an exception backtrace and submit this
with all relevant information as bug report.





<A NAME="lbAI">&nbsp;</A>
<H2>EXIT STATUS</H2>

<DL COMPACT>
<DT>0<DD>
everything went OK
<DT>1<DD>
a parse error or some other error occurred and 
<B>otags</B>

skipped the affected file
<DT>2<DD>
a fatal error caused 
<B>otags </B>

to abort
<DT>3<DD>
some bug caused a crash, from which 
<B>otags</B>

could only marginally recover










</DL>
<A NAME="lbAJ">&nbsp;</A>
<H2>MISSING FEATURES</H2>

Appending to vi tags files requires to reread the existing tags
file, because vi tags files are sorted.
<P>


<I>-pp</I>

and
<I>-ppx</I>

preprocessors are currently not supported.





<A NAME="lbAK">&nbsp;</A>
<H2>HISTORY</H2>


The first
<B>camlp4</B>

based
<B>OCaml</B>

tagger has been written by Cuihtlauac Alvarado and Jean-Francois
Monin. Around 2005 I took over and released a few versions for
<B>OCaml</B>

3.09. All
<B>otags</B>

versions released up to 3.09.3.3 were written for the original
<B>camlp4</B>,

which is now available as
<B>camlp5</B>.

<P>


For 3.11 I rewrote
<B>otags</B>

from scratch for the new
<B>camlp4</B>

and released
several versions under the name
<B>otags reloaded</B>.

The modular structure of
<B>camlp4</B>

made it possible to switch the parsing engine at runtime between
files and to parse all syntax supported by
<B>camlp4</B>

at full native speed without external
<B>camlp4</B>

processes. However, the increasing incompatibility between
<B>camlp4</B>

and
<B>OCaml</B>

and
<B>camlp4</B>'s

sloppiness on parsing locations created more and more
difficulties. For instance,

4.02 failed on the
<B>OCaml</B>

standard library because
<B>camlp4</B>

was unable to digest the attribute annotations in there.
<P>


Starting from 4.03,
<B>otags</B>

is based on the standard
<B>OCaml</B>

parser from the
<I>compiler-libs</I>

library and has been renamed to
<B>otags III</B>.






<A NAME="lbAL">&nbsp;</A>
<H2>AUTHOR</H2>

Hendrik Tews &lt;otags at askra.de&gt;





<A NAME="lbAM">&nbsp;</A>
<H2>SEE ALSO</H2>

<B><A HREF="http://www.linuxmanpages.com/man1/etags.1.php">etags</A></B>(1),

<B><A HREF="http://www.linuxmanpages.com/man1/ctags.1.php">ctags</A></B>(1)









<P>

<HR>
<A NAME="index">&nbsp;</A><H2>Index</H2>
<DL>
<DT><A HREF="#lbAB">NAME</A><DD>
<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
<DT><A HREF="#lbAE">STATIC OPTIONS</A><DD>
<DT><A HREF="#lbAF">DYNAMIC OPTIONS</A><DD>
<DT><A HREF="#lbAG">EXAMPLES</A><DD>
<DT><A HREF="#lbAH">DIAGNOSTICS</A><DD>
<DT><A HREF="#lbAI">EXIT STATUS</A><DD>
<DT><A HREF="#lbAJ">MISSING FEATURES</A><DD>
<DT><A HREF="#lbAK">HISTORY</A><DD>
<DT><A HREF="#lbAL">AUTHOR</A><DD>
<DT><A HREF="#lbAM">SEE ALSO</A><DD>
</DL>
<HR>
This document was created by
<A HREF="http://www.nongnu.org/man2html/">man2html</A>,
using the manual pages.<BR>
Time: 18:17:00 GMT, August 26, 2017
</BODY>
</HTML>