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#68958: [PATCH] Support bookmarking Xref results buffers Date: Sun, 11 Feb 2024 17:34:57 +0200 Message-ID: References: <86le7wzcjj.fsf@gnu.org> <0b3f4669-180e-466f-96f3-7eeae994581f@gutov.dev> 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="5177"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: Eli Zaretskii , 68958@debbugs.gnu.org To: Eshel Yaron Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Feb 11 16:36:14 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 1rZBsL-00017M-5W for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 11 Feb 2024 16:36:14 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rZBrw-0006R0-8O; Sun, 11 Feb 2024 10:35:48 -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 1rZBru-0006Qc-Bb for bug-gnu-emacs@gnu.org; Sun, 11 Feb 2024 10:35: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 ) id 1rZBru-00082F-2v for bug-gnu-emacs@gnu.org; Sun, 11 Feb 2024 10:35:46 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rZBsA-00048u-3X for bug-gnu-emacs@gnu.org; Sun, 11 Feb 2024 10:36: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: Sun, 11 Feb 2024 15:36: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.170766572415835 (code B ref 68958); Sun, 11 Feb 2024 15:36:02 +0000 Original-Received: (at 68958) by debbugs.gnu.org; 11 Feb 2024 15:35:24 +0000 Original-Received: from localhost ([127.0.0.1]:55546 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rZBrY-00047L-E9 for submit@debbugs.gnu.org; Sun, 11 Feb 2024 10:35:24 -0500 Original-Received: from wout3-smtp.messagingengine.com ([64.147.123.19]:45977) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rZBrX-000472-BH for 68958@debbugs.gnu.org; Sun, 11 Feb 2024 10:35:23 -0500 Original-Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 0048B32003D3; Sun, 11 Feb 2024 10:35:00 -0500 (EST) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Sun, 11 Feb 2024 10:35:01 -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=1707665700; x=1707752100; bh=kxHskxZmPZsQbrDUPM6S6T1SVDLzVWV/Nvty54tKtlI=; b= EY200NdzlLfSdrjgzd8OInHaIQ0A37SfRiPrCWfxZI/UHyACcd6WcxuaqdoKhZ2y 82k9gCCyvcBYXQGmoYGYDEQY5Wf+ATvsIwZp5iCxjwSZqhVmL7ADUVKhJ1IIZo9t JQ6SBnAr5lRXqbN7jTFkeuuCWnCm2jqcWgSTvaQe+TTZ18s4lsgUWIPRa59QuvVX moFwedjPtlug0O8gf2lptciyc9e9odCY3RjPr+8C3R6imi9Bahls2m2R3Fpb65sl jEN9HPlCgIT2dbCPEV4eGEbkZuXOuOgvDA/NCkiPNZxFXTLdSPAhmybgbQbxVyPk 3qmeWWNtUu8mj0fJZc0wCg== 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=1707665700; x= 1707752100; bh=kxHskxZmPZsQbrDUPM6S6T1SVDLzVWV/Nvty54tKtlI=; b=A Jhz5KbO4nWWAvrO6Be3fBJw9jGIj8AKupEEtXpR4Vxow66LVAhHm6OdK70ZeDHgC oMKsEHZyCKju1p/L4PeFid2g79OK69hL2Z0rSXqUPBmGv2HCo4O7OWuUoJbrHL05 kyBKCx5l/a1Rh/ldY1nVugozMUBqopvLvn6XTjX6NgGkF2peRfUF/b9LLFtOU6S6 1l4VrfgnhcAbEUWSSmhfCf9S9AWZx7m2KeBFVb/mf4+NKTjw8iynlrQ/fUhaz//T vWFjI5Pu4l9421O6QxQUTFj8la675e2DGaXTHQEv9vFE7t0Ljbddk+fIsKhL737P L/IHlGLGfWsToLH/FcQ8Q== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledruddugdejlecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefkffggfgfuvfevfhfhjggtgfesthejredttddvjeenucfhrhhomhepffhmihht rhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvghvqeenucggtffrrghtth gvrhhnpeetudeljeegheetgfehgeejkeeuhedvveeikeeufedtvddtveefhfdvveegudej heenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegumh hithhrhiesghhuthhovhdruggvvh X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 11 Feb 2024 10:34:59 -0500 (EST) Content-Language: en-US In-Reply-To: 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:279846 Archived-At: On 11/02/2024 08:18, Eshel Yaron wrote: > 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. All right, that's a good point. Could we really not persist an anonymous function, though? It can be printed and, I suppose, evaluated. At least in theory, whatever links it has to containing lexical contexts, should be possible to "detach" when writing the literal to disk, to be read later. The issue with doing this at the level of xref--create-fetcher, is that the addition becomes specific to the Xref searches only (find definitions/references), and the more generic Xref UI infrastructure remains unsupported (such as 'M-x project-find-regexp' or whatever calls to xref-show-xrefs exist in third-party packages) -- so those Xref buffers would remain not bookmark-able, or they will each require specialized code like the one you proposed here.