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:19:22 +0200 Message-ID: <7b2b0386-ae47-cdc5-d275-00a678c23b46@yandex.ru> 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="24630"; 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: juri@linkov.net, ackerleytng@gmail.com, 59381@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Nov 24 04:20:19 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 1oy2mh-00069U-Bk for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 24 Nov 2022 04:20:19 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oy2mT-0004Mj-8N; Wed, 23 Nov 2022 22:20:05 -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 1oy2mR-0004M0-3Y for bug-gnu-emacs@gnu.org; Wed, 23 Nov 2022 22:20: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 1oy2mQ-0007BR-QK for bug-gnu-emacs@gnu.org; Wed, 23 Nov 2022 22:20:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oy2mQ-00035V-Ig for bug-gnu-emacs@gnu.org; Wed, 23 Nov 2022 22:20: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:20: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.166925997211794 (code B ref 59381); Thu, 24 Nov 2022 03:20:02 +0000 Original-Received: (at 59381) by debbugs.gnu.org; 24 Nov 2022 03:19:32 +0000 Original-Received: from localhost ([127.0.0.1]:56781 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oy2lv-00034A-Hr for submit@debbugs.gnu.org; Wed, 23 Nov 2022 22:19:32 -0500 Original-Received: from mail-wr1-f53.google.com ([209.85.221.53]:46850) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oy2lt-00033w-Gt for 59381@debbugs.gnu.org; Wed, 23 Nov 2022 22:19:30 -0500 Original-Received: by mail-wr1-f53.google.com with SMTP id n7so561034wrr.13 for <59381@debbugs.gnu.org>; Wed, 23 Nov 2022 19:19:29 -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=pS50T9Mezu9LL5oD8LqnvEyw+kELx1HMzHMBm00V/+o=; b=aFH2SMOE8ubXlnRyjjRy0wgbqPDtzB9pMBICzwXcHRpk5KIJ/D8IW8HQdyTyOO0+vK Wqj9E5Oz0kBDPWuEx1zwxR2OnPp2b/KUp4tKwIn45FEzgccWMWEiqy26abULZgSY9tYx TTgGxfy16ObZuH1MXQsyaQWmC18HqbDYL/IAevzV5W1YoL3yKR+AS5CwZdYNVYoIcvjh SYlzk759EwXeKOEotlGEjFKWPq+JgNpt0J7Y9aG/5KHXzk3+1ofv+eip0hfT4EXpKwME vdDh73XrG6Undws39MCedJTr57jVBH/rl2nnOLOM/f9ZYF0ZhGK3Vc3ZHi78EOdPcgjD kHrA== 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=pS50T9Mezu9LL5oD8LqnvEyw+kELx1HMzHMBm00V/+o=; b=VCPF1F00ThGt1J39Tq4KjpeqOacMAXnqvMon8U7GJ/dT5RzgpKl4HeAImDd9gl+nin ZsXcddCYFfqvhsn1/Bxp2dBM3Le7x52kfqnOMOzHrjAiJhDlT9tk00I94XnPPQrp4YeR DuzS1gF2SZuIF3aJRc+lRmKmxZd8VsBCuF+Cpiry8bmD7gq/sSD9SqokVFisb5vNGZy1 RsdM7G+DK3ZZ1Pp+OUHn9wsT3nUlafmSgf5TeRnLHfnmPYfpHU/ZW84tlDRCd8bOu8NK fy21M3pE7viuv5esdzEzX1I9sSDeHCkIDMt2m8MpBxCoTvSmynV7mYBjzVMa6vfqnFEE 4m8g== X-Gm-Message-State: ANoB5pllD6kFmO3T3KjcePkrEpmOiix/G9dDepaJdDq3Oa43Rxy5Bcbf tQBCIcr+TT15Z2Wiw1EfZhIoM1Okhq8= X-Google-Smtp-Source: AA0mqf7QEGSjAU8k+N8x3c5pT0u14yRGoLFXiLlcvGFXQCA1w4OuNQFYiTeVVvAPutEvQktMIgcpYQ== X-Received: by 2002:a5d:5290:0:b0:241:cdd4:6925 with SMTP id c16-20020a5d5290000000b00241cdd46925mr12824425wrv.525.1669259963758; Wed, 23 Nov 2022 19:19:23 -0800 (PST) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id g6-20020a5d5406000000b00241d2df4960sm76310wrv.17.2022.11.23.19.19.22 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 23 Nov 2022 19:19:23 -0800 (PST) Content-Language: en-US In-Reply-To: <838rk44fgg.fsf@gnu.org> 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:248806 Archived-At: On 21/11/22 15:14, Eli Zaretskii wrote: >> 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. That sounds odd. The idea regarding windows is about keeping multiple stacks at the same time, not about discarding information. >> 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? Maybe you never do? Or if you really do, that would require some additional manual management (through new commands, I suppose). >> 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. In my book that's starting a new line of thought, where it's okay to create a new stack. The old one is still around. >> 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. I don't know if it's practical or not, but it requires some additional design for sure. Maybe someday.