GNU bug report logs - #43308
28.0.50; Improvements to Edit->Search menu

Previous Next

Package: emacs;

Reported by: Ihor Radchenko <yantar92 <at> gmail.com>

Date: Thu, 10 Sep 2020 14:20:02 UTC

Severity: normal

Found in version 28.0.50

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #68 received at 43308 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> linkov.net>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 43308 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>,
 Ihor Radchenko <yantar92 <at> gmail.com>, stefankangas <at> gmail.com
Subject: Re: bug#43308: 28.0.50; Improvements to Edit->Search menu
Date: Tue, 22 Sep 2020 11:04:58 +0300
>> Why no keybindings are shown for nonincremental menu items?
>> They still have keybindings, e.g. nonincremental forward search
>> can be started with 'C-s RET', nonincremental backward search
>> with 'C-r RET', nonincremental regexp search 'C-M-s RET', etc.
>
> I suppose I could add some explicitly, with :keys.
> That makes sense.  Unfortunately, none show up
> automatically.  It would be good to somehow fix that.

How about the following patch?

BTW, why "Search Tagged Files..." and "Continue Tags Search" have
no keybindings?

Another problem is that selecting "Continue Tags Search"
signals the error:

emacs -Q
Select "Edit" -> "Search" -> "Continue Tags Search"

  Lisp error: (wrong-type-argument commandp fileloop-continue)

I think "Continue Tags Search" should be disabled when it has no effect.

diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el
index 1556ee290f..901855402f 100644
--- a/lisp/menu-bar.el
+++ b/lisp/menu-bar.el
@@ -346,7 +346,9 @@ menu-bar-search-menu
                                    search-ring)
                               (and (eq menu-bar-last-search-type 'regexp)
                                    regexp-search-ring))
-                  :help "Repeat last search backwards"))
+                  :help "Repeat last search backwards"
+                  :keys "\\[isearch-backward] \\<isearch-mode-map>\\[isearch-exit]\
+ \\<minibuffer-local-isearch-map>\\[exit-minibuffer]"))
     (bindings--define-key menu [repeat-search-fwd]
       '(menu-item "Repeat Forward"
                   nonincremental-repeat-search-forward
@@ -354,26 +356,32 @@ menu-bar-search-menu
                                    search-ring)
                               (and (eq menu-bar-last-search-type 'regexp)
                                    regexp-search-ring))
-                  :help "Repeat last search forward"))
+                  :help "Repeat last search forward"
+                  :keys "\\[isearch-forward] \\<isearch-mode-map>\\[isearch-exit]\
+ \\<minibuffer-local-isearch-map>\\[exit-minibuffer]"))
     (bindings--define-key menu [separator-repeat-search]
       menu-bar-separator)
 
     (bindings--define-key menu [re-search-backward]
       '(menu-item "Regexp Backwards..."
                   nonincremental-re-search-backward
-                  :help "Search backwards for a regular expression"))
+                  :help "Search backwards for a regular expression"
+                  :keys "\\[isearch-backward-regexp] \\<isearch-mode-map>\\[isearch-exit]"))
     (bindings--define-key menu [re-search-forward]
       '(menu-item "Regexp Forward..."
                   nonincremental-re-search-forward
-                  :help "Search forward for a regular expression"))
+                  :help "Search forward for a regular expression"
+                  :keys "\\[isearch-forward-regexp] \\<isearch-mode-map>\\[isearch-exit]"))
 
     (bindings--define-key menu [search-backward]
       '(menu-item "String Backwards..."
                   nonincremental-search-backward
-                  :help "Search backwards for a string"))
+                  :help "Search backwards for a string"
+                  :keys "\\[isearch-backward] \\<isearch-mode-map>\\[isearch-exit]"))
     (bindings--define-key menu [search-forward]
       '(menu-item "String Forward..." nonincremental-search-forward
-                  :help "Search forward for a string"))
+                  :help "Search forward for a string"
+                  :keys "\\[isearch-forward] \\<isearch-mode-map>\\[isearch-exit]"))
     menu))
 




This bug report was last modified 3 years and 29 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.