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


Message #287 received at 53749 <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Stefan Kangas <stefankangas <at> gmail.com>,
 David Fussner <dfussner <at> googlemail.com>, Eli Zaretskii <eliz <at> gnu.org>
Cc: 53749 <at> debbugs.gnu.org, arash <at> gnu.org, tsdh <at> gnu.org,
 Stefan Monnier <monnier <at> iro.umontreal.ca>, ikumi <at> ikumi.que.jp
Subject: Re: bug#53749: 29.0.50; [PATCH] Xref backend for TeX buffers
Date: Sun, 9 Jun 2024 21:45:40 +0300
On 09/06/2024 14:36, Stefan Kangas wrote:
>> diff --git a/doc/emacs/maintaining.texi b/doc/emacs/maintaining.texi
>> index 579098c81b1..a064103aa25 100644
>> --- a/doc/emacs/maintaining.texi
>> +++ b/doc/emacs/maintaining.texi
>> @@ -2529,6 +2529,15 @@ Identifier Search
>>   referenced.  The XREF mode commands are available in this buffer, see
>>   @ref{Xref Commands}.
>>
>> +When invoked in a buffer whose major mode uses the @code{etags} backend,
>> +@kbd{M-?} searches files and buffers whose major mode matches that of
>> +the original buffer.  It guesses that mode from file extensions, so if
>> +@kbd{M-?} seems to be skipping relevant buffers or files, try
>> +customizing either the variable @code{semantic-symref-filepattern-alist}
> Why does this speak of Semantic?  Does `xref-find-references` depend on
> it somehow?

xref-backend-references's default implementation calls 
semantic-symref-perform-search under the cover. It's just the "symref" 
package, not the parser or the rest.

David's addition also uses it, and that's fine.

>> +;; Populate `semantic-symref-filepattern-alist' for the in-tree modes;
>> +;; AUCTeX is doing the same for its modes.
>> +(with-eval-after-load 'semantic/symref/grep
>> +  (defvar semantic-symref-filepattern-alist)
>> +  (push '(latex-mode "*.[tT]e[xX]" "*.ltx" "*.sty" "*.cl[so]"
>> +                     "*.bbl" "*.drv" "*.hva")
>> +        semantic-symref-filepattern-alist)
>> +  (push '(plain-tex-mode "*.[tT]e[xX]" "*.ins")
>> +        semantic-symref-filepattern-alist)
>> +  (push '(doctex-mode "*.dtx") semantic-symref-filepattern-alist))
> Doesn't this stuff rather belong in semantic itself?

Good point.




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.