From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#43308: 28.0.50; Improvements to Edit->Search menu Date: Tue, 22 Sep 2020 11:04:58 +0300 Organization: LINKOV.NET Message-ID: <87sgbadxr9.fsf@mail.linkov.net> References: <87zh5xiuk4.fsf@localhost>> <831rj9k79b.fsf@gnu.org>> > <83sgbpiqa7.fsf@gnu.org>> <87mu1xa380.fsf@mail.linkov.net>> <83imclii71.fsf@gnu.org>> <87wo1178cn.fsf@mail.linkov.net>> <83d02tifi3.fsf@gnu.org>> <87ft7cx6kh.fsf@localhost>> <83bli027is.fsf@gnu.org>> <498f6be5-f1ab-4f82-9cf1-ed5893f10ea1@default> <87wo0nbln5.fsf@mail.linkov.net> <6e21964e-a580-45ef-943f-a8ea97e58eef@default> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35318"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) Cc: 43308@debbugs.gnu.org, Ihor Radchenko , stefankangas@gmail.com To: Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Sep 22 10:28:12 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kKdem-00091W-0V for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 22 Sep 2020 10:28:12 +0200 Original-Received: from localhost ([::1]:32890 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kKdel-0002ud-0B for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 22 Sep 2020 04:28:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51330) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kKdec-0002t0-1h for bug-gnu-emacs@gnu.org; Tue, 22 Sep 2020 04:28:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:45549) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kKdeb-0006t3-O1 for bug-gnu-emacs@gnu.org; Tue, 22 Sep 2020 04:28:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kKdeb-0002SM-Jn for bug-gnu-emacs@gnu.org; Tue, 22 Sep 2020 04:28:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 22 Sep 2020 08:28:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43308 X-GNU-PR-Package: emacs Original-Received: via spool by 43308-submit@debbugs.gnu.org id=B43308.16007632659421 (code B ref 43308); Tue, 22 Sep 2020 08:28:01 +0000 Original-Received: (at 43308) by debbugs.gnu.org; 22 Sep 2020 08:27:45 +0000 Original-Received: from localhost ([127.0.0.1]:57095 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kKdeL-0002Rr-EQ for submit@debbugs.gnu.org; Tue, 22 Sep 2020 04:27:45 -0400 Original-Received: from relay2-d.mail.gandi.net ([217.70.183.194]:36195) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kKdeJ-0002Re-CL for 43308@debbugs.gnu.org; Tue, 22 Sep 2020 04:27:44 -0400 X-Originating-IP: 91.129.108.13 Original-Received: from mail.gandi.net (m91-129-108-13.cust.tele2.ee [91.129.108.13]) (Authenticated sender: juri@linkov.net) by relay2-d.mail.gandi.net (Postfix) with ESMTPSA id D086840004; Tue, 22 Sep 2020 08:27:34 +0000 (UTC) In-Reply-To: <6e21964e-a580-45ef-943f-a8ea97e58eef@default> (Drew Adams's message of "Mon, 21 Sep 2020 12:30:43 -0700 (PDT)") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:188666 Archived-At: >> 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-exit]\ + \\\\[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-exit]\ + \\\\[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-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-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-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-exit]")) menu))