From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eshel Yaron via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#68958: [PATCH] Support bookmarking Xref results buffers Date: Sun, 11 Feb 2024 07:18:56 +0100 Message-ID: References: <86le7wzcjj.fsf@gnu.org> <0b3f4669-180e-466f-96f3-7eeae994581f@gutov.dev> Reply-To: Eshel Yaron Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38654"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eli Zaretskii , 68958@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Feb 11 07:26:12 2024 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 1rZ3I1-0009lz-Ro for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 11 Feb 2024 07:26:09 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rZ3Hi-0006ua-5a; Sun, 11 Feb 2024 01:25:50 -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 1rZ3Hf-0006tL-0f for bug-gnu-emacs@gnu.org; Sun, 11 Feb 2024 01:25:47 -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 ) id 1rZ3He-0001eE-Os for bug-gnu-emacs@gnu.org; Sun, 11 Feb 2024 01:25:46 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rZ3Hu-00053o-5d for bug-gnu-emacs@gnu.org; Sun, 11 Feb 2024 01:26:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eshel Yaron Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 11 Feb 2024 06:26:02 +0000 Resent-Message-ID: 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.170763272119344 (code B ref 68958); Sun, 11 Feb 2024 06:26:02 +0000 Original-Received: (at 68958) by debbugs.gnu.org; 11 Feb 2024 06:25:21 +0000 Original-Received: from localhost ([127.0.0.1]:52060 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rZ3HE-00051s-JT for submit@debbugs.gnu.org; Sun, 11 Feb 2024 01:25:21 -0500 Original-Received: from mail.eshelyaron.com ([107.175.124.16]:53084 helo=eshelyaron.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rZ3BL-0004mM-Rx for 68958@debbugs.gnu.org; Sun, 11 Feb 2024 01:19:16 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eshelyaron.com; s=mail; t=1707632339; bh=e1mKQb3C9/2QmITpwGW5FtezikoKrcDubMNdZeS3NUA=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=i3gP/Z021uTSCEELpQ1BNQnqe/ecCT1f5Fu0vzOzV/KSBbxl3XszhPrqnX3AgSvNm fuyH0MFludVYUexaCf95AMs8srd6Hf29WZgh4o/+NqnUhH9FQUGp7NrxtQruUVoCiI NSdhNAzc3j4AlJsHfRL1HKfF3HNO3IHsuy4CDCAqIvOlx7Yj8xUnD8hfS21Q+R0imn HGW630JHa5d4LDCve+kXhIZSUPJy3kmamvlfD3Gf3CTZuIWGnhm3uVdvrQ9+3OhhR6 rc77PMjAGrivppADMp6R9dTap7Ol6TLdFA34lE+dmrAyjt+gszEKESyrsVaq/7WtRt OjfUr0D5mZMTA== In-Reply-To: <0b3f4669-180e-466f-96f3-7eeae994581f@gutov.dev> (Dmitry Gutov's message of "Sun, 11 Feb 2024 05:27:27 +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:279817 Archived-At: Hi, Dmitry Gutov writes: > 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). That's not the case. The changes are all meant to facilitate creating bookmarks that you can restore at a later session. AFAICT the backend, identifier and search type (kind) are a required for that, no? We use them to suggest a meaningful bookmark name, but that's just a bonus. > 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. Again, the name of the bookmark is really not the focus here. We can't persist the value of xref--fetcher, since it's an anonymous function, so we get all the info needed to /recreate/ that function to the frontend. If there's another (simpler?) way to provide this feature, please do tell. Best, Eshel