GNU bug report logs -
#59381
Should xref--marker-ring be per-window?
Previous Next
Full log
View this message in rfc822 format
On 22/11/22 04:46, Ackerley Tng wrote:
> Here's a patch for review!
It's reasonable, but what if we turn xref-storage-type into a variable
that gets set to a function? One that knows how to retrieve and set the
value. E.g.:
(defcustom xref-storage-type 'xref-window-local-history
...)
(defun xref-window-local-history (&optional new-value)
(let ((w (selected-window)))
(if new-value
(set-window-parameter w 'xref--history new-value)
(or (window-parameter w 'xref--history)
(cons nil nil)))))
(defun xref-global-history (&optional new-value)
(if new-value
(setq xref--history new-value)
xref--history))
Then it will be trivial to extend with new storage mechanisms.
> I made 'window-local the default storage so that we would hopefully
> get more feedback, do let me know if I should leave the default as
> 'global.
That's not how we introduce changes here, with rare exceptions.
window-local storage is going to be disruptive (I'm fairly sure), so
let's keep the current behavior as default.
This bug report was last modified 2 years and 237 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.