GNU bug report logs - #32607
27.0.50; pop-to-buffer in next-error-no-select

Previous Next

Package: emacs;

Reported by: Juri Linkov <juri <at> linkov.net>

Date: Sat, 1 Sep 2018 22:34:02 UTC

Severity: normal

Found in version 27.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: martin rudalics <rudalics <at> gmx.at>
To: Juri Linkov <juri <at> linkov.net>
Cc: 32607 <at> debbugs.gnu.org
Subject: bug#32607: 27.0.50; pop-to-buffer in next-error-no-select
Date: Sun, 09 Sep 2018 10:40:12 +0200
> Sorry that I failed to explain this earlier, but it just occurred to me
> that the purpose of pop-to-buffer in next-error-no-select is to switch
> the selected window to next-error-last-buffer from the buffer's window
> with next-error.  Because when I tried your code it failed by leaving
> point in wrong window: after this command point should be back in the
> next-error-last-buffer window, but without calling pop-to-buffer
> it remains in the window with the next-error buffer.  The solution
> with using display-buffer-overriding-action correctly puts point back
> to select next-error-last-buffer window.

I have no idea what the precise semantics of "visit" in Compilation
Mode or the first line of the 'next-error' doc-string

  "Visit next `next-error' message and corresponding source code.

are.  I suspect that the initial idea of compilation mode was to keep
or make the buffer with the error messages visible and pop to a window
showing the error locus.  Later on, the capability to keep the window
with the error messages selected was added which means that the
selected window jumps from that of the messages buffer to that of the
locus buffer and then back to that of the messages buffer.

That later capability seems to be that of 'next-error-no-select' whose
doc-string should probably not say what the function does not ("Finds
and highlights the source line like \\[next-error], but does not
select the source buffer.") but rather what the function is supposed
to do instead.  I have no idea why the messges buffer should be made
or kept visible (a user might want to keep a completely unrelated
window selected and navigate the messages buffer from there with the
help of some private key binding).

If the purpose of 'next-error-no-select' is simply to not select the
window of the locus buffer, then 'next-error-no-select' should no rely
on 'next-error'.  Rather we should provide a generic function to
display the locus buffer and have 'next-error' select the window used
and 'next-error-no-select' not select that window.

martin




This bug report was last modified 6 years and 333 days ago.

Previous Next


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