Subject: bug#39122: closed (Re: bug#39121: bug#39122: 27.0.60; occur: Add bindings for next-error-no-select)

From: [email-masked] (GNU bug Tracking System)
Date: Sun, 31 May 2020 10:44:02 +0000

Your bug report

#39121: 27.0.60; occur: Add bindings for next-error-no-select

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
39121: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=39121
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#39121: bug#39122: 27.0.60; occur: Add bindings for next-error-no-select
From: Tino Calancha <[email-masked]>
To: [email-masked]
Date: Sun, 31 May 2020 12:43:04 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Juri Linkov <[email-masked]> writes:

>> I have refined the patch so that we have visual feedback during the
>> navigation (i.e. highligh) as `grep' does.
>
> Using highlighting like in grep is a nice addition that makes
> occur consistent with grep, thanks for this long-awaited feature.

Pushed into master branch as commit 'occur: Add bindings for next-error-no-select'
(abe7c22da96694ced1bc80ec7eb9eb8a662a568b)

Subject: 27.0.60; occur: Add bindings for next-error-no-select
From: Tino Calancha <[email-masked]>
To: [email-masked]
Date: Mon, 13 Jan 2020 21:51:16 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

Severity: wishlist
X-Debbugs-Cc: Juri Linkov <[email-masked]>

I wish having `next-error-no-select', `previous-error-no-select' bound to `n'
and `p' in the occur mode, as we have in *grep* buffer.

AFAICS, we have all the infrastructure and it's just a matter of define
the bindings at `occur-mode-map'.

--8<-----------------------------cut here---------------start------------->8---
commit 72617bd49b151772d3c709bfa489d0a8f14bf408
Author: Tino Calancha <[email-masked]>
Date:   Mon Jan 13 21:37:39 2020 +0100

    occur: Add bindings for next-error-no-select
    
    Add bindings to navigate the matches without select their buffers.
    * lisp/replace.el (occur-mode-map): Bind n to next-error-no-select
    and p to previous-error-no-select.
    
    * etc/NEWS (Changes in Specialized Modes and Packages in Emacs 27.1):
    Annonce this change.

diff --git a/etc/NEWS b/etc/NEWS
index 031ddf5800..572dfbbcf0 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -688,6 +688,8 @@ same as the 'C-x C-+' and 'C-x C--' commands.
 
 * Changes in Specialized Modes and Packages in Emacs 27.1
 
+** New bindings in occur-mode, 'next-error-no-select' bound to 'n' and
+'previous-error-no-select' bound to 'p'.
 ---
 ** New HTML mode skeleton 'html-id-anchor'.
 This new command (which inserts an <a id="foo">_</a> skeleton) is
diff --git a/lisp/replace.el b/lisp/replace.el
index a0b050637e..3c1918a257 100644
--- a/lisp/replace.el
+++ b/lisp/replace.el
@@ -1106,6 +1106,8 @@ occur-mode-map
     (define-key map "\C-m" 'occur-mode-goto-occurrence)
     (define-key map "o" 'occur-mode-goto-occurrence-other-window)
     (define-key map "\C-o" 'occur-mode-display-occurrence)
+    (define-key map "n" 'next-error-no-select)
+    (define-key map "p" 'previous-error-no-select)
     (define-key map "\M-n" 'occur-next)
     (define-key map "\M-p" 'occur-prev)
     (define-key map "r" 'occur-rename-buffer)

--8<-----------------------------cut here---------------end--------------->8---

In GNU Emacs 27.0.60 (build 48, x86_64-pc-linux-gnu, GTK+ Version 3.24.5)
 of 2020-01-13 built on calancha-pc.dy.bbexcite.jp
Repository revision: d645628e3cf6ebe5eaea3b40100bd77b9c823f8b
Repository branch: emacs-27
Windowing system distributor 'The X.Org Foundation', version 11.0.12004000
System Description: Debian GNU/Linux 10 (buster)