From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ackerley Tng Newsgroups: gmane.emacs.bugs Subject: bug#59381: Should xref--marker-ring be per-window? Date: Sat, 19 Nov 2022 14:01:52 -0800 Message-ID: References: <86leo6ai85.fsf@mail.linkov.net> <83leo67mbt.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000eccbf305edd9f80a" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37609"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 59381@debbugs.gnu.org, Juri Linkov To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Nov 20 07:38:24 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 1owdyB-0009Zm-R1 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 20 Nov 2022 07:38:23 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1owdxt-0006op-Vg; Sun, 20 Nov 2022 01:38: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 1owdxs-0006oN-BZ for bug-gnu-emacs@gnu.org; Sun, 20 Nov 2022 01:38: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 1owdxr-0005WF-T7 for bug-gnu-emacs@gnu.org; Sun, 20 Nov 2022 01:38:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1owdxr-000062-JT for bug-gnu-emacs@gnu.org; Sun, 20 Nov 2022 01:38:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Ackerley Tng Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 20 Nov 2022 06:38:03 +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.166892625032753 (code B ref 59381); Sun, 20 Nov 2022 06:38:03 +0000 Original-Received: (at 59381) by debbugs.gnu.org; 20 Nov 2022 06:37:30 +0000 Original-Received: from localhost ([127.0.0.1]:42190 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1owdxI-0008W7-4c for submit@debbugs.gnu.org; Sun, 20 Nov 2022 01:37:30 -0500 Original-Received: from mail-vs1-f45.google.com ([209.85.217.45]:39792) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1owVub-000474-9B for 59381@debbugs.gnu.org; Sat, 19 Nov 2022 17:02:12 -0500 Original-Received: by mail-vs1-f45.google.com with SMTP id m4so7994908vsc.6 for <59381@debbugs.gnu.org>; Sat, 19 Nov 2022 14:02:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=j1/btV4T7P01yc0mNx3P47yTH+ZIHz5IxIMbEce6cCc=; b=Aa63yhMAcEOUil+9nmyfaj103M3s6p5G1NbOI2zAGHOiC9hw3G0s4WKARXIIR5hCrv XYfAxW36Wb1w6PxC7IPCyzR/VpRJHz2WHWbuBTgcea4AvzuCU4t6OrYHn4gUi406orSM x1gdWuwRbW5/TVV1p5XNXaumbbBT/oCwJ0F8kQiBGYSC3AZZv97SubV6FoIzegH6bEYb yWx72m6ERCP3wMsu0J8V9VxM/RdBIc9a92wRa6WRP3VWEixJPbHLbAEh0i1pyDINWM9N A9Ge24OnDDwhfhejfC5NadbHqkFr8cUDI7DW/AUWFZlIWmL7MfQfsbsSF1/N48fUOFL9 63NQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=j1/btV4T7P01yc0mNx3P47yTH+ZIHz5IxIMbEce6cCc=; b=yI/clNYkB+hY9C1iS6jhMKtyzNieJESDu5qOx9wRkVhoX6MnTCnj1waaFq1OnSEX7s RaomA5AqO16eFW8GaMMVTYkA0ayaJGwiyGRdyhIH0r60J/2pyrBw7a6DeaGPFGRM9pO5 YMuz9iFPzl3PA/kksspguy6q6piVd/ORu9VYHcIirl9WF7io3WKlC249S0oOitooCJ2g 1w7IO8/usXSWbWuucC4OYPajb4XKJ6ozXvxQf6gB2hYMmsEiLS/TAeYzzseuYIMu+GuJ 7KPX9iujTdutgPXGfRROGgeTad19FYRWa2dGM4lAJltbSECc3vVVJQfocflgB6Ho6hhl ZMrg== X-Gm-Message-State: ANoB5pnd4zDwZRGYwCFcTwFhhOB1S4QF8y8Ti1q5iDP+D/mFIcF4gUtJ 5bXeLR5CHAHO1AAob8iPZ187L/6janjcxK+2s/U= X-Google-Smtp-Source: AA0mqf6i9XT/FD3QHjvcDkeeayJpd1id9SxYrti4VMY3mSPOR1BcGkdjx4142RtM1hhMBz95hT7h21Gxv4si3uTs2kU= X-Received: by 2002:a67:fd09:0:b0:3af:ce07:c3d4 with SMTP id f9-20020a67fd09000000b003afce07c3d4mr7064469vsr.25.1668895323506; Sat, 19 Nov 2022 14:02:03 -0800 (PST) In-Reply-To: <83leo67mbt.fsf@gnu.org> X-Mailman-Approved-At: Sun, 20 Nov 2022 01:37:26 -0500 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:248393 Archived-At: --000000000000eccbf305edd9f80a Content-Type: text/plain; charset="UTF-8" What if we copy the whole stackv from the old window whenever a new window is opened? On Sat, Nov 19, 2022, 11:53 AM Eli Zaretskii wrote: > > Cc: 59381@debbugs.gnu.org > > From: Juri Linkov > > Date: Sat, 19 Nov 2022 20:53:46 +0200 > > > > > While using xref (xref-find-definitions and xref-find-references, etc) > > > in separate windows, I hit M-, to pop the marker stack expecting that > > > each window should have a separate stack. > > > > > > However, it seems that the entire emacs instance shares a single > > > xref--marker ring. > > > > > > Could we have separate xref--marker-rings per window, or some > > > configuration option to enable that? > > > > Ideally, making an existing variable window-local should be as easy > > as making it buffer-local, e.g.: > > > > (make-variable-buffer-local 'xref--history) > > -> > > (make-variable-window-local 'xref--history) > > > > But we are not here so far. > > I don't think it's that simple. Windows are much more ephemeral than > buffers; > for example, "C-x 2" followed by "C-x 1" or "C-x 0" deletes one of the > windows. > What do we want to happen with the "window-local" xref stack in that case? > > My guess is that the OP wanted to have control on when M-. pushes > locations to > the last used stack or begin a new stack. Because only the user knows when > M-. begins a new series of searches. So I think it is better to offer a > separate command for exercising just such control. > --000000000000eccbf305edd9f80a Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
What if we copy the whole stackv from the old window= whenever a new window is opened?

On Sat, Nov 19, 2022, 11:53 AM Eli Zaretskii= <eliz@gnu.org> wrote:
<= blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px= #ccc solid;padding-left:1ex">> Cc: 59381@debbugs.gnu.org
> From: Juri Linkov <juri@linkov.net>
> Date: Sat, 19 Nov 2022 20:53:46 +0200
>
> > While using xref (xref-find-definitions and xref-find-references,= etc)
> > in separate windows, I hit M-, to pop the marker stack expecting = that
> > each window should have a separate stack.
> >
> > However, it seems that the entire emacs instance shares a single<= br> > > xref--marker ring.
> >
> > Could we have separate xref--marker-rings per window, or some
> > configuration option to enable that?
>
> Ideally, making an existing variable window-local should be as easy > as making it buffer-local, e.g.:
>
>=C2=A0 =C2=A0(make-variable-buffer-local 'xref--history)
>=C2=A0 =C2=A0->
>=C2=A0 =C2=A0(make-variable-window-local 'xref--history)
>
> But we are not here so far.

I don't think it's that simple.=C2=A0 Windows are much more ephemer= al than buffers;
for example, "C-x 2" followed by "C-x 1" or "C-x 0= " deletes one of the windows.
What do we want to happen with the "window-local" xref stack in t= hat case?

My guess is that the OP wanted to have control on when M-. pushes locations= to
the last used stack or begin a new stack.=C2=A0 Because only the user knows= when
M-. begins a new series of searches.=C2=A0 So I think it is better to offer= a
separate command for exercising just such control.
--000000000000eccbf305edd9f80a--