GNU bug report logs -
#23400
Emacs 25.0.92.1: etags fails to handle file format generated by Exuberant Ctags 5.8 in etags emulation mode
Previous Next
Reported by: Robert Weiner <rswgnu <at> gmail.com>
Date: Fri, 29 Apr 2016 15:34:03 UTC
Severity: minor
Tags: fixed, patch
Fixed in version 28.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 23400 in the body.
You can then email your comments to 23400 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#23400
; Package
emacs
.
(Fri, 29 Apr 2016 15:34:03 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Robert Weiner <rswgnu <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Fri, 29 Apr 2016 15:34:03 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Exuberant Ctags allows one to generate what is said to be an etags
compatible TAGS file.
However, a call to list-tags fails on such a file because it includes 2
lines of file names per file rather than one.
Attached is a sample TAGS file that triggers the error with this call:
(list-tags "hmouse-key.el")
and an associated patch that fixes it.
diff -u --label
/Applications/Emacs25.app/Contents/Resources/lisp/progmodes/etags.el.gz\~
--label
/Applications/Emacs25.app/Contents/Resources/lisp/progmodes/etags.el.gz
/var/folders/8s/b7pm6fms2nsc1x2651dpvrd00000gn/T/jka-com77357KwE
/var/folders/8s/b7pm6fms2nsc1x2651dpvrd00000gn/T/jka-com77357kER
--- /Applications/Emacs25.app/Contents/Resources/lisp/progmodes/etags.el.gz~
+++ /Applications/Emacs25.app/Contents/Resources/lisp/progmodes/etags.el.gz
@@ -1398,6 +1398,8 @@
(goto-func goto-tag-location-function)
tag tag-info pt)
(forward-line 1)
+ (if (looking-at "\177")
+ (forward-line 1))
(while (not (or (eobp) (looking-at "\f")))
;; We used to use explicit tags when available, but the current
goto-func
;; can only handle implicit tags.
Diff finished. Fri Apr 29 10:23:18 2016
[Message part 2 (text/html, inline)]
[TAGS (application/octet-stream, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#23400
; Package
emacs
.
(Fri, 29 Apr 2016 16:29:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 23400 <at> debbugs.gnu.org (full text, mbox):
Robert Weiner <rswgnu <at> gmail.com> writes:
> Exuberant Ctags allows one to generate what is said to be an etags
> compatible TAGS file.
> However, a call to list-tags fails on such a file because it includes 2
> lines of file names per file rather than one.
Why is this not a bug in Exuberant Ctags?
Andreas.
--
Andreas Schwab, schwab <at> linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#23400
; Package
emacs
.
(Fri, 29 Apr 2016 20:27:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 23400 <at> debbugs.gnu.org (full text, mbox):
On 04/29/2016 07:28 PM, Andreas Schwab wrote:
>> However, a call to list-tags fails on such a file because it includes 2
>> lines of file names per file rather than one.
>
> Why is this not a bug in Exuberant Ctags?
Indeed. And Ctags 5.8 is very old.
'ctags --version' reports 'Exuberant Ctags 5.9~svn20110310' on my
machine, and I've never seen the described problem with it.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#23400
; Package
emacs
.
(Sun, 01 May 2016 15:49:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 23400 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On Fri, Apr 29, 2016 at 4:26 PM, Dmitry Gutov <dgutov <at> yandex.ru> wrote:
> On 04/29/2016 07:28 PM, Andreas Schwab wrote:
>
> However, a call to list-tags fails on such a file because it includes 2
>>> lines of file names per file rather than one.
>>>
>>
>> Why is this not a bug in Exuberant Ctags?
>>
>
> Indeed. And Ctags 5.8 is very old.
>
The main Exhuberant CTags site is: http://ctags.sourceforge.net/ which
shows a last released version of 5.8. The popular `brew' package manager
for OS X installs version 5.8 as the latest.
There are various forks of this code since it doesn't seem to be active
anymore, but these are much harder for users to find and so many may choose
V5.8 which has the issue I mentioned and patched.
There is universal-ctags (version 0, based on V5.8) which fixes the problem
I listed and has a separate web page: http://ctags.io. There is also a
V5.9 fork that is included in some Linux distributions that can be found
here: https://github.com/rgo/exuberant-ctags, but looks far from official.
Dmitry mentioned that this also fixes the issue.
So the issue is/was with a version of Exhuberant Ctags that is still the
latest official release and the most popular Google search result. Most
users who install this software themselves would most likely only find this
version.
The patch to fix the problem is simple but whether you want to apply it
given all of this is left for you far more knowledgeable maintainers to
decide.
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#23400
; Package
emacs
.
(Sun, 01 May 2016 20:24:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 23400 <at> debbugs.gnu.org (full text, mbox):
On 05/01/2016 06:47 PM, Robert Weiner wrote:
> The main Exhuberant CTags site is: http://ctags.sourceforge.net/ which
> shows a last released version of 5.8.
That doesn't mean it's the last version of the code produced by that
project: https://sourceforge.net/p/ctags/code/816/log/?path=/trunk lists
newer commits that continue up to the year 2014.
It was my assumption that Ubuntu's version either used one of the later
snapshots (like "~svn" in the version indicates), or included only
minimal changes made by Ubuntu's maintainers.
> The popular `brew' package
> manager for OS X installs version 5.8 as the latest.
Have you tried discussing that the Brew maintainers?
> There is universal-ctags (version 0, based on V5.8) which fixes the
> problem I listed and has a separate web page: http://ctags.io.
Indeed, this project seems to be THE way forward for ctags.
Any reason to believe that it isn't based on any of the subsequent
version of code posted to the original project's SVN?
> The patch to fix the problem is simple but whether you want to apply it
> given all of this is left for you far more knowledgeable maintainers to
> decide.
I'm inclined toward "no", because:
- The problem seems limited to `M-x list-tags', which is not really
essential functionality.
- ctags 5.8 clearly violates the established format.
- The only generator of TAGS files that we officially support is our
'etags' program.
- Adding a workaround for an old version of ctags in counterproductive
in other ways: the sooner the user notices problems with the ctags they
installed, the sooner they might go looking for a newer version. Which
contains other improvements and bugfixes as well.
Added tag(s) patch.
Request was from
Stefan Kangas <stefan <at> marxist.se>
to
control <at> debbugs.gnu.org
.
(Wed, 12 Aug 2020 02:36:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#23400
; Package
emacs
.
(Wed, 19 Aug 2020 13:32:02 GMT)
Full text and
rfc822 format available.
Message #22 received at 23400 <at> debbugs.gnu.org (full text, mbox):
Robert Weiner <rswgnu <at> gmail.com> writes:
> Exuberant Ctags allows one to generate what is said to be an etags
> compatible TAGS file. However, a call to list-tags fails on such a
> file because it includes 2 lines of file names per file rather than
> one.
Apparently brew still includes the 5.8 version of this ctags program, so
it fixes a real problem. Dmitry objected to the patch because
supporting this ctags project holds back progress for humanity, which is
true, but since it fixes a problem seen in the wild, I applied it
anyway.
If anybody objects, feel free to revert.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Added tag(s) fixed.
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Wed, 19 Aug 2020 13:32:02 GMT)
Full text and
rfc822 format available.
bug marked as fixed in version 28.1, send any further explanations to
23400 <at> debbugs.gnu.org and Robert Weiner <rswgnu <at> gmail.com>
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Wed, 19 Aug 2020 13:32:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Thu, 17 Sep 2020 11:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 3 years and 222 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.