From mboxrd@z Thu Jan  1 00:00:00 1970
Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail
From: Dmitry Gutov <dmitry@gutov.dev>
Newsgroups: gmane.emacs.bugs
Subject: bug#68958: [PATCH] Support bookmarking Xref results buffers
Date: Sun, 11 Feb 2024 05:27:27 +0200
Message-ID: <0b3f4669-180e-466f-96f3-7eeae994581f@gutov.dev>
References: <m1h6ilgxee.fsf@dazzs-mbp.home> <86le7wzcjj.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="31940"; mail-complaints-to="usenet@ciao.gmane.io"
User-Agent: Mozilla Thunderbird
Cc: 68958@debbugs.gnu.org
To: Eli Zaretskii <eliz@gnu.org>, Eshel Yaron <me@eshelyaron.com>
Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Feb 11 04:28:00 2024
Return-path: <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org>
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 <bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org>)
	id 1rZ0Vb-00085W-J6
	for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 11 Feb 2024 04:28:00 +0100
Original-Received: from localhost ([::1] helo=lists1p.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.90_1)
	(envelope-from <bug-gnu-emacs-bounces@gnu.org>)
	id 1rZ0VP-0002si-6O; Sat, 10 Feb 2024 22:27:47 -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 <Debian-debbugs@debbugs.gnu.org>)
 id 1rZ0VN-0002sa-W2
 for bug-gnu-emacs@gnu.org; Sat, 10 Feb 2024 22:27:46 -0500
Original-Received: from debbugs.gnu.org ([2001:470:142:5::43])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>)
 id 1rZ0VN-0006hh-Nw
 for bug-gnu-emacs@gnu.org; Sat, 10 Feb 2024 22:27:45 -0500
Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2)
 (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1rZ0Vd-0005Xf-L7
 for bug-gnu-emacs@gnu.org; Sat, 10 Feb 2024 22:28:01 -0500
X-Loop: help-debbugs@gnu.org
Resent-From: Dmitry Gutov <dmitry@gutov.dev>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@gnu.org
Resent-Date: Sun, 11 Feb 2024 03:28:01 +0000
Resent-Message-ID: <handler.68958.B68958.170762207421280@debbugs.gnu.org>
Resent-Sender: help-debbugs@gnu.org
X-GNU-PR-Message: followup 68958
X-GNU-PR-Package: emacs
X-GNU-PR-Keywords: patch
Original-Received: via spool by 68958-submit@debbugs.gnu.org id=B68958.170762207421280
 (code B ref 68958); Sun, 11 Feb 2024 03:28:01 +0000
Original-Received: (at 68958) by debbugs.gnu.org; 11 Feb 2024 03:27:54 +0000
Original-Received: from localhost ([127.0.0.1]:41332 helo=debbugs.gnu.org)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
 id 1rZ0VV-0005XA-Mz
 for submit@debbugs.gnu.org; Sat, 10 Feb 2024 22:27:54 -0500
Original-Received: from wout1-smtp.messagingengine.com ([64.147.123.24]:43933)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dmitry@gutov.dev>) id 1rZ0VT-0005Wj-S2
 for 68958@debbugs.gnu.org; Sat, 10 Feb 2024 22:27:52 -0500
Original-Received: from compute6.internal (compute6.nyi.internal [10.202.2.47])
 by mailout.west.internal (Postfix) with ESMTP id 0EE773200A5A;
 Sat, 10 Feb 2024 22:27:29 -0500 (EST)
Original-Received: from mailfrontend1 ([10.202.2.162])
 by compute6.internal (MEProxy); Sat, 10 Feb 2024 22:27:30 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc
 :cc:content-transfer-encoding:content-type:content-type:date
 :date:from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:subject:subject:to:to; s=fm2; t=1707622049;
 x=1707708449; bh=pUBULLhWYS0/oZQO9gWgKZDuQONs2xFPRMh/hgOj1eM=; b=
 I3dXTP/fy0aH4vJtkrnelQF/2x/7oeWJWivsruGq7yF5TfVwttmo2OZ8eRV4n+Lf
 SW5EGuWaWpc2oKq/LrfIUe5TANsD+YDWVkt5pCFEAQf0mJse/6pbb8xzpwpzsAN6
 vND8jx8VYpoKt2z69LjvDOPokj7gdVEYzAats8i/cAezAEqipqo/3PYnvhakumHQ
 xHELNoSsgdrCLl0yCFOzX28B19nHkk+2Jj3epnGxjlf41gpYIA5MO4NPXSiP01iC
 /Igyjg6Spx9IzvoFPxk45fq+prhw8rxmw3fu3yz7/zFzRtkGu+8AwiQ7ndC5HzzW
 dX7CKwuwByeXI1xN9ijlOw==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=
 messagingengine.com; h=cc:cc:content-transfer-encoding
 :content-type:content-type:date:date:feedback-id:feedback-id
 :from:from:in-reply-to:in-reply-to:message-id:mime-version
 :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy
 :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1707622049; x=
 1707708449; bh=pUBULLhWYS0/oZQO9gWgKZDuQONs2xFPRMh/hgOj1eM=; b=s
 /uu+OmQD+hNylVOf6UEKRENQTwXFCYytYyCLHuevbhMEHyuhZ3ujH2XtuExPJgiM
 Iytr70ePx6pNpBN7xfa27FZWne4nABLPUhHv+eFNcct760kNUED3QlD/zt4vU/45
 OizIQWFHrU2Aiu3ZjvXjDGzj9RT5X+RXxAGB07zJ6u8g1yZYAFauwsWNn9pUKCec
 rLr3eyMM13FZFfAlGlFMguEO90Uf3jm/8PZafUwwhBa4EvasajkCUa5s7/XDI0Y8
 G1WUcbxAFClUGwRrpzREpPJ7+JTSYsYbBx1R8Sm/J/azW4GTuxOV2aDlb53VfhI/
 eQKae57tl1aacExfvEdQw==
X-ME-Sender: <xms:oT7IZRP7cKJVVOk1lGGP34u6axfuQbrkcb_rHH8Bgd2p_CnrKMoQAw>
 <xme:oT7IZT8VKOML3qEc3Vsk3kZJTyaOg_gbFIWoz9s8x7yv-n6e-hy_6GkI61_Ybug3L
 xwTUiGxBdJpFFo62rQ>
X-ME-Received: <xmr:oT7IZQT-m-ocBP7CH3kmvxfOzDU1R1pIHZLtaLxGB2BfFjxIsUAQtAjV7ipDKh9V1Znd>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledruddtgdeitdcutefuodetggdotefrodftvf
 curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu
 uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc
 fjughrpefkffggfgfuvfevfhfhjggtgfesthejredttddvjeenucfhrhhomhepffhmihht
 rhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvghvqeenucggtffrrghtth
 gvrhhnpeetudeljeegheetgfehgeejkeeuhedvveeikeeufedtvddtveefhfdvveegudej
 heenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegumh
 hithhrhiesghhuthhovhdruggvvh
X-ME-Proxy: <xmx:oT7IZdsrNvOhkl60ee8gFjxe094CVOWFUq_NAhHLUF9KQJZIfSp4Xw>
 <xmx:oT7IZZcyn83V1oCSLsZy0izGQtxNBhSpTCqFNpp7d_qHivToIxT1BQ>
 <xmx:oT7IZZ3QVqpur9qjVvg_ig5SMawfQcKvj1fOl6HOBmG3h7YQlrxrtQ>
 <xmx:oT7IZZG3NnZzJ1vvn6rIeUrGTyYsRNl33fmTlAYHMuCus_ESNbhMvg>
Feedback-ID: i0e71465a:Fastmail
Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat,
 10 Feb 2024 22:27:28 -0500 (EST)
Content-Language: en-US
In-Reply-To: <86le7wzcjj.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" <bug-gnu-emacs.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-gnu-emacs>,
 <mailto:bug-gnu-emacs-request@gnu.org?subject=unsubscribe>
List-Archive: <https://lists.gnu.org/archive/html/bug-gnu-emacs>
List-Post: <mailto:bug-gnu-emacs@gnu.org>
List-Help: <mailto:bug-gnu-emacs-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-gnu-emacs>,
 <mailto:bug-gnu-emacs-request@gnu.org?subject=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:279811
Archived-At: <http://permalink.gmane.org/gmane.emacs.bugs/279811>

On 07/02/2024 14:25, Eli Zaretskii wrote:
>> To make this happen, we need to propagate some more information to the
>> "*xref*" buffer (and any other Xref fronted).  We do this, without
>> breaking compatibility, by setting a new variable from inside the xrefs
>> fetcher function.  The frontend can examine this variable to learn all
>> about the source of the fetched xrefs after invoking the fetcher.
>> Namely, the "*xref*" buffer uses this information to create bookmarks.
> Thanks.  Frankly, I'm surprised we need such a complex changeset for
> supporting such a simple extension, but I'll let Dmitry judge that.

A lot of changes seem to stem from the desire to add detailed info into 
the bookmarks's name (including the identifier being searched, the 
search type, and the xref backend in use).

At the moment our code doesn't save all of those separately, just 
combines them in xref--fetcher.

So whether the patch has to be complex would depend on whether we really 
need to have bookmark names look exactly like proposed. Though I'd 
rewrite it a little even in that case.