GNU bug report logs - #53749
29.0.50; [PATCH] Xref backend for TeX buffers

Previous Next

Package: emacs;

Reported by: David Fussner <dfussner <at> googlemail.com>

Date: Thu, 3 Feb 2022 15:10:02 UTC

Severity: normal

Tags: patch

Found in version 29.0.50

Fixed in version 31.1

Done: Stefan Kangas <stefankangas <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: David Fussner <dfussner <at> googlemail.com>
Subject: bug#53749: closed (Re: bug#53749: 29.0.50; [PATCH] Xref backend
 for TeX buffers)
Date: Sat, 14 Sep 2024 15:10:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#53749: 29.0.50; [PATCH] Xref backend for TeX buffers

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 53749 <at> debbugs.gnu.org.

-- 
53749: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=53749
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Stefan Kangas <stefankangas <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 53749-done <at> debbugs.gnu.org, ikumi <at> ikumi.que.jp, dgutov <at> yandex.ru,
 dfussner <at> googlemail.com, arash <at> gnu.org, monnier <at> iro.umontreal.ca, tsdh <at> gnu.org
Subject: Re: bug#53749: 29.0.50; [PATCH] Xref backend for TeX buffers
Date: Sat, 14 Sep 2024 08:08:08 -0700
Version: 31.1

Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: Stefan Kangas <stefankangas <at> gmail.com>
>> Date: Sat, 14 Sep 2024 06:43:01 -0700
>> Cc: ikumi <at> ikumi.que.jp, dfussner <at> googlemail.com, tsdh <at> gnu.org, eliz <at> gnu.org,
>> 	monnier <at> iro.umontreal.ca
>>
>> Dmitry Gutov <dgutov <at> yandex.ru> writes:
>>
>> > It's good enough from my side, but I hope someone else could comment as
>> > well.
>>
>> Are we happy to install this now, or are we still waiting for more
>> comments?
>
> We've waited long enough, I think.

Thanks, so I've now installed the patch on master.  Note that I broke
out the etags/ctags changes into a separate patch (in David's name) to
make the original patch a bit less unwieldy.

    3090b2304e7 Update the etags/ctags test files
    b44c00669ac Provide a modified xref backend for TeX buffers

And with that, I'm closing this bug report.  Congratulations to David
for landing his first contribution to Emacs, and thanks again.

[Message part 3 (message/rfc822, inline)]
From: David Fussner <dfussner <at> googlemail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 29.0.50; [PATCH] Xref backend for TeX buffers
Date: Thu, 3 Feb 2022 15:09:22 +0000
[Message part 4 (text/plain, inline)]
I've recently been trying to use xref commands with a tags table in a
TeX repository, and many of the results are sub-optimal.  This is a
known issue -- within living memory there have been at least two
discussions related to it on help-gnu-emacs:

https://lists.gnu.org/archive/html/help-gnu-emacs/2018-06/msg00126.html
https://lists.gnu.org/archive/html/help-gnu-emacs/2021-07/msg00436.html

Neither discussion resulted in any code, at least not that I can find,
and the issues mentioned there remain.  For example,
xref-find-definitions on, say, '\mycommand' returns

No definitions found for: mycommand.

(The absence of the escape char in the search string makes the search
fail, as the tag name in the table will be '\mycommand'.)

Similarly, any xref command on 'my:citekey' will only search by default
for the half of the symbol under point, stopping at the colon.

There are many other behaviors that are suboptimal, as well, so in the
end I wrote a new xref backend for TeX buffers (cloning large portions
of the default etags backend), and wondered whether it might be welcome
in GNU Emacs.

A few remarks:

1. The code should work as it stands both in the AUCTeX and the in-tree
modes.  The AUCTeX hooks I've included in the patch are provisional, as
I would want to discuss with them how they would want to handle it,
should the patch be accepted in some form.

2. Along the way I found some issues with how etags parses TeX files,
issues which affect the usefulness of the xref commands, so I've made
changes in etags.c as well.  When running the test suite for etags the
only diffs occurred in the TeX-related sections of the resulting tags
file, and location information in those sections was good.

3. The patch as it stands enables all the changes by default to give
what I judge to be the best out-of-the-box experience, but wiser heads
may well have other ideas.

4. If it looks like the patch will make it into Emacs in some form, I'm
going to need to assign copyright, so I'd appreciate help with getting
that started.

Thanks,

David.
[Message part 5 (text/html, inline)]
[0001-Provide-an-xref-backend-for-TeX-buffers.patch (text/x-patch, attachment)]

This bug report was last modified 243 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.