unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Dmitry Gutov <dgutov@yandex.ru>
To: Juri Linkov <juri@linkov.net>
Cc: 20489@debbugs.gnu.org
Subject: bug#20489: 25.0.50; next-error-find-buffer chooses non-current buffer without good reason
Date: Mon, 1 Feb 2016 01:38:43 +0300	[thread overview]
Message-ID: <56AE8CF3.9030108@yandex.ru> (raw)
In-Reply-To: <87egcxpg36.fsf@mail.linkov.net>

On 02/01/2016 12:57 AM, Juri Linkov wrote:
>> In the message above, he was replying to my message, where I said: "On the
>> other hand, while *xref* is visible, `next-error' will keep working for its
>> results".
>
> Clearly, this describes a successful case as opposed to the problematic one
> where *xref* is hidden that evidently needs fixing.

Yes. This was my appeal to keep the existing integration of xref with 
next-error-function. Eli disagreed.

What can we gather from that?

>> On the other hand, if we just use the global next-error-last-buffer value,
>> we'll just as well "continue the xref-navigation even when *compilation* is
>> visible in an adjacent window".
>
> And lose the support for the case of simultaneously active navigations
> in different windows/frames.

Yup. Did you have many requests, from different users, before 
introducing this support?

>>> When the number of next-error-function windows is more than one, then
>>> there's a dilemma which one to use.
>>
>> Let's use the last one. That would definitely simplify things.
>
> Indeed, using (get-mru-window 'visible t t) makes sense.

I don't follow. The window returned by the above won't necessarily have 
next-error-function set. And, again, this ignores the Flycheck case.

>> If the "previous" navigation buffer is visible, you can also continue
>> navigation by going to it, and using one of the links there.
>>
>> If it's not visible, it would make remembering which window belongs to
>> which navigation, even more difficult.
>
> Isn't it so that the user will remember which navigation displayed
> a given window?

Sorry, _what_ is so?

> At least, with window-local values the Flycheck navigation in the given buffer
> will be confined within the selected window and won't affect other navigations
> in other windows.

With your approach, no window will affect other windows. Even if I ran 
M-x rgrep, and I see its buffer in the current frame, I'll also have to 
remember which window it ended at. And if I never clicked on a link in 
the *grep* buffer, I can't use C-x ` in any window, I'm assuming.

> So continuing a navigation in other buffers/windows won't
> continue Flychecking of an unrelated buffer.  So Flychecking should not set
> the global value of next-error-last-buffer.

Suppose I use flycheck-next-error in foo.el. And I have a *grep* buffer 
visible, and I jumped to bar.el from it. And the next error in *grep* is 
in foo.el. What happens when I, having returned to bar.el's window, call 
next-error again? Does it jump to foo.el's window? Does it display 
foo.el in the window where bar.el previously was?

Does every navigational window get a second, dedicated window for its 
locations? Often, we don't have many windows to spare.

>> Hence my proposal to equate the value nil of next-error-last-buffer with
>> "use the current buffer".
>
> What/who and how would nullify/reset next-error-last-buffer?

A new command. Or maybe a special value of the prefix argument to 
`next-error'? M-0 C-x `, maybe?

But if we have a new command, I could also allow selecting from some of 
the existing buffers which contain "nonlocal" next-error-function's.





  reply	other threads:[~2016-01-31 22:38 UTC|newest]

Thread overview: 64+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-02 23:17 bug#20489: 25.0.50; next-error-find-buffer chooses non-current buffer without good reason Dmitry Gutov
2015-05-03  5:49 ` Stefan Monnier
2015-05-03 12:56   ` Dmitry Gutov
2015-05-04 22:03     ` Ted Zlatanov
2015-05-04 22:22       ` Dmitry Gutov
2015-05-04 22:33         ` Ted Zlatanov
2015-05-05 15:05           ` Dmitry Gutov
2015-05-05 15:15             ` Ted Zlatanov
2016-01-24 21:10 ` Juri Linkov
2016-01-25  6:23   ` Dmitry Gutov
2016-01-25 21:55     ` Juri Linkov
2016-01-25 23:36       ` Dmitry Gutov
2016-01-27  0:57         ` Juri Linkov
2016-01-27  2:43           ` Dmitry Gutov
2016-01-27 22:57             ` Juri Linkov
2016-01-27 23:28               ` Dmitry Gutov
2016-01-28 23:59                 ` Juri Linkov
2016-01-29  0:35                   ` Dmitry Gutov
2016-01-29 23:44                     ` Juri Linkov
2016-01-30  0:57                       ` Dmitry Gutov
2016-01-30 23:43                         ` Juri Linkov
2016-01-31  0:39                           ` Dmitry Gutov
2016-01-31 21:57                             ` Juri Linkov
2016-01-31 22:38                               ` Dmitry Gutov [this message]
2016-02-02  0:44                                 ` Juri Linkov
2016-02-02  1:40                                   ` Dmitry Gutov
2016-02-03  0:35                                     ` Juri Linkov
2016-02-04  1:00                                       ` Dmitry Gutov
2016-02-22  0:01 ` Dmitry Gutov
2016-02-22 17:22   ` Eli Zaretskii
2016-02-22 17:30     ` Dmitry Gutov
2016-02-22 17:39       ` Eli Zaretskii
2016-02-22 18:09         ` Dmitry Gutov
2016-02-22 18:11           ` Dmitry Gutov
2016-02-22 19:07           ` Eli Zaretskii
2016-02-27 10:14   ` Eli Zaretskii
2016-02-29  3:15     ` Dmitry Gutov
2016-02-29 16:23       ` Eli Zaretskii
2016-02-29 23:30         ` Dmitry Gutov
2017-11-06 21:53 ` Juri Linkov
2018-02-15 22:16   ` Juri Linkov
2018-02-27  1:21     ` Dmitry Gutov
2018-02-27  1:54       ` Dmitry Gutov
2018-02-27 18:07         ` Dmitry Gutov
2018-02-27 21:16         ` Juri Linkov
2018-02-28  2:13           ` Dmitry Gutov
2018-02-28 21:17             ` Juri Linkov
2018-03-02  1:19               ` Dmitry Gutov
2018-03-06 22:17                 ` Juri Linkov
2018-03-07 14:11                   ` Dmitry Gutov
2018-03-07 21:11                     ` Juri Linkov
2018-03-12 22:08                       ` Dmitry Gutov
2018-02-28 21:25             ` Juri Linkov
2018-03-01 22:58               ` Juri Linkov
2018-03-02  1:26                 ` Dmitry Gutov
2018-03-06 22:25                   ` Juri Linkov
2018-03-07 14:08                     ` Dmitry Gutov
2018-03-07 21:03                       ` Juri Linkov
2018-02-28 21:32             ` Juri Linkov
2018-03-02  0:54               ` Dmitry Gutov
2018-03-01 23:04             ` Juri Linkov
2018-03-02  1:30               ` Dmitry Gutov
2018-02-28 17:33           ` Richard Stallman
2018-02-21 21:30   ` Juri Linkov

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=56AE8CF3.9030108@yandex.ru \
    --to=dgutov@yandex.ru \
    --cc=20489@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).