bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#28864: 25.3.50; next-error-no-select does select


From: Tino Calancha
Subject: bug#28864: 25.3.50; next-error-no-select does select
Date: Fri, 20 Oct 2017 16:21:31 +0900
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Dmitry Gutov <dgutov@yandex.ru> writes:

> On 10/17/17 5:17 PM, Tino Calancha wrote:
>
>> Thank you for the help!
>> Here your patch fix the issue.  Maybe you just have tested the patch
>> more carefuly than me; I just run some `grep-find' commands and I keep
>> always inside my window.
>
> 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.

Suggestions are very welcome

--8<-----------------------------cut here---------------start------------->8---
commit 76391d208a1a89e2f84c58fb889bc1f19bdd3ce8
Author: Tino Calancha <tino.calancha@gmail.com>
Date:   Fri Oct 20 16:10:16 2017 +0900

    Dont select the source with next-error-no-select
    
    * lisp/vc/add-log.el (change-log-mode): Dont change
    next-error-last-buffer when we are visiting the source with
    next-error-no-select (Bug#28864).

diff --git a/lisp/vc/add-log.el b/lisp/vc/add-log.el
index 392147b14d..e557c49de5 100644
--- a/lisp/vc/add-log.el
+++ b/lisp/vc/add-log.el
@@ -1068,7 +1068,8 @@ change-log-mode
        'change-log-end-of-defun)
   ;; next-error function glue
   (setq next-error-function 'change-log-next-error)
-  (setq next-error-last-buffer (current-buffer)))
+  (unless (eq this-command 'next-error-no-select) ; Bug#28864
+    (setq next-error-last-buffer (current-buffer))))
 
 (defun change-log-next-buffer (&optional buffer wrap)
   "Return the next buffer in the series of ChangeLog file buffers.

--8<-----------------------------cut here---------------end--------------->8---
In GNU Emacs 27.0.50 (build 29, x86_64-pc-linux-gnu, GTK+ Version 3.22.11)
 of 2017-10-20
Repository revision: 658853aebb0ae2ee243276e04a7672fa7525ec5c





reply via email to

[Prev in Thread] Current Thread [Next in Thread]