From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#59381: Should xref--marker-ring be per-window? Date: Thu, 24 Nov 2022 05:28:59 +0200 Message-ID: References: <86leo6ai85.fsf@mail.linkov.net> <83leo67mbt.fsf@gnu.org> <83v8na5a5e.fsf@gnu.org> <838rk44fgg.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30797"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Cc: 59381@debbugs.gnu.org, juri@linkov.net To: Ackerley Tng , Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Nov 24 04:30:41 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oy2wi-0007tr-Nv for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 24 Nov 2022 04:30:40 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oy2wA-0007Ux-MN; Wed, 23 Nov 2022 22:30:06 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oy2w7-0007SC-Fs for bug-gnu-emacs@gnu.org; Wed, 23 Nov 2022 22:30:04 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oy2w7-0001ry-11 for bug-gnu-emacs@gnu.org; Wed, 23 Nov 2022 22:30:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oy2w6-0003MY-L5 for bug-gnu-emacs@gnu.org; Wed, 23 Nov 2022 22:30:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 24 Nov 2022 03:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59381 X-GNU-PR-Package: emacs Original-Received: via spool by 59381-submit@debbugs.gnu.org id=B59381.166926055012841 (code B ref 59381); Thu, 24 Nov 2022 03:30:02 +0000 Original-Received: (at 59381) by debbugs.gnu.org; 24 Nov 2022 03:29:10 +0000 Original-Received: from localhost ([127.0.0.1]:56813 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oy2vG-0003L2-6L for submit@debbugs.gnu.org; Wed, 23 Nov 2022 22:29:10 -0500 Original-Received: from mail-wm1-f41.google.com ([209.85.128.41]:44000) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oy2vE-0003Km-63 for 59381@debbugs.gnu.org; Wed, 23 Nov 2022 22:29:08 -0500 Original-Received: by mail-wm1-f41.google.com with SMTP id a11-20020a05600c2d4b00b003cf6f5fd9f1so358250wmg.2 for <59381@debbugs.gnu.org>; Wed, 23 Nov 2022 19:29:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:from:to:cc:subject:date:message-id:reply-to; bh=ubCUg4diub33qUmIDya+YlQiY+VVHKhHSRKUO0Nkuyw=; b=Zlud9HwCdcOvnqvk0f49mG3T07bvAQsIxforCknPqkr5+jcIjssWVntANvXT4hN/s3 5mXnMy+4MeoHvSPHRe/YjCApFe4En+T8dyTIqAeIUEPOCWcZsWGikIRZ7oDpkFnaws9h nmfl+uRNlIF0h4VVXzYecsiHsbreNNXFL9RPdkSE2Qkpk/zU0K4fdGTf2YNc2cb7f4H7 0pjiC+NCUqlreANoSuGyc+nP+hWuurk3CcHomJOuedCW6vGJGHke0HdoePxDCPVp60R1 vmyfESswViuDVZ8EVwfWX6DI+u7sto+c/niZxesbd9aAwZBIhGRT5WblDG2f5o64A/ha vfdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ubCUg4diub33qUmIDya+YlQiY+VVHKhHSRKUO0Nkuyw=; b=Zo1YxGyQBpe7TFLWMi9YT/86f8nDFLRbdLkQa/iwXjs0Qr0S4EM433bN6kPraIuu2I AQC1faVFsOFEIOSMNNzlSXY/dlnU7/9BghR+g6y0CaDEfJS7zuTCkazPht13rsot0pru mQGwGWuejxvffydCJiqHwjueakD9DF9fi2yJJQKp8Vj7FlL9UPvLz0cKkOw+ta7ObwFj cg7KnYVy6ojs1OiCZJfsrnRbMjwXnJYeHTvharHcl31w6CHHh10FzufBdFqhJaKm1YaJ lqctPW6UQ8bTZCW5KsT7ghCc+oq+sFq9hgbIzrDBAj+lzTB1JRQHjOWKMkZ15BEPgrC7 Cxhg== X-Gm-Message-State: ANoB5plgHlJvEwdT4oF0cdfXjogU3bA11yDfRqk/9Myabnn8kBMB9Kh4 W1/XomsHH3Xb+iItuxjFEHA= X-Google-Smtp-Source: AA0mqf53i73eViNmMwlcas9j96Q3yreYEyD31XcIppqHXleihHxp9NymMO5wyZEApE4ytDIWBHRWdg== X-Received: by 2002:a05:600c:43d6:b0:3d0:387d:8eb6 with SMTP id f22-20020a05600c43d600b003d0387d8eb6mr1257862wmn.137.1669260541913; Wed, 23 Nov 2022 19:29:01 -0800 (PST) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id n6-20020a1ca406000000b003d005aab31asm3988548wme.40.2022.11.23.19.29.00 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 23 Nov 2022 19:29:01 -0800 (PST) Content-Language: en-US In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:248807 Archived-At: 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.