GNU bug report logs -
#76565
30.1; emacs xref: cannot jump back to the previous position when `xref-history-storage' is set to `xref-window-local-history'
Previous Next
Reported by: Guoyu Ou <benogy <at> gmail.com>
Date: Tue, 25 Feb 2025 19:44:01 UTC
Severity: normal
Found in version 30.1
Fixed in version 30.2
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 Sun, 2 Mar 2025 05:24:42 +0200
with message-id <65244775-8f32-4de6-ad9d-ae2ebdd7a3d9 <at> gutov.dev>
and subject line Re: bug#76565: 30.1; emacs xref: cannot jump back to the previous position when `xref-history-storage' is set to `xref-window-local-history'
has caused the debbugs.gnu.org bug report #76565,
regarding 30.1; emacs xref: cannot jump back to the previous position when `xref-history-storage' is set to `xref-window-local-history'
to be marked as done.
(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)
--
76565: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=76565
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
[Message part 3 (text/plain, inline)]
Dear maintainers,
I installed emacs 30.1 from debian sid, and found that xref cannot jump
back to the previous position when `xref-history-storage` is set to
`xref-window-local-history`. It works in emacs 29.4 with xref 1.6.3.
### settings and tests
The following is my `~/.emacs`:
```lisp
(when (>= emacs-major-version 29)
(setq xref-history-storage 'xref-window-local-history))
```
And two c++ files for reproducing this bug:
content of `func-def.cpp`:
```c++
void func() {
}
void func(int) {
}
```
and `main.cpp`:
```c++
int main() {
func();
}
```
### how to reproduce
Use the following command to generate a `TAGS` file:
```bash
/usr/bin/etags *.cpp
```
Then run
```bash
emacs -Q
```
open `main.cpp` and move the cursor to the word `func` and run
M-x xref-find-definitions
a `*xref*` buffer is opened and shows two candidates of `func`.
Then I press `n RET` in the `*xref*` buffer to choose the first
candidate in the xref buffer.
Now the cursor is in a new buffer named `func-def.cpp`. Then I press
`M-,` and a message "At start of xref history" is shown in the
minibuffer.
In emacs 29.4 I can jump back to `main.cpp` when pressing `M-,`.
--
Best Regards,
Guoyu
[Message part 4 (text/html, inline)]
[Message part 5 (message/rfc822, inline)]
Version: 30.2
On 28/02/2025 10:06, Eli Zaretskii wrote:
>> Cc:76565 <at> debbugs.gnu.org
>> Date: Fri, 28 Feb 2025 04:35:42 +0200
>> From: Dmitry Gutov<dmitry <at> gutov.dev>
>>
>> On 27/02/2025 06:36, Guoyu Ou wrote:
>>> After applying this patch, I tested my commonly used functions and they
>>> are all working well. Thanks for your patch.
>> Thanks for testing!
>>
>> Maintainers: I suppose this should go into the emacs-30 branch?
> Yes, thanks.
Thank you, pushed now:
https://git.savannah.gnu.org/cgit/emacs.git/commit/?h=emacs-30&id=625ed68aeaadce4df7bdfd8c08ddfc8ed4f9b01a
This bug report was last modified 80 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.