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 #122 received at 53749 <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: David Fussner <dfussner <at> googlemail.com>,
 Stefan Kangas <stefankangas <at> gmail.com>
Cc: 53749 <at> debbugs.gnu.org, Lars Ingebrigtsen <larsi <at> gnus.org>
Subject: Re: bug#53749: 29.0.50; [PATCH] Xref backend for TeX buffers
Date: Wed, 13 Sep 2023 18:23:13 +0300
Hi David!

Thanks for the new patch.

I'm skipping over the etags parser changes (others might comment, I'm 
just assuming they are good).

And "thing at point" code is, I think, at your discretion (if the result 
is useful, then that seems good). I would probably not call the function 
the same way given that we don't install this "thing" globally, just 
using it from several the major modes in a particular way. Anyway, that 
is a minor affair.

I'd like to suggest two simplifications for the xref-related stuff, if 
those work for you.

On 13/09/2023 14:10, David Fussner via Bug reports for GNU Emacs, the 
Swiss army knife of text editors wrote:

> <...> I also manipulate some
> variables buffer-locally to make things like project-find-regexp and
> isearch-forward-thing-at-point work better in such buffers.

These won't be affected either way, right? Because project-find-regexp 
defaults its input to (thing-at-point 'symbol t), and isearch... 
probably also uses "symbol" if you ask it to.

So... why not just make tex-thingatpt-include-escape a boolean? What 
commands need to be distinguished that way? I think 'find-tag' (it's 
obsolete but still used sometimes) would need to obey this var as well.

And the second thing: you're putting the symbol on major modes.

+(dolist (texmode tex-thingatpt-modes-list)
+  (put texmode 'find-tag-default-function 'tex--thing-at-point))

Why not set the variable find-tag-default-function instead? That seems 
easier and more appropriate to do inside a major mode function.

Thanks.




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.