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: Mon, 12 Feb 2024 00:45:47 +0200 Message-ID: <378d3773-c8d9-4048-ac14-6dee0c2c290d@gutov.dev> References: <868r3wi57v.fsf@mail.linkov.net> <53a9fafc-7b2a-485e-b6c1-df3f372b60e2@gutov.dev> <86a5o6yk94.fsf@mail.linkov.net> 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="27857"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: Eshel Yaron , 68958@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Feb 11 23:46:56 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 1rZIb9-00071a-VK for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 11 Feb 2024 23:46:56 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rZIb3-0002aX-J1; Sun, 11 Feb 2024 17:46:49 -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 1rZIaz-0002a1-O9 for bug-gnu-emacs@gnu.org; Sun, 11 Feb 2024 17:46:45 -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 1rZIaz-00049S-G9 for bug-gnu-emacs@gnu.org; Sun, 11 Feb 2024 17:46:45 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rZIbF-0007TF-Th for bug-gnu-emacs@gnu.org; Sun, 11 Feb 2024 17:47:01 -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 22:47:01 +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.170769157328553 (code B ref 68958); Sun, 11 Feb 2024 22:47:01 +0000 Original-Received: (at 68958) by debbugs.gnu.org; 11 Feb 2024 22:46:13 +0000 Original-Received: from localhost ([127.0.0.1]:55362 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rZIaT-0007QR-9M for submit@debbugs.gnu.org; Sun, 11 Feb 2024 17:46:13 -0500 Original-Received: from wout5-smtp.messagingengine.com ([64.147.123.21]:59603) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rZIaR-0007Q5-Lw for 68958@debbugs.gnu.org; Sun, 11 Feb 2024 17:46:12 -0500 Original-Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.west.internal (Postfix) with ESMTP id 46BEF3200A88; Sun, 11 Feb 2024 17:45:49 -0500 (EST) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Sun, 11 Feb 2024 17:45:49 -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=1707691548; x=1707777948; bh=tpz48uGtWuyZGgQC+0OUFcyc4xdP/pbWcUndh62wXoc=; b= VWjezlNjN12eB0y+GgvuE/k0/wzvfvyqAj0ecxtWdP9jIBkdePnb+W3HHE0dW9KC l8/35jLZ8VHmfN0JAl9NxfebbEycVUoDo1lNQG163bM5vM9McuCEDEjRYb6DRswR QbsG0V0I2LNWXGosy4AgAk9t/oOViqqb+zqABkshXfPxOk53vPQbfhHPikIqWqPE J5QtIW27utPfOdgZHvu0ZF9VLPftGv/xq7Ka5O+DT3pW5eXX6TWczsU5w7wNzHB+ SP02YTFJZPKQI0Zkf0ykP/TSoJZlGkrLqAiwlmBx+bLspu/gberP+ud8j7a/g7hG C1Zk6LuWWYsnSuOhLZc6RA== 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=1707691548; x= 1707777948; bh=tpz48uGtWuyZGgQC+0OUFcyc4xdP/pbWcUndh62wXoc=; b=U QySaOwp4vyW/1njJTMrUk2amYtfYMeGbDUetbBV2p8xk+D+kfxzLuy2Bri2oX+6+ uP7epcuQbbNFW6lIP3jBiPrZ1hek61qConOQIj66iMpxszNGIo9tZ4Kj2pIUyU1p w/d/Qv4cikWLvXY7izI7KMSUejkex0Sulb1DYfk8zQNy/XUPDLcCbJYHDJxQ2fMS wCMcUAkUQfZxWNaVsItYFk+ByK7GA6b5aMicNqRtC43Td4ofIXYb961IGgDZ1jEQ +4oIFCs7CxHevR7ELu5Qwt4TgbjCzcfyYzFZZUmkmHQ0On3fAb/PpuLk+IzxyrwM HLPhd/c44pY6KnDRWZ+Og== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledruddvgddtvdcutefuodetggdotefrodftvf 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 17:45:47 -0500 (EST) Content-Language: en-US In-Reply-To: <86a5o6yk94.fsf@mail.linkov.net> 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:279876 Archived-At: On 11/02/2024 19:37, Juri Linkov wrote: >>> I once tried to use 'revert-buffer-function' to restore >>> xref buffers from the desktop, but abandoned the idea. >>> Not because xref.el doesn't set 'revert-buffer-function'. >>> But because it would take too much time to restore >>> the desktop while it will rerun all saved xref buffers. >>> OTOH, saving an xref bookmark makes more sense. >>> And probably your patch will help to implement >>> 'revert-buffer-function' for xref as well. >> I don't think bookmark would save the whole buffer contents. Would it? >> Otherwise, re-running the search(es) seems inevitable. > Indeed, saving the buffer contents of transient buffers > either to the bookmark or to the desktop makes no sense. > So re-running the command is inevitable. > > But then I can't imagine how would it be possible > to move point to its saved location when initially > a restored buffer is empty before re-running the command. As long as the search is performed synchronously, first you "revert" the buffer and then move point. Right?