[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#28864: 25.3.50; next-error-no-select does select
From: |
Dmitry Gutov |
Subject: |
bug#28864: 25.3.50; next-error-no-select does select |
Date: |
Tue, 17 Oct 2017 16:37:07 +0300 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:56.0) Gecko/20100101 Thunderbird/56.0 |
Hi!
On 10/16/17 4:07 PM, Tino Calancha wrote:
X-Debbugs-CC: Dmitry Gutov <dgutov@yandex.ru>
I'm happy to commiserate, but it's hard to tell for me which part of
next-error* is broken for this use case. If not all of it, basically.
For instance, I don't understand why the patch at the end doesn't fix
the problem, and makes it worse instead (the behavior becomes less
predictable).
Why doesn't it? If we have to call next-error, and it normally changes
window configuration, save-selected-window seems like a natural fix.
;; Start emacs in the emacs root source dir
emacs -Q
M-x grep-find RET
;; Use following command:
find . -type f -name ChangeLog\* -exec grep --color -nH -e baz {} +
C-x o n ; This selects the source (shouldn't)
;; If doesn't select the source, try 'n' a few times more; eventually
;; you will be in the source.
It selects the source at the first try here, ever time.
Here's the patch that doesn't work:
diff --git a/lisp/simple.el b/lisp/simple.el
index 5ef511ce0a..16ac4b6788 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -325,8 +325,8 @@ next-error-no-select
select the source buffer."
(interactive "p")
(let ((next-error-highlight next-error-highlight-no-select))
- (next-error n))
- (pop-to-buffer next-error-last-buffer))
+ (save-selected-window
+ (next-error n))))
(defun previous-error-no-select (&optional n)
"Move point to the previous error in the `next-error' buffer and
highlight match.
- bug#28864: 25.3.50; next-error-no-select does select, Tino Calancha, 2017/10/16
- bug#28864: 25.3.50; next-error-no-select does select,
Dmitry Gutov <=
- bug#28864: 25.3.50; next-error-no-select does select, Tino Calancha, 2017/10/17
- bug#28864: 25.3.50; next-error-no-select does select, Dmitry Gutov, 2017/10/18
- bug#28864: 25.3.50; next-error-no-select does select, Tino Calancha, 2017/10/20
- bug#28864: 25.3.50; next-error-no-select does select, Dmitry Gutov, 2017/10/20
- bug#28864: 25.3.50; next-error-no-select does select, Tino Calancha, 2017/10/20
- bug#28864: 25.3.50; next-error-no-select does select, Juri Linkov, 2017/10/22
- bug#28864: 25.3.50; next-error-no-select does select, Dmitry Gutov, 2017/10/22
- bug#28864: 25.3.50; next-error-no-select does select, Juri Linkov, 2017/10/23
- bug#28864: 25.3.50; next-error-no-select does select, Dmitry Gutov, 2017/10/23
- bug#28864: 25.3.50; next-error-no-select does select, Juri Linkov, 2017/10/24