Subject: bug#31027: 27.0.50; xref, tags-location-ring equivalent

From: [email-masked] (Charles A. Roelli)
Date: Tue, 03 Apr 2018 19:58:45 +0200

> Authentication-Results: sinyavsky.aurox.ch (amavisd-new); 	dkim=pass (2048-bit key) header.d=gmail.com
> From: Robert Pluim <[email-masked]>
> Cc: [email-masked]
> Mail-Copies-To: never
> Gmane-Reply-To-List: yes
> Date: Tue, 03 Apr 2018 09:15:33 +0200
> Content-Type: text/plain
> 
> [email-masked] (Charles A. Roelli) writes:
> 
> > tags-location-ring seems to have no replacement in xref.el.
> >
> > from etags.el:
> > (defvar tags-location-ring (make-ring xref-marker-ring-length)
> >   "Ring of markers which are locations visited by \\[find-tag].
> > Pop back to the last location with \\[negative-argument] \\[find-tag].")
> >
> > We should add a "xref-location-ring" (or similar) that stores the
> > locations visited by "xref-find-definitions", and we can allow jumping
> > to them with C-u - M-., in the same way as "find-tag" does.
> 
> xref has a marker stack. The following is bound to "M-," by default.
> 
> (defun xref-pop-marker-stack ()
>   "Pop back to where \\[xref-find-definitions] was last invoked."
>   (interactive)

The xref marker stack (in xref--marker-ring) is a different beast: it
stores the list of places where xref-find-definitions was invoked.  I
suggest having another marker stack that tracks the list of places
jumped to by xref-find-definitions.