From: Nathan Moreau <nathan.moreau@m4x.org>
To: 27362@debbugs.gnu.org
Subject: bug#27362: Bug #27362:
Date: Thu, 17 Aug 2017 11:36:15 +0200 [thread overview]
Message-ID: <CADDcBWXLZM9nFO0=LXCQ5dZyTbzanPHyhhAnhpvzY_q_vKSyEw@mail.gmail.com> (raw)
In-Reply-To: <CALDneau2+Ecoq1uK=U6eaD+WNpgshMOsJ-zOphFHarO7NNcEWw@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 320 bytes --]
Here is a patch that fixes the reported problem.
A minimal reproduction test:
(ert-deftest totoro ()
(set-buffer "*scratch*")
(insert "setq")
(setq next-error-recenter '(4))
(occur "setq")
(next-error))
It seems that occur-mode-goto-occurrence should be called after
restoring the original buffer.
Nathan
[-- Attachment #2: 0001-Fix-current-buffer-in-the-call-of-occur-next-error.patch --]
[-- Type: text/x-patch, Size: 959 bytes --]
From f153a4f78ef24ebc2901c51c279bb2b55ea2473d Mon Sep 17 00:00:00 2001
From: Nathan Moreau <nathan.moreau@m4x.org>
Date: Wed, 16 Aug 2017 23:37:59 +0200
Subject: [PATCH] Fix current buffer in the call of occur-next-error.
Try to mimic the structure of compilation-next-error-function in
occur-next-error.
---
lisp/replace.el | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lisp/replace.el b/lisp/replace.el
index 09972b40db..439bb63a18 100644
--- a/lisp/replace.el
+++ b/lisp/replace.el
@@ -1273,8 +1273,8 @@ occur-next-error
"No more matches")
;; In case the *Occur* buffer is visible in a nonselected window.
(let ((win (get-buffer-window (current-buffer) t)))
- (if win (set-window-point win (point))))
- (occur-mode-goto-occurrence)))
+ (if win (set-window-point win (point)))))
+ (occur-mode-goto-occurrence))
\f
(defface match
'((((class color) (min-colors 88) (background light))
--
2.11.0
next prev parent reply other threads:[~2017-08-17 9:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-14 17:28 bug#27362: next-error-recenter doesn't work with occur Jonathan Kotta
2017-08-17 9:36 ` Nathan Moreau [this message]
2017-08-18 16:55 ` bug#27362: Bug #27362: Jonathan Kotta
2017-10-26 21:38 ` Nathan Moreau
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='CADDcBWXLZM9nFO0=LXCQ5dZyTbzanPHyhhAnhpvzY_q_vKSyEw@mail.gmail.com' \
--to=nathan.moreau@m4x.org \
--cc=27362@debbugs.gnu.org \
/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.