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#38797: 27.0.50; Feature request: provide the opposite of xref-pop-marker-stack Date: Mon, 08 Nov 2021 20:23:06 +0200 Organization: LINKOV.NET Message-ID: <86fss6y0ad.fsf@mail.linkov.net> References: <06080F99-49F3-4936-A39A-D135F5ECCEE2@acm.org> <0c88bcef-f07d-5a38-fa7d-b0ddd048cb48@yandex.ru> <072CF8C3-2ADC-4610-A7E1-94C795A22618@acm.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30078"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu) Cc: Dmitry Gutov , yyoncho , 38797@debbugs.gnu.org To: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Nov 08 19:29:13 2021 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 1mk9OJ-0007aG-FR for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 08 Nov 2021 19:29:11 +0100 Original-Received: from localhost ([::1]:58110 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mk9OI-00076f-I4 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 08 Nov 2021 13:29:10 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:46542) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mk9OA-00073U-6P for bug-gnu-emacs@gnu.org; Mon, 08 Nov 2021 13:29:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:47893) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mk9O9-0005dt-Tv for bug-gnu-emacs@gnu.org; Mon, 08 Nov 2021 13:29:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mk9O9-0001rw-Qv for bug-gnu-emacs@gnu.org; Mon, 08 Nov 2021 13:29:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 08 Nov 2021 18:29:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 38797 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 38797-submit@debbugs.gnu.org id=B38797.16363960857115 (code B ref 38797); Mon, 08 Nov 2021 18:29:01 +0000 Original-Received: (at 38797) by debbugs.gnu.org; 8 Nov 2021 18:28:05 +0000 Original-Received: from localhost ([127.0.0.1]:59439 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mk9NF-0001qh-A8 for submit@debbugs.gnu.org; Mon, 08 Nov 2021 13:28:05 -0500 Original-Received: from relay1-d.mail.gandi.net ([217.70.183.193]:46281) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mk9NC-0001qB-UN for 38797@debbugs.gnu.org; Mon, 08 Nov 2021 13:28:03 -0500 Original-Received: (Authenticated sender: juri@linkov.net) by relay1-d.mail.gandi.net (Postfix) with ESMTPSA id 9BB50240006; Mon, 8 Nov 2021 18:27:54 +0000 (UTC) In-Reply-To: ("Mattias =?UTF-8?Q?Engdeg=C3=A5rd?="'s message of "Mon, 25 Oct 2021 17:49:52 +0200") 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:219373 Archived-At: --=-=-= Content-Type: text/plain > I favour (lightly) "Go Back" / "Go Forward" because they make sense in > context with the other Xref operations in that separator-delimited group of > entries in the menu, and because it's a wording often used for these > operations elsewhere such as in web browsers and IDEs (though often it's > just "Back" and "Forward"). There are more votes for "Go Back" / "Go Forward", so I'll push two patches - one for emacs-28 (not to be merged to master), and another for master: --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=go-back-emacs-28.patch diff --git a/lisp/progmodes/prog-mode.el b/lisp/progmodes/prog-mode.el index 3e1a915e32..4997c2746f 100644 --- a/lisp/progmodes/prog-mode.el +++ b/lisp/progmodes/prog-mode.el @@ -51,7 +51,7 @@ prog-context-menu (unless (xref-marker-stack-empty-p) (define-key-after menu [xref-pop] - '(menu-item "Back Definition" xref-pop-marker-stack + '(menu-item "Go Back" xref-pop-marker-stack :help "Back to the position of the last search") 'prog-separator)) --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=go-back-master.patch diff --git a/lisp/progmodes/prog-mode.el b/lisp/progmodes/prog-mode.el index db350a5f70..30b6edf0d9 100644 --- a/lisp/progmodes/prog-mode.el +++ b/lisp/progmodes/prog-mode.el @@ -49,9 +49,15 @@ prog-context-menu (define-key-after menu [prog-separator] menu-bar-separator 'middle-separator) + (unless (xref-forward-history-empty-p) + (define-key-after menu [xref-forward] + '(menu-item "Go Forward" xref-go-forward + :help "Forward to the position gone Back from") + 'prog-separator)) + (unless (xref-marker-stack-empty-p) (define-key-after menu [xref-pop] - '(menu-item "Back Definition" xref-go-back + '(menu-item "Go Back" xref-go-back :help "Back to the position of the last search") 'prog-separator)) --=-=-=--