Subject: Re: bug#20489: 25.0.50; next-error-find-buffer chooses non-current buffer without good reason

From: Dmitry Gutov <[email-masked]>
Date: Tue, 27 Feb 2018 03:21:22 +0200

Hi Juri,

I'm sorry for the late reply.

On 2/16/18 12:16 AM, Juri Linkov wrote:

> Dmitry, could you please confirm that this patch works with the current code
> in xref--next-error-function?  If yes, I propose to push it to master.

It doesn't seem to help, unfortunately, in the case of xref buffers. 
Take this example:

- emacs -Q
- Navigate to the Emacs source directory, if not already there
- M-x project-find-regexp RET Bazaar RET
- See the buffer that popped up, and the value of next-error-last-buffer 
is *xref*. But it's only set locally (the global value is nil).
- Type 'M-x next-error'. That pops up the ChangeLog.1 buffer.
- next-error-last-buffer is *xref* in the *xref* buffer, and ChangeLog.1 
in the ChangeLog.1 buffer.
- Type 'M-x next-error' again, and see the error:

change-log-goto-source: Cannot find tag or file near ‘point’

Whereas we should still have been using the navigation from *xreF*.

Further, I'm not sure I like bug#20489 being closed with this patch 
only. Even if it worked 100%, it doesn't address everything that came up 
in that discussion. Bug#28864 being closed is fine, and indeed that 
scenario has been addressed.

> PS: When I typed the closing paren ‘)’ in the last sentence in ‘message-mode’,
> it blinked on the letter ‘b’.  Do you know the reason of this weird behavior?

Sorry, never seen this, and can't reproduce. I haven't been using Emacs 
for email lately, though.