unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: martin rudalics <rudalics@gmx.at>
To: Juri Linkov <juri@linkov.net>
Cc: 32607@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	[thread overview]
Message-ID: <5B94DC6C.6090107@gmx.at> (raw)
In-Reply-To: <87sh2j36jw.fsf@mail.linkov.net>

 > 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





  reply	other threads:[~2018-09-09  8:40 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-01 22:32 bug#32607: 27.0.50; pop-to-buffer in next-error-no-select Juri Linkov
2018-09-02  7:14 ` martin rudalics
2018-09-02 22:43   ` Juri Linkov
2018-09-03  7:31     ` martin rudalics
2018-09-03 22:31       ` Juri Linkov
2018-09-04  7:51         ` martin rudalics
2018-09-04 21:28           ` Juri Linkov
2018-09-05  7:47             ` martin rudalics
2018-09-05 22:06               ` Juri Linkov
2018-09-06  7:04                 ` martin rudalics
2018-09-06 21:56                   ` Juri Linkov
2018-09-07  6:28                     ` Eli Zaretskii
2018-09-08 23:28                       ` Juri Linkov
2018-09-09  5:44                         ` Eli Zaretskii
2018-09-07  7:28                     ` martin rudalics
2018-09-08 23:46                       ` Juri Linkov
2018-09-09  8:40                         ` martin rudalics [this message]
2018-09-09 16:01                           ` Juri Linkov
2018-09-10  8:29                             ` martin rudalics
2018-09-11 23:47                               ` Juri Linkov
2018-09-12  6:33                                 ` martin rudalics
2018-09-12 21:47                                   ` Juri Linkov
2018-09-12 22:03                           ` Stefan Monnier
2018-09-12 22:21                             ` Juri Linkov
2018-09-12 22:06                           ` Stefan Monnier
2018-09-13  7:46                             ` martin rudalics
2018-09-13 11:26                               ` Stefan Monnier
2018-09-13 23:04                                 ` Juri Linkov
2018-09-14  1:34                                   ` Stefan Monnier
2018-09-15 23:31                                     ` Juri Linkov
2018-09-16  9:09                                       ` martin rudalics
2018-09-16 21:19                                         ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5B94DC6C.6090107@gmx.at \
    --to=rudalics@gmx.at \
    --cc=32607@debbugs.gnu.org \
    --cc=juri@linkov.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).