From: Tino Calancha <tino.calancha@gmail.com>
To: Dmitry Gutov <dgutov@yandex.ru>
Cc: 28864@debbugs.gnu.org, Noam Postavsky <npostavs@gmail.com>,
Juri Linkov <juri@linkov.net>
Subject: bug#28864: 25.3.50; next-error-no-select does select
Date: Sat, 21 Oct 2017 12:52:36 +0900 [thread overview]
Message-ID: <87d15h5f97.fsf@gmail.com> (raw)
In-Reply-To: <d8155788-9693-896a-373d-e159dc4de521@yandex.ru> (Dmitry Gutov's message of "Sat, 21 Oct 2017 00:49:11 +0300")
Dmitry Gutov <dgutov@yandex.ru> writes:
> On 10/20/17 10:21 AM, Tino Calancha wrote:
>
>>> It kind of improves something, but the behavior is still wonky and
>>> counter-intuitive. Here are my steps:
>> I think I understand it now:
>> * change-log-mode sets 'next-error-last-buffer' to the current buffer (the
>> ChangeLog source).
>>
>> We can restrict to not do that when we are calling 'next-error-no-select.
>> I think some people don't like to use this-command in such
>> situations; alternatively, we could use `change-log-mode-hook' but the patch
>> below is shorter and explicit.
>
> It's really a hack though, right? Maybe no major modes should set
> next-error-last-buffer by itself, no matter the current command.
That sounds better.
> I'd like to know what Juri thinks about this.
In case Juri think that change-log-mode should keep seting
next-error-last-buffer for other reasons we could just
bind next-error-last-buffer:
--8<-----------------------------cut here---------------start------------->8---
commit c7b2ecd19714055b89ce348c07bae1c88a3fdc0a
Author: Tino Calancha <tino.calancha@gmail.com>
Date: Sat Oct 21 12:49:30 2017 +0900
Dont select the source with next-error-no-select
* lisp/simple.el (next-error): Bind `next-error-last-buffer'
before call next-error-function (Bug#28864).
diff --git a/lisp/simple.el b/lisp/simple.el
index 5ef511ce0a..b321d324e7 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -281,7 +281,9 @@ next-error
(when (setq next-error-last-buffer (next-error-find-buffer))
;; we know here that next-error-function is a valid symbol we can funcall
(with-current-buffer next-error-last-buffer
- (funcall next-error-function (prefix-numeric-value arg) reset)
+ ;; next-error-function should not change `next-error-last-buffer' Bug#28864.
+ (let ((next-error-last-buffer next-error-last-buffer))
+ (funcall next-error-function (prefix-numeric-value arg) reset))
(when next-error-recenter
(recenter next-error-recenter))
(run-hooks 'next-error-hook))))
--8<-----------------------------cut here---------------end--------------->8---
next prev parent reply other threads:[~2017-10-21 3:52 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-16 13:07 bug#28864: 25.3.50; next-error-no-select does select Tino Calancha
2017-10-17 13:37 ` Dmitry Gutov
2017-10-17 14:17 ` Tino Calancha
2017-10-18 7:44 ` Dmitry Gutov
2017-10-20 7:21 ` Tino Calancha
2017-10-20 21:49 ` Dmitry Gutov
2017-10-21 3:52 ` Tino Calancha [this message]
2017-10-22 20:32 ` Juri Linkov
2017-10-22 22:29 ` Dmitry Gutov
2017-10-23 20:12 ` Juri Linkov
2017-10-23 20:23 ` Dmitry Gutov
2017-10-24 20:22 ` Juri Linkov
2017-10-24 22:23 ` Dmitry Gutov
2017-10-25 23:58 ` Dmitry Gutov
2017-10-28 21:07 ` Juri Linkov
2017-10-28 22:46 ` Dmitry Gutov
2017-10-29 21:42 ` Juri Linkov
2017-10-30 14:59 ` Dmitry Gutov
2017-10-30 18:30 ` Eli Zaretskii
2017-10-30 21:13 ` Dmitry Gutov
2017-10-30 21:15 ` Juri Linkov
2017-10-30 21:14 ` Juri Linkov
2017-10-31 0:02 ` Dmitry Gutov
2017-10-31 21:56 ` Juri Linkov
2017-10-31 23:42 ` Dmitry Gutov
2017-11-02 22:00 ` Juri Linkov
2017-11-05 13:37 ` Dmitry Gutov
2017-11-06 21:41 ` Juri Linkov
2017-10-28 20:54 ` Juri Linkov
2017-10-28 22:42 ` Dmitry Gutov
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87d15h5f97.fsf@gmail.com \
--to=tino.calancha@gmail.com \
--cc=28864@debbugs.gnu.org \
--cc=dgutov@yandex.ru \
--cc=juri@linkov.net \
--cc=npostavs@gmail.com \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.