From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#59381: Should xref--marker-ring be per-window? Date: Mon, 21 Nov 2022 15:14:39 +0200 Message-ID: <838rk44fgg.fsf@gnu.org> References: <86leo6ai85.fsf@mail.linkov.net> <83leo67mbt.fsf@gnu.org> <83v8na5a5e.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40599"; mail-complaints-to="usenet@ciao.gmane.io" Cc: juri@linkov.net, ackerleytng@gmail.com, 59381@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Nov 21 14:15:18 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 1ox6dp-000AMP-W1 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 21 Nov 2022 14:15:18 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ox6dc-0006Dn-4v; Mon, 21 Nov 2022 08:15:04 -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 1ox6db-0006De-7J for bug-gnu-emacs@gnu.org; Mon, 21 Nov 2022 08:15:03 -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 1ox6da-0001rM-GI for bug-gnu-emacs@gnu.org; Mon, 21 Nov 2022 08:15:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ox6da-0006Rk-9c for bug-gnu-emacs@gnu.org; Mon, 21 Nov 2022 08:15:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 21 Nov 2022 13:15: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.166903647824724 (code B ref 59381); Mon, 21 Nov 2022 13:15:02 +0000 Original-Received: (at 59381) by debbugs.gnu.org; 21 Nov 2022 13:14:38 +0000 Original-Received: from localhost ([127.0.0.1]:45747 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ox6dB-0006Qh-F2 for submit@debbugs.gnu.org; Mon, 21 Nov 2022 08:14:37 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:33800) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ox6d8-0006QS-Nm for 59381@debbugs.gnu.org; Mon, 21 Nov 2022 08:14:36 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ox6d2-0001o5-Ml; Mon, 21 Nov 2022 08:14:28 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=QAD1oFjpfzSZK0XAeiX1E3fWpBtMavzTmbXu+G7B/vM=; b=EkjhS1ycuICb m4VqcY8ZvncliHORX0deulgMfgrDAh1m7fyer808D+EPLnIgk/6CL7lv983VkiH9eg7sHkNVSXxCi TC0s8y/RUSqyJnLOj3BLPHDgW5oVoxSZaygf5OQQGL5RHTE/w3Fqs/7mwj8e8ZQxYtTDxOg4e5vNK 9Be0qDv18QaGKFhv7qc1GuUbUF8p9bkATETb+Oun7GR4VU0Ja2FjgL9vDNxo0dOO2ewy05KrcSLJy jOADQIQVjnSK2ebxWklOl+2RtqJxiHgWgJaggSA6p/c+DVk6YbCymF324RgJLxVHuVA78H30os26x FffiuAhPzc1nJuKOe2e56g==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ox6d1-0002dn-Ve; Mon, 21 Nov 2022 08:14:28 -0500 In-Reply-To: (message from Dmitry Gutov on Mon, 21 Nov 2022 01:17:02 +0200) 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:248524 Archived-At: > Date: Mon, 21 Nov 2022 01:17:02 +0200 > Cc: 59381@debbugs.gnu.org, ackerleytng@gmail.com, juri@linkov.net > From: Dmitry Gutov > > On 20.11.2022 09:59, Eli Zaretskii wrote: > > >> But maybe it will be helpful for you to elaborate: what the workflow > >> would look like. Would it be a parallel set of commands, or simply a > >> command to... do what? > > > > I just did that, above: add a command that starts a new "stack". All the > > rest is unchanged. > > What would happen with the current stack, though? It's discarded, as no longer needed. > Or does it apply to the current window? What about the windows split > from it? What about older windows we decide to pop-to-buffer to from one > of the new windows? In my mental picture, the stack is not specific to a window, like it is today. > >> In my workflow, a new stack is more or less created implicitly by > >> splitting a window, and discarded by deleting one. > > > > So you always ever have a given buffer displayed in a single window? > > Not necessarily, no. If it's a big file, I can have two parallel > "investigations" going on in two different window on it. Using two > different navigation stacks. That's a feature. It's a feature if you indeed want a separate stack in each window. What if you want the same stack in all of those windows? > Whether M-. pop a new window, or you use project-find-regexp, we usually > make sure that after you navigate to a location, it's displayed in the > same window the search was made in. Unless the user called something > like xref-find-definitions-other-window, naturally. > > So it's generally possible to stay within the same window most of the time. Not if I split that one window because I want to look at something else as well. > And you make good points: Emacs often makes you go from a window to a > window, reusing older windows as well. So I'm not sure how to solve that > better: searching the window hierarchy won't help. > > So it could be some propagation mechanism working when windows are split > or buffers get displayed, which would nevertheless leave a window when > the user pressed 'q', for instance. Reverting the window to its previous > stack, let's say. And as for separate command, using it explicitly by > itself is easy to forget, but it perhaps could be added to some other > commands by the user (via before-advice or etc), to mark the beginning > of each stack. > > This is a very rough idea. There's nobody to work on it in the near > future, I'm afraid, so adding an optional change in behavior to use > window-local storage is probably the best way forward. To get feedback, > as Ackerley said. When this becomes practical, we could try it and see if enough people like it.