GNU bug report logs -
#65631
Xref updates stack in case of error
Previous Next
Reported by: Juri Linkov <juri <at> linkov.net>
Date: Wed, 30 Aug 2023 16:48:02 UTC
Severity: normal
Tags: patch
Fixed in version 30.1
Done: Dmitry Gutov <dmitry <at> gutov.dev>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Your message dated Fri, 1 Sep 2023 04:39:34 +0300
with message-id <ce9d0b44-4ee9-a436-59a0-c06557ac39fa <at> gutov.dev>
and subject line Re: bug#65631: Xref updates stack in case of error
has caused the debbugs.gnu.org bug report #65631,
regarding Xref updates stack in case of error
to be marked as done.
(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)
--
65631: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=65631
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
X-Debbugs-CC: Dmitry Gutov <dmitry <at> gutov.dev>
0. emacs -Q
1. move point to any word
2. type 'M-.' (xref-find-definitions)
3. an error is displayed correctly "No definitions found for: This"
But the problem is that an unrecognized word is added to the xref stack.
So the context menu shows "Go Back", and 'M-,' (xref-go-back) goes back
to that word.
[Message part 3 (message/rfc822, inline)]
Version: 30.1
On 31/08/2023 19:33, Juri Linkov wrote:
>>>>> 1. move point to any word
>>>>> 2. type 'M-.' (xref-find-definitions)
>>>>> 3. an error is displayed correctly "No definitions found for: This"
>>>>>
>>>>> But the problem is that an unrecognized word is added to the xref stack.
>>>>> So the context menu shows "Go Back", and 'M-,' (xref-go-back) goes back
>>>>> to that word.
>>>> FWIW, I'm not sure this is necessarily a bug. It looks like a bug in
>>>> your case, because you deliberately tricked Xref into using a word
>>>> that is definitely not a program symbol. But that is not the case in
>>>> a more reasonable situation, where point is on a symbol, but for some
>>>> reason the symbol's definition is not found, e.g., because the TAGS
>>>> table needs to be regenerated.
>>> In case of error, point doesn't move. So there is no need to go back.
>>
>> At this point, I was kind of feeling that this is a known-but-tolerated
>> behavior (that some might already be relying on, also known as "spacebar
>> heater" effect), but if it's still annoying, let's see about a fix.
>
> It's not annoying, just surprises with the requirement to type extra ‘M-,’.
>
>> How's the attached patch?
>
> Thanks. I expected a smaller change, but if this is still reliable,
> then why not. At least, it works in cases that I tested.
I was looking for a smaller change, too. Thanks for testing.
Pushed to master in 17188e07ab9, closing.
This bug report was last modified 1 year and 265 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.