Subject: bug#38797: 27.0.50; Feature request: provide the opposite of xref-pop-marker-stack

From: Dmitry Gutov <[email-masked]>
Date: Mon, 25 Oct 2021 22:38:20 +0300

On 25.10.2021 20:05, Juri Linkov wrote:

>> 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").
>>
>> "Xref {Back,Forward}" or "{Back,Forward} Xref" would also do and displays
>> the link to Xref up front, but the English is decidedly less natural.
> 
> With such a test case:
> 
> 0. emacs -Q

Seems like step 0.5 is missing: enable context-menu-mode.

> 1. click mouse-3 on any word in *scratch*, and select from the context menu
>     "Find Definition".  It should fail with the error
>     "No definitions found for: This".  This is correct.
> 2. now click mouse-3 at the end of *scratch*, not on a word.
> 
> The menu contains the item "Back Definition".  (BTW, why if the search failed?)
> 
> This menu item is too ambiguous.  Renaming it to "Go Back" or "Go Forward"
> doesn't make the menu item clearer.  Only adding a word "Xref" somewhere
> will disambiguate it.  Maybe then "Go Back in Xref" or "Go Back with Xref"?
> We need more opinions.

Go Back and Go Forward look okay to me.

Not sure whether adding "Xref " would be an improvement: the Xref 
locations stack is an intended replacement for find-tag-marker-ring, 
which is supposedly used by all kinds of code.

So the location to which we "Go Back" might as well have been tagged by 
a command which otherwise has to relation to Xref