GNU bug report logs -
#71245
2024-03-17; Populate `semantic-symref-filepattern-alist'
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 71245 in the body.
You can then email your comments to 71245 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-auctex <at> gnu.org
:
bug#71245
; Package
auctex
.
(Tue, 28 May 2024 16:52:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
David Fussner <dfussner <at> googlemail.com>
:
New bug report received and forwarded. Copy sent to
bug-auctex <at> gnu.org
.
(Tue, 28 May 2024 16:52:02 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)]
Hi AUCTeX,
The patchset for the new xref backend in tex-mode.el is still pending,
but no matter what the eventual outcome of that I think we still need to
have a complete set of AUCTeX modes included in
`semantic-symref-filepattern-alist'. Without them we just get the
cryptic message about customizing that variable when we try to use
`xref-find-references'. Also, I don't know whether it was decided not to
include the .tex extension where relevant, but this does mean that,
without further intervention, `xref-find-references' won't search .tex
files in any of the modes, even when you are actually searching from,
say, a LaTeX-mode .tex file. This seems suboptimal to me. I attach a
patch for your consideration.
Thanks,
David.
Emacs : GNU Emacs 30.0.50 (build 3, x86_64-pc-linux-gnu, GTK+ Version
3.24.31, cairo version 1.16.0)
of 2024-05-28
Package: 2024-03-17
[0001-Populate-semantic-symref-filepattern-alist-for-all-A.patch (text/x-patch, attachment)]
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#71245
; Package
auctex
.
(Wed, 29 May 2024 06:23:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 71245 <at> debbugs.gnu.org (full text, mbox):
Hi David,
>>>>> David Fussner via bug-auctex via Bug reporting list for AUCTeX <bug-auctex <at> gnu.org> writes:
> The patchset for the new xref backend in tex-mode.el is still pending,
> but no matter what the eventual outcome of that I think we still need to
> have a complete set of AUCTeX modes included in
> `semantic-symref-filepattern-alist'. Without them we just get the
> cryptic message about customizing that variable when we try to use
> `xref-find-references'. Also, I don't know whether it was decided not to
> include the .tex extension where relevant, but this does mean that,
> without further intervention, `xref-find-references' won't search .tex
> files in any of the modes, even when you are actually searching from,
> say, a LaTeX-mode .tex file. This seems suboptimal to me. I attach a
> patch for your consideration.
Thanks for your proposal. Actually, I'm not sure what to do with this
issue.
As you say, .tex extension is shared among LaTeX, plain TeX and ConTeXt.
(I think we can ignore SliTeX and AmSTeX.) When AUCTeX adds .tex to
`semantic-symref-filepattern-alist', `xref-find-references' searches all
.tex files, if I understand correctly. Therefore, if LaTeX files and
plain TeX files are in the same directory, M-? typed in the LaTeX file
buffers would look into plain TeX files as well. In theory, this can
lead to false positive result. Is this legitimate behavior for xref.el?
If it is for sure, I think AUCTeX can accept your patch.
(Or, maybe AUCTeX should have a new customize option to control to have
.tex extension in `semantic-symref-filepattern-alist' so that users
can decide to allow such false positives or not?)
Regards,
Ikumi Keita
#StandWithUkraine #StopWarInUkraine
#Gaza #StopMassiveKilling #CeasefireNOW
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#71245
; Package
auctex
.
(Wed, 29 May 2024 09:16:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 71245 <at> debbugs.gnu.org (full text, mbox):
Hi Keita,
Thanks for your reply, and I agree with you that it's sort of a choice
between two suboptimal outcomes. I'm not by any means the judge of
what xref should and shouldn't do, that would be Dmitry and the Emacs
maintainers, and it's certainly the case that `xref-find-references'
in general will only search for project files in a particular
language, ignoring all others. The way TeX has evolved means that
there could be some false positives if we search all .tex files in a
project, no matter the major mode of the buffer where we start the
search. My argument in favor of doing this is threefold:
1. How false are these false positives? If it's a project with plain
TeX and LaTeX files, there's always a certain amount of overlap
anyway, and that includes amsTeX, too. ConTeXt is another problem, so
it will depend somewhat on the nature of the project.
2. If you create a TAGS file in the project, then typically that will
cover all the .tex files, too, so the other xref commands may find
hits across the various TeX varieties, and therefore
`xref-find-references' won't be an outlier in that respect.
3. I also feel -- quite strongly as it happens -- that false negatives
are worse than false positives. If you've a .tex file open and do M-?
in it then you won't even see the hit point is on, but only hits from
whatever other file extensions happen to belong to the initial file's
major mode. Currently, in the case of plain TeX or ams TeX, that means
no hits, which is sort of weird and very frustrating when you're
looking at one on your screen. In a LaTeX .tex file you'll also not
get the hit you're actually looking at on your screen, but this might
be disguised by hits from other file extensions. I think this is much
more misleading than any false positives, but I concede that others
may not feel as strongly about this as I do.
I should probably add that, if Emacs does decide to accept the new
xref backend for tex-mode.el, then as it stands it will add the
current buffer's file extension to `semantic-symref-filepattern-alist'
automatically for the rest of the Emacs session, if it isn't already
there. This probably isn't very neighborly of me, so I guess depending
on what you decide about this request I may have to reconsider what
happens automatically in tex-mode.el. What do you think?
Best, David.
On Wed, 29 May 2024 at 07:22, Ikumi Keita <ikumi <at> ikumi.que.jp> wrote:
>
> Hi David,
>
> >>>>> David Fussner via bug-auctex via Bug reporting list for AUCTeX <bug-auctex <at> gnu.org> writes:
> > The patchset for the new xref backend in tex-mode.el is still pending,
> > but no matter what the eventual outcome of that I think we still need to
> > have a complete set of AUCTeX modes included in
> > `semantic-symref-filepattern-alist'. Without them we just get the
> > cryptic message about customizing that variable when we try to use
> > `xref-find-references'. Also, I don't know whether it was decided not to
> > include the .tex extension where relevant, but this does mean that,
> > without further intervention, `xref-find-references' won't search .tex
> > files in any of the modes, even when you are actually searching from,
> > say, a LaTeX-mode .tex file. This seems suboptimal to me. I attach a
> > patch for your consideration.
>
> Thanks for your proposal. Actually, I'm not sure what to do with this
> issue.
>
> As you say, .tex extension is shared among LaTeX, plain TeX and ConTeXt.
> (I think we can ignore SliTeX and AmSTeX.) When AUCTeX adds .tex to
> `semantic-symref-filepattern-alist', `xref-find-references' searches all
> .tex files, if I understand correctly. Therefore, if LaTeX files and
> plain TeX files are in the same directory, M-? typed in the LaTeX file
> buffers would look into plain TeX files as well. In theory, this can
> lead to false positive result. Is this legitimate behavior for xref.el?
> If it is for sure, I think AUCTeX can accept your patch.
> (Or, maybe AUCTeX should have a new customize option to control to have
> .tex extension in `semantic-symref-filepattern-alist' so that users
> can decide to allow such false positives or not?)
>
> Regards,
> Ikumi Keita
> #StandWithUkraine #StopWarInUkraine
> #Gaza #StopMassiveKilling #CeasefireNOW
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#71245
; Package
auctex
.
(Wed, 29 May 2024 15:51:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 71245 <at> debbugs.gnu.org (full text, mbox):
Hi David,
>>>>> David Fussner <dfussner <at> googlemail.com> writes:
> 1. How false are these false positives? If it's a project with plain
> TeX and LaTeX files, there's always a certain amount of overlap
> anyway, and that includes amsTeX, too. ConTeXt is another problem, so
> it will depend somewhat on the nature of the project.
> 2. If you create a TAGS file in the project, then typically that will
> cover all the .tex files, too, so the other xref commands may find
> hits across the various TeX varieties, and therefore
> `xref-find-references' won't be an outlier in that respect.
> 3. I also feel -- quite strongly as it happens -- that false negatives
> are worse than false positives. If you've a .tex file open and do M-?
> in it then you won't even see the hit point is on, but only hits from
> whatever other file extensions happen to belong to the initial file's
> major mode. Currently, in the case of plain TeX or ams TeX, that means
> no hits, which is sort of weird and very frustrating when you're
> looking at one on your screen. In a LaTeX .tex file you'll also not
> get the hit you're actually looking at on your screen, but this might
> be disguised by hits from other file extensions. I think this is much
> more misleading than any false positives, but I concede that others
> may not feel as strongly about this as I do.
Thank you for your reply. I understand your concern about false
negatives and think that I'll apply your patch to AUCTeX repository if
there are no objections. There would be only small amount of false
positives under practical situations and we can add a new customize
option mentioned in my previous message if there are many complaints
about them anyway.
Let's wait for 3-4 days to see whether there are objections or not.
Regards,
Ikumi Keita
#StandWithUkraine #StopWarInUkraine
#Gaza #StopMassiveKilling #CeasefireNOW
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#71245
; Package
auctex
.
(Wed, 29 May 2024 18:24:01 GMT)
Full text and
rfc822 format available.
Message #17 received at 71245 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Thanks very much Keita. In the meantime, if there's any related feedback on
the Emacs thread I'll get back to you.
Best, David.
On Wed, 29 May 2024, 16:50 Ikumi Keita, <ikumi <at> ikumi.que.jp> wrote:
> Hi David,
>
> >>>>> David Fussner <dfussner <at> googlemail.com> writes:
> > 1. How false are these false positives? If it's a project with plain
> > TeX and LaTeX files, there's always a certain amount of overlap
> > anyway, and that includes amsTeX, too. ConTeXt is another problem, so
> > it will depend somewhat on the nature of the project.
>
> > 2. If you create a TAGS file in the project, then typically that will
> > cover all the .tex files, too, so the other xref commands may find
> > hits across the various TeX varieties, and therefore
> > `xref-find-references' won't be an outlier in that respect.
>
> > 3. I also feel -- quite strongly as it happens -- that false negatives
> > are worse than false positives. If you've a .tex file open and do M-?
> > in it then you won't even see the hit point is on, but only hits from
> > whatever other file extensions happen to belong to the initial file's
> > major mode. Currently, in the case of plain TeX or ams TeX, that means
> > no hits, which is sort of weird and very frustrating when you're
> > looking at one on your screen. In a LaTeX .tex file you'll also not
> > get the hit you're actually looking at on your screen, but this might
> > be disguised by hits from other file extensions. I think this is much
> > more misleading than any false positives, but I concede that others
> > may not feel as strongly about this as I do.
>
> Thank you for your reply. I understand your concern about false
> negatives and think that I'll apply your patch to AUCTeX repository if
> there are no objections. There would be only small amount of false
> positives under practical situations and we can add a new customize
> option mentioned in my previous message if there are many complaints
> about them anyway.
>
> Let's wait for 3-4 days to see whether there are objections or not.
>
> Regards,
> Ikumi Keita
> #StandWithUkraine #StopWarInUkraine
> #Gaza #StopMassiveKilling #CeasefireNOW
>
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#71245
; Package
auctex
.
(Sun, 02 Jun 2024 15:10:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 71245 <at> debbugs.gnu.org (full text, mbox):
Hi David,
>>>>> David Fussner <dfussner <at> googlemail.com> writes:
> Thanks very much Keita. In the meantime, if there's any related feedback on
> the Emacs thread I'll get back to you.
I've installed your proposal and pushed to the git repo. I'll close this
bug. Thank you.
Regards,
Ikumi Keita
#StandWithUkraine #StopWarInUkraine
#Gaza #StopMassiveKilling #CeasefireNOW
bug closed, send any further explanations to
71245 <at> debbugs.gnu.org and David Fussner <dfussner <at> googlemail.com>
Request was from
Ikumi Keita <ikumi <at> ikumi.que.jp>
to
control <at> debbugs.gnu.org
.
(Sun, 02 Jun 2024 15:20:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#71245
; Package
auctex
.
(Sun, 02 Jun 2024 15:47:02 GMT)
Full text and
rfc822 format available.
Message #25 received at 71245 <at> debbugs.gnu.org (full text, mbox):
Hi Keita,
Ikumi Keita <ikumi <at> ikumi.que.jp> writes:
> Thank you for your reply. I understand your concern about false
> negatives and think that I'll apply your patch to AUCTeX repository if
> there are no objections. There would be only small amount of false
> positives under practical situations and we can add a new customize
> option mentioned in my previous message if there are many complaints
> about them anyway.
I wouldn't be concerned a lot about a case where a user has all sort of
format files as .tex files in a directory, so I suggest to install the
patch.
Best, Arash
Information forwarded
to
bug-auctex <at> gnu.org
:
bug#71245
; Package
auctex
.
(Sun, 02 Jun 2024 16:01:01 GMT)
Full text and
rfc822 format available.
Message #28 received at 71245 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Many thanks to you both.
Best, David.
On Sun, 2 Jun 2024, 16:46 Arash Esbati, <arash <at> gnu.org> wrote:
> Hi Keita,
>
> Ikumi Keita <ikumi <at> ikumi.que.jp> writes:
>
> > Thank you for your reply. I understand your concern about false
> > negatives and think that I'll apply your patch to AUCTeX repository if
> > there are no objections. There would be only small amount of false
> > positives under practical situations and we can add a new customize
> > option mentioned in my previous message if there are many complaints
> > about them anyway.
>
> I wouldn't be concerned a lot about a case where a user has all sort of
> format files as .tex files in a directory, so I suggest to install the
> patch.
>
> Best, Arash
>
[Message part 2 (text/html, inline)]
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Mon, 01 Jul 2024 11:24:08 GMT)
Full text and
rfc822 format available.
This bug report was last modified 1 year and 47 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.