GNU bug report logs - #37594
Menu rearrangement

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Juri Linkov <juri@HIDDEN>; Keywords: patch; dated Wed, 2 Oct 2019 22:32:03 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 37594 <at> debbugs.gnu.org:


Received: (at 37594) by debbugs.gnu.org; 3 Oct 2019 17:09:48 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Oct 03 13:09:48 2019
Received: from localhost ([127.0.0.1]:41022 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iG4br-0005eK-Ot
	for submit <at> debbugs.gnu.org; Thu, 03 Oct 2019 13:09:48 -0400
Received: from eggs.gnu.org ([209.51.188.92]:50967)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1iG4bp-0005e7-W5
 for 37594 <at> debbugs.gnu.org; Thu, 03 Oct 2019 13:09:46 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:49035)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1iG4bk-0006Ke-I8; Thu, 03 Oct 2019 13:09:40 -0400
Received: from [176.228.60.248] (port=2459 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1iG4bj-0002Ak-Oh; Thu, 03 Oct 2019 13:09:40 -0400
Date: Thu, 03 Oct 2019 20:09:23 +0300
Message-Id: <83k19l7o3g.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
In-reply-to: <87a7aidbqe.fsf@HIDDEN> (message from Juri Linkov on
 Thu, 03 Oct 2019 00:27:37 +0300)
Subject: Re: bug#37594: Menu rearrangement
References: <87a7aidbqe.fsf@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 37594
Cc: 37594 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Juri Linkov <juri@HIDDEN>
> Date: Thu, 03 Oct 2019 00:27:37 +0300
> 
> The most suitable place for the new tab commands is below
> window and frame commands in the File menu.
> 
> Since this makes the menu too long, this patch moves the
> print related commands into a new submenu.

Please move the "Print" part after the New Frame, New Window, etc.

> Also it adds new menu items for two new commands,
> and renames 'grep' to 'rgrep' that is more user-friendly.

Why rename?  People are accustomed to see "Grep".  If you think Rgrep
is so useful as to warrant a menu item, let's add it.

These changes should be in NEWS.

Thanks.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#37594; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 2 Oct 2019 22:32:02 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Oct 02 18:32:02 2019
Received: from localhost ([127.0.0.1]:38487 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1iFnA8-0004SP-4s
	for submit <at> debbugs.gnu.org; Wed, 02 Oct 2019 18:32:00 -0400
Received: from lists.gnu.org ([209.51.188.17]:46812)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1iFnA6-0004Qt-92
 for submit <at> debbugs.gnu.org; Wed, 02 Oct 2019 18:31:58 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:45030)
 by lists.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <juri@HIDDEN>) id 1iFnA3-0000Si-44
 for bug-gnu-emacs@HIDDEN; Wed, 02 Oct 2019 18:31:57 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,RCVD_IN_DNSWL_NONE
 autolearn=disabled version=3.3.2
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <juri@HIDDEN>) id 1iFnA0-0002og-Hv
 for bug-gnu-emacs@HIDDEN; Wed, 02 Oct 2019 18:31:54 -0400
Received: from butterfly.birch.relay.mailchannels.net ([23.83.209.27]:12250)
 by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <juri@HIDDEN>) id 1iFnA0-0002nc-2C
 for bug-gnu-emacs@HIDDEN; Wed, 02 Oct 2019 18:31:52 -0400
X-Sender-Id: dreamhost|x-authsender|jurta@HIDDEN
Received: from relay.mailchannels.net (localhost [127.0.0.1])
 by relay.mailchannels.net (Postfix) with ESMTP id 146DC6A18E9
 for <bug-gnu-emacs@HIDDEN>; Wed,  2 Oct 2019 22:31:50 +0000 (UTC)
Received: from pdx1-sub0-mail-a65.g.dreamhost.com
 (100-96-91-70.trex.outbound.svc.cluster.local [100.96.91.70])
 (Authenticated sender: dreamhost)
 by relay.mailchannels.net (Postfix) with ESMTPA id 793016A1C00
 for <bug-gnu-emacs@HIDDEN>; Wed,  2 Oct 2019 22:31:49 +0000 (UTC)
X-Sender-Id: dreamhost|x-authsender|jurta@HIDDEN
Received: from pdx1-sub0-mail-a65.g.dreamhost.com ([TEMPUNAVAIL].
 [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384)
 by 0.0.0.0:2500 (trex/5.17.5); Wed, 02 Oct 2019 22:31:50 +0000
X-MC-Relay: Neutral
X-MailChannels-SenderId: dreamhost|x-authsender|jurta@HIDDEN
X-MailChannels-Auth-Id: dreamhost
X-Thoughtful-Bitter: 0b00dd496dc138ac_1570055509954_2434469256
X-MC-Loop-Signature: 1570055509954:653605353
X-MC-Ingress-Time: 1570055509954
Received: from pdx1-sub0-mail-a65.g.dreamhost.com (localhost [127.0.0.1])
 by pdx1-sub0-mail-a65.g.dreamhost.com (Postfix) with ESMTP id 32BA985869
 for <bug-gnu-emacs@HIDDEN>; Wed,  2 Oct 2019 15:31:44 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=linkov.net; h=from:to
 :subject:date:message-id:mime-version:content-type; s=
 linkov.net; bh=kznJ+TyXb+L+MSWMUODmfeX28GE=; b=TTb6hzZ6z84wMwdPU
 e9P0VtxgaQ4nM7yqjYdMwPGwV/H7y/GwW4jZZPW7iUF5KjZm47kcs0ULzQq6XaZq
 OdDSKyK5oLqFyliyuejZT07a85VSntBnsaGkBXjVomGOh+AGUJ4eVNL7J/HvBYHe
 S6HJJAEoBcDyEz0fLUdkM5IecI=
Received: from mail.jurta.org (m91-129-99-99.cust.tele2.ee [91.129.99.99])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (No client certificate requested)
 (Authenticated sender: jurta@HIDDEN)
 by pdx1-sub0-mail-a65.g.dreamhost.com (Postfix) with ESMTPSA id 2AFBA85851
 for <bug-gnu-emacs@HIDDEN>; Wed,  2 Oct 2019 15:31:42 -0700 (PDT)
X-DH-BACKEND: pdx1-sub0-mail-a65
From: Juri Linkov <juri@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: Menu rearrangement
Organization: LINKOV.NET
Date: Thu, 03 Oct 2019 00:27:37 +0300
Message-ID: <87a7aidbqe.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-VR-OUT-STATUS: OK
X-VR-OUT-SCORE: 0
X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedufedrgeejgddtlecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdfftffgtefojffquffvnecuuegrihhlohhuthemuceftddtnecunecujfgurhephffvufhofffkfgggtgesmhdtreertdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucffohhmrghinhepshhtrggtkhhovhgvrhhflhhofidrtghomhenucfkphepledurdduvdelrdelledrleelnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledrleelrdelledprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopegsuhhgqdhgnhhuqdgvmhgrtghssehgnhhurdhorhhgnecuvehluhhsthgvrhfuihiivgeptd
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
 [fuzzy]
X-Received-From: 23.83.209.27
X-Spam-Score: -1.4 (-)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.4 (--)

--=-=-=
Content-Type: text/plain

Tags: patch

The most suitable place for the new tab commands is below
window and frame commands in the File menu.

Since this makes the menu too long, this patch moves the
print related commands into a new submenu.

Also it adds new menu items for two new commands,
and renames 'grep' to 'rgrep' that is more user-friendly.

Finally, it advertises easier to understand bindings C-x <right>
and C-x <left> instead of XF86Forward and XF86Back that are
too confusing for users as these questions indicate
https://stackoverflow.com/questions/21239706/which-keys-are-xf86back-and-xf86forward-in-emacs


--=-=-=
Content-Type: text/x-diff
Content-Disposition: inline; filename=menu-rearrangement.patch

diff --git a/lisp/bindings.el b/lisp/bindings.el
index 0be1458798..4c5450f050 100644
--- a/lisp/bindings.el
+++ b/lisp/bindings.el
@@ -933,9 +933,11 @@ esc-map
 (define-key ctl-x-map [right] 'next-buffer)
 (define-key ctl-x-map [C-right] 'next-buffer)
 (define-key global-map [XF86Forward] 'next-buffer)
+(put 'next-buffer :advertised-binding [?\C-x right])
 (define-key ctl-x-map [left] 'previous-buffer)
 (define-key ctl-x-map [C-left] 'previous-buffer)
 (define-key global-map [XF86Back] 'previous-buffer)
+(put 'previous-buffer :advertised-binding [?\C-x left])
 
 (let ((map minibuffer-local-map))
   (define-key map "\en"   'next-history-element)
diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el
index b7967b858a..f5dbadce10 100644
--- a/lisp/menu-bar.el
+++ b/lisp/menu-bar.el
@@ -49,6 +49,36 @@ cua-enable-cua-keys
 ;; It gets modified in place when menu-bar-update-buffers is called.
 (defvar global-buffers-menu-map (make-sparse-keymap "Buffers"))
 
+(defvar menu-bar-print-menu
+  (let ((menu (make-sparse-keymap "Print")))
+    (bindings--define-key menu [ps-print-region]
+      '(menu-item "PostScript Print Region (B+W)" ps-print-region
+                  :enable mark-active
+                  :help "Pretty-print marked region in black and white to PostScript printer"))
+    (bindings--define-key menu [ps-print-buffer]
+      '(menu-item "PostScript Print Buffer (B+W)" ps-print-buffer
+                  :enable (menu-bar-menu-frame-live-and-visible-p)
+                  :help "Pretty-print current buffer in black and white to PostScript printer"))
+    (bindings--define-key menu [ps-print-region-faces]
+      '(menu-item "PostScript Print Region"
+                  ps-print-region-with-faces
+                  :enable mark-active
+                  :help "Pretty-print marked region to PostScript printer"))
+    (bindings--define-key menu [ps-print-buffer-faces]
+      '(menu-item "PostScript Print Buffer"
+                  ps-print-buffer-with-faces
+                  :enable (menu-bar-menu-frame-live-and-visible-p)
+                  :help "Pretty-print current buffer to PostScript printer"))
+    (bindings--define-key menu [print-region]
+      '(menu-item "Print Region" print-region
+                  :enable mark-active
+                  :help "Print region between mark and current position"))
+    (bindings--define-key menu [print-buffer]
+      '(menu-item "Print Buffer" print-buffer
+                  :enable (menu-bar-menu-frame-live-and-visible-p)
+                  :help "Print current buffer with page headings"))
+    menu))
+
 ;; Only declared obsolete (and only made a proper alias) in 23.3.
 (define-obsolete-variable-alias
   'menu-bar-files-menu 'menu-bar-file-menu "22.1")
@@ -63,6 +93,19 @@ menu-bar-file-menu
     (bindings--define-key menu [separator-exit]
       menu-bar-separator)
 
+    (unless (featurep 'ns)
+      (bindings--define-key menu [close-tab]
+        '(menu-item "Close Tab" tab-close
+                    :visible (fboundp 'tab-close)
+                    :help "Close currently selected tab"))
+      (bindings--define-key menu [make-tab]
+        '(menu-item "New Tab" tab-new
+                    :visible (fboundp 'tab-new)
+                    :help "Open a new tab"))
+
+      (bindings--define-key menu [separator-tab]
+        menu-bar-separator))
+
     ;; Don't use delete-frame as event name because that is a special
     ;; event.
     (bindings--define-key menu [delete-this-frame]
@@ -70,6 +113,10 @@ menu-bar-file-menu
                   :visible (fboundp 'delete-frame)
                   :enable (delete-frame-enabled-p)
                   :help "Delete currently selected frame"))
+    (bindings--define-key menu [make-frame-on-monitor]
+      '(menu-item "New Frame on Monitor..." make-frame-on-monitor
+                  :visible (fboundp 'make-frame-on-monitor)
+                  :help "Open a new frame on another monitor"))
     (bindings--define-key menu [make-frame-on-display]
       '(menu-item "New Frame on Display..." make-frame-on-display
                   :visible (fboundp 'make-frame-on-display)
@@ -102,32 +149,8 @@ menu-bar-file-menu
     (bindings--define-key menu [separator-window]
       menu-bar-separator)
 
-    (bindings--define-key menu [ps-print-region]
-      '(menu-item "PostScript Print Region (B+W)" ps-print-region
-                  :enable mark-active
-                  :help "Pretty-print marked region in black and white to PostScript printer"))
-    (bindings--define-key menu [ps-print-buffer]
-      '(menu-item "PostScript Print Buffer (B+W)" ps-print-buffer
-                  :enable (menu-bar-menu-frame-live-and-visible-p)
-                  :help "Pretty-print current buffer in black and white to PostScript printer"))
-    (bindings--define-key menu [ps-print-region-faces]
-      '(menu-item "PostScript Print Region"
-                  ps-print-region-with-faces
-                  :enable mark-active
-                  :help "Pretty-print marked region to PostScript printer"))
-    (bindings--define-key menu [ps-print-buffer-faces]
-      '(menu-item "PostScript Print Buffer"
-                  ps-print-buffer-with-faces
-                  :enable (menu-bar-menu-frame-live-and-visible-p)
-                  :help "Pretty-print current buffer to PostScript printer"))
-    (bindings--define-key menu [print-region]
-      '(menu-item "Print Region" print-region
-                  :enable mark-active
-                  :help "Print region between mark and current position"))
-    (bindings--define-key menu [print-buffer]
-      '(menu-item "Print Buffer" print-buffer
-                  :enable (menu-bar-menu-frame-live-and-visible-p)
-                  :help "Print current buffer with page headings"))
+    (bindings--define-key menu [print]
+      `(menu-item "Print" ,menu-bar-print-menu))
 
     (bindings--define-key menu [separator-print]
       menu-bar-separator)
@@ -1216,6 +1239,12 @@ menu-bar-showhide-menu
                                   (frame-visible-p
                                    (symbol-value 'speedbar-frame))))))
 
+    (bindings--define-key menu [showhide-tab-line-mode]
+      '(menu-item "Window Tab Line" global-tab-line-mode
+                  :help "Turn window-local tab-lines on/off"
+                  :visible (fboundp 'global-tab-line-mode)
+                  :button (:toggle . global-tab-line-mode)))
+
     (bindings--define-key menu [showhide-window-divider]
       `(menu-item "Window Divider" ,menu-bar-showhide-window-divider-menu
                   :visible (memq (window-system) '(x w32))))
@@ -1242,13 +1271,14 @@ menu-bar-showhide-menu
                               (frame-parameter (menu-bar-frame-for-menubar)
                                                'menu-bar-lines)))))
 
-    (bindings--define-key menu [showhide-tab-bar]
-      '(menu-item "Tab Bar" toggle-tab-bar-mode-from-frame
-                  :help "Turn tab bar on/off"
-                  :button
-                  (:toggle . (menu-bar-positive-p
-                              (frame-parameter (menu-bar-frame-for-menubar)
-                                               'tab-bar-lines)))))
+    (unless (featurep 'ns)
+      (bindings--define-key menu [showhide-tab-bar]
+        '(menu-item "Tab Bar" toggle-tab-bar-mode-from-frame
+                    :help "Turn tab bar on/off"
+                    :button
+                    (:toggle . (menu-bar-positive-p
+                                (frame-parameter (menu-bar-frame-for-menubar)
+                                                 'tab-bar-lines))))))
 
     (if (and (boundp 'menu-bar-showhide-tool-bar-menu)
              (keymapp menu-bar-showhide-tool-bar-menu))
@@ -1698,8 +1728,8 @@ menu-bar-tools-menu
     (bindings--define-key menu [compile]
       '(menu-item "Compile..." compile
                   :help "Invoke compiler or Make, view compilation errors"))
-    (bindings--define-key menu [grep]
-      '(menu-item "Search Files (Grep)..." grep
+    (bindings--define-key menu [rgrep]
+      '(menu-item "Search Files (Recursive Grep)..." rgrep
                   :help "Search files for strings or regexps (with Grep)"))
     menu))
 

--=-=-=--




Acknowledgement sent to Juri Linkov <juri@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#37594; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Thu, 3 Oct 2019 17:15:02 UTC

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