all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@linkov.net>
To: "Mattias Engdegård" <mattiase@acm.org>
Cc: Dmitry Gutov <dgutov@yandex.ru>, yyoncho <yyoncho@gmail.com>,
	38797@debbugs.gnu.org
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	[thread overview]
Message-ID: <86fss6y0ad.fsf@mail.linkov.net> (raw)
In-Reply-To: <B000C18C-DFEF-4D5D-86D1-2964710E5AAE@acm.org> ("Mattias Engdegård"'s message of "Mon, 25 Oct 2021 17:49:52 +0200")

[-- Attachment #1: Type: text/plain, Size: 478 bytes --]

> 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:


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: go-back-emacs-28.patch --]
[-- Type: text/x-diff, Size: 496 bytes --]

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))
 

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: go-back-master.patch --]
[-- Type: text/x-diff, Size: 792 bytes --]

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))
 

  parent reply	other threads:[~2021-11-08 18:23 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-29 18:11 bug#38797: 27.0.50; Feature request: provide the opposite of xref-pop-marker-stack yyoncho
2020-01-23 14:13 ` Dmitry Gutov
2021-10-20 19:12 ` Mattias Engdegård
2021-10-24  1:40   ` Dmitry Gutov
2021-10-24  7:54     ` Juri Linkov
2021-10-24 12:39       ` Dmitry Gutov
2021-10-24 19:10         ` Juri Linkov
2021-10-24 23:22           ` Dmitry Gutov
2021-10-25  7:44             ` Juri Linkov
2021-10-25 15:18               ` Dmitry Gutov
2021-10-25 17:07                 ` Juri Linkov
2021-10-24 13:24     ` Mattias Engdegård
2021-10-25  2:13       ` Dmitry Gutov
2021-10-25 15:49         ` Mattias Engdegård
2021-10-25 17:05           ` Juri Linkov
2021-10-25 18:53             ` Mattias Engdegård
2021-10-25 19:38             ` Dmitry Gutov
2021-10-25 21:29           ` Glenn Morris
2021-10-26  8:06             ` Mattias Engdegård
2021-11-08 18:23           ` Juri Linkov [this message]
2021-11-09  8:30             ` Juri Linkov
2021-11-09 13:08               ` Mattias Engdegård
2021-11-09 13:09                 ` Dmitry Gutov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86fss6y0ad.fsf@mail.linkov.net \
    --to=juri@linkov.net \
    --cc=38797@debbugs.gnu.org \
    --cc=dgutov@yandex.ru \
    --cc=mattiase@acm.org \
    --cc=yyoncho@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.