.\" Man page generated from reStructuredText. . .TH CTAGS-INCOMPATIBILITIES 7 "" "5.9.0" "Universal Ctags" .SH NAME ctags-incompatibilities \- Incompatibilities between Universal Ctags and Exuberant Ctags . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .SH SYNOPSIS .nf \fBctags\fP [options] [file(s)] \fBetags\fP [options] [file(s)] .fi .sp .SH DESCRIPTION .sp This page describes major incompatible changes introduced to Universal Ctags forked from Exuberant Ctags. .SS Option files loading at starting up time (preload files) .sp Universal Ctags doesn\(aqt load \fB~/.ctags\fP at starting up time. File paths for preload files are changed. See "FILES" section of ctags(1). .SS Environment variables for arranging command lines .sp Universal Ctags doesn\(aqt read \fBCTAGS\fP and/or \fBETAGS\fP environment variables. .SS Incompatibilities in command line interface .SS Ordering in a command line .\" NOTE: #1889 . .sp The command line format of Universal Ctags is "\fBctags [options] [source_file(s)]\fP" following the standard POSIX convention. .sp Exuberant Ctags accepts a option following a source file. .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C $ ctags \-o \- foo.c \-\-list\-kinds=Sh f functions .ft P .fi .UNINDENT .UNINDENT .sp Universal Ctags warns and ignores the option \fB\-\-list\-kinds=Sh\fP as follows. .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C $ ctags \-o \- foo.c \-\-list\-kinds=Sh ctags: Warning: cannot open input file "\-\-list\-kinds=Sh" : No such file or directory a foo.c /^void a () {}$/;" f typeref:typename:void b foo.c /^void b () {}$/;" f typeref:typename:void .ft P .fi .UNINDENT .UNINDENT .SS The order of application of patterns and extensions in \fB\-\-langmap\fP .sp When applying mappings for a name of given source file, Exuberant Ctags tests file name patterns \fIAFTER\fP file extensions (\fIe\-map\-order\fP). Universal Ctags does this differently; it tests file name patterns \fIBEFORE\fP file extensions (\fIu\-map\-order\fP). .sp This incompatible change is introduced to deal with the following situation: .INDENT 0.0 .INDENT 3.5 .INDENT 0.0 .IP \(bu 2 \fBbuild.xml\fP as a source file, .IP \(bu 2 The Ant parser declares it handles a file name pattern \fBbuild.xml\fP, and .IP \(bu 2 The XML parser declares it handles a file extension \fB\&.xml\fP\&. .UNINDENT .UNINDENT .UNINDENT .sp Which parser should be used for parsing \fBbuild.xml\fP? The assumption of Universal Ctags is the user may want to use the Ant parser; the file name pattern it declares is more specific than the file extension that the XML parser declares. However, e\-map\-order chooses the XML parser. .sp So Universal Ctags uses the u\-map\-order even though it introduces an incompatibility. .sp \fB\-\-list\-map\-extensions=\fP and \fB\-\-list\-map\-patterns=\fP options are helpful to verify and the file extensions and the file name patterns of given \fI\fP\&. .SS Remove \fB\-\-file\-tags\fP and \fB\-\-file\-scope\fP options .sp Even in Exuberant Ctags, \fB\-\-file\-tags\fP is not documented in its man page. Instead of specifying \fB\-\-file\-tags\fP or \fB\-\-file\-tags=yes\fP, use \fB\-\-extras=+f\fP or \fB\-\-extras=+{inputFile}\fP\&. .sp Instead of specifying \fB\-\-file\-tags=no\fP, use \fB\-\-extras=\-f\fP or \fB\-\-extras=\-{inputFile}\fP\&. .sp Universal Ctags introduces \fBF/fileScope\fP extra as the replacement for \fB\-\-file\-scope\fP option. .sp Instead of specifying \fB\-\-file\-tags\fP or \fB\-\-file\-tags=yes\fP, use \fB\-\-extras=+F\fP or \fB\-\-extras=+{fileScope}\fP\&. .sp Instead of specifying \fB\-\-file\-tags=no\fP, use \fB\-\-extras=\-F\fP or \fB\-\-extras=\-{fileScope}\fP\&. .SS Incompatibilities in language and kind definitions .SS Language name defined with \fB\-\-langdef=name\fP option .sp The characters you can use are more restricted than Exuberant Ctags. For more details, see the description of \fB\-\-langdef=name\fP in ctags\-optlib(7). .SS Obsoleting \fB\-\-\-kinds\fP option .sp Some options have \fI\fP as parameterized parts in their name like \fB\-\-foo\-=...\fP or \fB\-\-\-foo=...\fP\&. The most of all such options in Exuberant Ctags have the former form, \fB\-\-foo\-=...\fP\&. The exception is \fB\-\-\-kinds\fP\&. .sp Universal Ctags uses the former form for all \fI\fP parameterized option. Use \fB\-\-kinds\-\fP instead of \fB\-\-\-kinds\fP in Universal Ctags. \fB\-\-\-kinds\fP still works but it will be removed in the future. .sp The former form may be friendly to shell completion engines. .SS Disallowing to define a kind with \fBfile\fP as name .sp The kind name \fBfile\fP is reserved. Using it as part of kind spec in \fB\-\-regex\-\fP option is now disallowed. .SS Disallowing to define a kind with \(aq\fBF\fP\(aq as letter .sp The kind letter \(aq\fBF\fP\(aq is reserved. Using it as part of a kind spec in \fB\-\-regex\-\fP option is now disallowed. .SS Disallowing to use other than alphabetical character as kind letter .sp Exuberant Ctags accepts a character other than alphabetical character as kind letter in \fB\-\-regex\-=...\fP option. Universal Ctags accepts only an alphabetical character. .SS Acceptable characters as parts of a kind name .sp Exuberant Ctags accepts any character as a part of a kind name defined with \fB\-\-regex\-=/regex/replacement/kind\-spec/\fP\&. .sp Universal Ctags accepts only an alphabetical character as the initial letter of a kind name. Universal Ctags accepts only an alphabetical character or numerical character as the rest letters. .sp An example: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C \-\-regex\-Foo=/abstract +class +([a\-z]+)/\e1/a,abstract class/i .ft P .fi .UNINDENT .UNINDENT .sp Universal Ctags rejects this because the kind name, \fBabstract class\fP, includes a whitespace character. .sp This requirement is for making the output of Universal Ctags follow the tags file format. .SS A combination of a kind letter and a kind name .sp In Universal Ctags, the combination of a kind letter and a kind name must be unique in a language. .sp You cannot define more than one kind reusing a kind letter with different kind names. You cannot define more than one kind reusing a kind name with different kind letters. .sp An example: .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C \-\-regex\-Foo=/abstract +class +([a\-z]+)/\e1/a,abstractClass/i \-\-regex\-Foo=/attribute +([a\-z]+)/\e1/a,attribute/i .ft P .fi .UNINDENT .UNINDENT .sp Universal Ctags rejects this because the kind letter, \(aq\fBa\fP\(aq, used twice for defining a kind \fBabstractClass\fP and \fBattribute\fP\&. .SS Incompatibilities in tags file format .SS Using numerical character in the name part of tag tagfield .sp The version 2 tags file format, the default output format of Exuberant Ctags, accepts only alphabetical characters in the name part of tag tagfield. .sp Universal Ctags introduces an exception to this specification; it may use numerical characters in addition to alphabetical characters as the letters other than initial letter of the name part. .sp The kinds \fBheading1\fP, \fBheading2\fP, and \fBheading3\fP in the HTML parser are the examples. .SS Truncating the pattern for long input lines .sp To prevent generating overly large tags files, a pattern field is truncated, by default, when its size exceeds 96 bytes. A different limit can be specified with \fB\-\-pattern\-length\-limit=N\fP\&. Specifying 0 as \fIN\fP results no truncation as Exuberant Ctags does not. .SS Kind letters and names .sp A kind letter \(aq\fBF\fP\(aq and a kind name \fBfile\fP are reserved in the main part. A parser cannot have a kind conflicting with these reserved ones. Some incompatible changes are introduced to follow the above rule. .INDENT 0.0 .IP \(bu 2 Cobol\(aqs \fBfile\fP kind is renamed to \fBfileDesc\fP because the kind name \fBfile\fP is reserved. .IP \(bu 2 Ruby\(aqs \(aq\fBF\fP\(aq (singletonMethod) is changed to \(aq\fBS\fP\(aq. .IP \(bu 2 SQL\(aqs \(aq\fBF\fP\(aq (field) is changed to \(aq\fBE\fP\(aq. .UNINDENT .SH SEE ALSO .sp ctags(1), ctags\-optlib(7), and tags(5). .\" Generated by docutils manpage writer. .