Red Hat Bugzilla – Bug 9446
enabling emacs-style TAGS disables vi-style tags
Last modified: 2008-05-01 11:37:54 EDT
When compiled with the +emacs_tags option - as vim 5.4 in RHL 6.1 is - vim
is supposed to support emacs-style TAGS files in addition to vi-style tags
files. Unfortunately, this option appears to make vim support ONLY
emacs-style TAGS files and not vi-style tags files. To verify this, in a
directory with some *.c files, run "ctags -R" to generate vi-style tags,
then try "vim -t some_function". You will get a "tag not found" error. Now
run "ctags -e -R" to generate emacs-style TAGS, and "vim -t some_function"
again. The .c file where some_function is defined will be loaded.
vim should support the same tags format as standard vi. A diff to turn off
support for emacs-style TAGS, which re-enables support for vi-style tags:
[mcornick@mcornick mcornick]$ cat vim-5.4-noemacstags.diff
diff -uNr vim-5.4.orig/src/feature.h vim-5.4/src/feature.h
--- vim-5.4.orig/src/feature.h Sun Jul 18 08:22:25 1999
+++ vim-5.4/src/feature.h Mon Feb 14 17:37:04 2000
@@ -190,9 +190,9 @@
* +emacs_tags When EMACS_TAGS defined: Include support for emacs
* style TAGS file. Takes some code.
-# define EMACS_TAGS
+/* #ifdef MAX_FEAT */
+# undef EMACS_TAGS
+/* #endif */
* +tag_binary When BINARY_TAGS defined: Use a binary search instead
Bero, I can verify this. I suggest we turn off emacs tags support in VIM unless
you can patch it so it understands both. ASAP.
I've verified it too, and sent a message to the base maintainer. Currently
trying to see if he has a real fix.
Where can you verify it? I've just tried it on pciutils and it worked
without problems (I'm using vim 5.6-6)
Hrmm, interesting. I had originally reported this as a vim 5.4 bug. I decided to
try vim 5.6 to see if it worked for me. Using vim 5.6 and the ctags 3.4 shipped
with it, all is well. Using vim 5.6 and the ctags 3.2 shipped with RHL 6.1, I
see the problem previously reported. Using vim 5.4 (as shipped in RHL 6.1) and
ctags 3.4, all is well.
Conclusion: vim isn't buggy, ctags is. ctags 3.2 appears to still be included in
RHL 6.2beta, though.
I've updated ctags to 3.4.