all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Dmitry Gutov <dgutov@yandex.ru>
To: Ackerley Tng <ackerleytng@gmail.com>, Eli Zaretskii <eliz@gnu.org>
Cc: 59381@debbugs.gnu.org, juri@linkov.net
Subject: bug#59381: Should xref--marker-ring be per-window?
Date: Thu, 24 Nov 2022 05:28:59 +0200	[thread overview]
Message-ID: <ec561b2b-4b28-6a22-19d1-4b972a09e148@yandex.ru> (raw)
In-Reply-To: <CANZnma7AU7wb6O30ppVW6uZmqaErOhCU1AirSx6QRVPARuwX5A@mail.gmail.com>

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.





  reply	other threads:[~2022-11-24  3:28 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-19  5:29 bug#59381: Should xref--marker-ring be per-window? Ackerley Tng
2022-11-19 18:53 ` Juri Linkov
2022-11-19 19:53   ` Eli Zaretskii
2022-11-19 22:01     ` Ackerley Tng
2022-11-20  7:09       ` Eli Zaretskii
2022-11-20 17:00         ` Dmitry Gutov
2022-11-20 17:32           ` Eli Zaretskii
2022-11-20 18:11             ` Ackerley Tng
2022-11-20 18:22               ` Eli Zaretskii
2022-11-20 23:01                 ` Dmitry Gutov
2022-11-21  7:42                   ` Juri Linkov
2022-11-24  3:16                     ` Dmitry Gutov
2022-11-20  2:52     ` Dmitry Gutov
2022-11-20  7:59       ` Eli Zaretskii
2022-11-20 23:17         ` Dmitry Gutov
2022-11-21 13:14           ` Eli Zaretskii
2022-11-22  2:46             ` Ackerley Tng
2022-11-24  3:28               ` Dmitry Gutov [this message]
2022-11-24 14:17                 ` Dmitry Gutov
2022-11-24 23:42                   ` Ackerley Tng
2022-11-24 23:59                     ` Dmitry Gutov
2022-11-25  0:28                       ` Ackerley Tng
2022-11-25  1:02                         ` Dmitry Gutov
2022-11-24  3:19             ` Dmitry Gutov
2022-11-24  7:30               ` Eli Zaretskii

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=ec561b2b-4b28-6a22-19d1-4b972a09e148@yandex.ru \
    --to=dgutov@yandex.ru \
    --cc=59381@debbugs.gnu.org \
    --cc=ackerleytng@gmail.com \
    --cc=eliz@gnu.org \
    --cc=juri@linkov.net \
    /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.