Hi,
I've been unable to find any reference to the problem I'm having with
etags and included files, so I'm forced to assume, strange as it might
seem, that I am actually the first one to report this problem.
To summarize: Attempting to use 'find-tag' fails with the error message
"Bad TAGS
file" if the TAGS file being read includes other TAGS files (by using
etags -i).
A TAGS file created with the etags -i option may look like this:
^L
config.h,418
#define TIME_WITH_SYS_TIME 14,445
#define PACKAGE 56,1501
#define VERSION 59,1556
^L
src/TAGS,include
^L
tests/TAGS,include
As soon as the 2nd ^L is processed, the error will occur. The reason is
that the regexp being used to match a valid file specification after the
^L expects a number after the comma, and does not accept the 'include'.
The regexp is defined in /usr/lib/xemacs-21.4.1/lisp/etags.el.gz, line
478, as:
(defconst tags-file-pattern "^\f\n\\(.+\\),[0-9]+\n")
defining it instead as:
(defconst tags-file-pattern
"^\f\n\\(.+\\),\\(\\([0-9]+\\)\\|include\\)\n")
would handle the include pattern as well. At least, that works for me.
Funny, the line right after this says:
;; #### Should make it work with the `include' directive!
(defun add-to-tag-completion-table ()
So apparently it was known as a problem to the author of that line, but
he or she didn't want to fix it by changing 'tags-file-pattern', so
perhaps there's some underlying issue I'm not aware of. I'm not an
ELisp hacker, I just traced it in the debugger and saw that it was
crapping out apparently only because the input wasn't matching this
regexp, but what do I know.
The TAGS file that caused the problem was originally created as a result
of running 'make tags' on a Makefile built from automake/autoconf, so I
would think this would be a common problem.
I'm running XEmacs 21.4 (patch 1) "Copyleft" [Lucid] (i386-debian-linux,
Mule) of Tue May 22 2001 on eeyore
configured using `configure --with-sound=native --with_menubars=lucid
--with_scrollbars=lucid --with_dialogs=athena '--cflags=-O2 -g -Wall '
--with-x11 --extra-verbose --with-site-lisp --statedir=/var/lib
--infodir=/usr/share/info/xemacs-21.4.1 --prefix=/usr
--error-checking=none --debug=no --const-is-losing=no --dynamic
--without-postgresql --with-gpm=no
--docdir=/usr/lib/xemacs-21.4.1/i386-debian-linux/mule/ --with-mule
--with-canna=no --with-wnn=no --with-xim=xlib --with-xfs
'--package-path=~/.xemacs:~/.xemacs/packages::/usr/share/xemacs21/packages:/usr/share/xemacs21/mule-packages:/usr/share/xemacs21/site-packages'
i386-debian-linux'
I am running debian woody/testing, kernel 2.4.1 on i686. Running 'etags
-V' outputs "etags (GNU Emacs 21.4.1)".
=wl
--
willy.lee(a)page44.com Page 44 Studios
"Avenge In Blood becomes the animal code that staggers the country!!"
Show replies by date