GNU bug report logs - #20489
25.0.50; next-error-find-buffer chooses non-current buffer without good reason

Previous Next

Package: emacs;

Reported by: Dmitry Gutov <dgutov <at> yandex.ru>

Date: Sat, 2 May 2015 23:19:01 UTC

Severity: normal

Found in version 25.0.50

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Juri Linkov <juri <at> linkov.net>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: 20489 <at> debbugs.gnu.org
Subject: bug#20489: 25.0.50; next-error-find-buffer chooses non-current buffer without good reason
Date: Fri, 02 Mar 2018 01:04:10 +0200
>> So the question is: in xref--next-error-function can we use code similar
>> to what is used in compilation-next-error-function that works without problems?
>
> You probably mean compilation-goto-locus (it contains the navigation part),
> but even so, it's not easy to tell which part you mean (the function does
> more than one would expect).
>
> In short, adapting that code is kind of difficult, but hopefully I found
> and fixed the problem in xref directly
> in 11c58c4fc495ea4f7bff52ca077fd3e4382aa900.

While looking at this, I discovered more problems:

1. the same problem that you fixed for xref, also exists in occur:
   it doesn't set the right current-buffer for next-error.

2. also typing RET in *Occur* doesn't set next-error-last-buffer.
   Maybe we need to set it in occur-mode-goto-occurrence (but not in occur-next-error)

3. typing RET in *xref* should set next-error-last-buffer as well

4. Maybe these 2 lines needed to be added also to xref--xref-buffer-mode:

        (setq next-error-last-buffer buffer)
        (setq-default next-error-last-buffer buffer)

like in next-error to set both buffer-local and global values.




This bug report was last modified 7 years and 73 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.