From mboxrd@z Thu Jan  1 00:00:00 1970
Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail
From: Juri Linkov <juri@linkov.net>
Newsgroups: gmane.emacs.bugs
Subject: bug#68958: [PATCH] Support bookmarking Xref results buffers
Date: Thu, 15 Feb 2024 09:58:19 +0200
Organization: LINKOV.NET
Message-ID: <86il2qxg5c.fsf@mail.linkov.net>
References: <m1h6ilgxee.fsf@dazzs-mbp.home> <86le7wzcjj.fsf@gnu.org>
 <0b3f4669-180e-466f-96f3-7eeae994581f@gutov.dev>
 <m1cyt35xrj.fsf@dazzs-mbp.home>
 <b521e786-377c-4834-be68-87a824ae6384@gutov.dev>
 <m14jee5341.fsf@dazzs-mbp.home>
 <1bea3fe4-51aa-418b-a55f-f09d0a4c558e@gutov.dev>
Mime-Version: 1.0
Content-Type: text/plain
Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214";
	logging-data="33573"; mail-complaints-to="usenet@ciao.gmane.io"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu)
Cc: Eli Zaretskii <eliz@gnu.org>, Eshel Yaron <me@eshelyaron.com>,
 68958@debbugs.gnu.org
To: Dmitry Gutov <dmitry@gutov.dev>
Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Feb 15 09:56:02 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 1raXXG-0008bx-7u
	for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 15 Feb 2024 09:56:02 +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 1raXWz-0002vF-Vv; Thu, 15 Feb 2024 03:55:46 -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 1raXWy-0002v0-3A
 for bug-gnu-emacs@gnu.org; Thu, 15 Feb 2024 03:55:44 -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 1raXWx-00059P-Qz
 for bug-gnu-emacs@gnu.org; Thu, 15 Feb 2024 03:55:43 -0500
Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2)
 (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1raXXG-0001GF-AL
 for bug-gnu-emacs@gnu.org; Thu, 15 Feb 2024 03:56:02 -0500
X-Loop: help-debbugs@gnu.org
Resent-From: Juri Linkov <juri@linkov.net>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
Resent-CC: bug-gnu-emacs@gnu.org
Resent-Date: Thu, 15 Feb 2024 08:56:02 +0000
Resent-Message-ID: <handler.68958.B68958.17079873524829@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.17079873524829
 (code B ref 68958); Thu, 15 Feb 2024 08:56:02 +0000
Original-Received: (at 68958) by debbugs.gnu.org; 15 Feb 2024 08:55:52 +0000
Original-Received: from localhost ([127.0.0.1]:54095 helo=debbugs.gnu.org)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
 id 1raXX5-0001Fp-QS
 for submit@debbugs.gnu.org; Thu, 15 Feb 2024 03:55:52 -0500
Original-Received: from relay8-d.mail.gandi.net ([217.70.183.201]:40215)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@linkov.net>) id 1raXX4-0001Fb-2w
 for 68958@debbugs.gnu.org; Thu, 15 Feb 2024 03:55:50 -0500
Original-Received: by mail.gandi.net (Postfix) with ESMTPSA id E9D641BF205;
 Thu, 15 Feb 2024 08:55:23 +0000 (UTC)
In-Reply-To: <1bea3fe4-51aa-418b-a55f-f09d0a4c558e@gutov.dev> (Dmitry Gutov's
 message of "Mon, 12 Feb 2024 01:01:28 +0200")
X-GND-Sasl: juri@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" <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:280051
Archived-At: <http://permalink.gmane.org/gmane.emacs.bugs/280051>

> Also, we'd probably want to limit the size of the printed representation
> (FETCHER created by project-find-regexp currently closes over the full list
> of files, that's too much to save; it will probably be a good idea to
> rewrite it to fetch the list of files anew).

Indeed, I confirm the problem: reverting an xref buffer with 'g'
can't find matches in a new file added after the first run.

Doesn't this hint that both a bookmark and a revert function
should store more high-level arguments?  For example, for
'project-find-regexp' it should be sufficient to store
its argument 'regexp' together with 'default-directory'
to reconstruct the previous xref buffer contents.
Then it could store these arguments in a buffer-local variable
that could be used to create a bookmark.

PS: With C-u 'project-find-regexp' reads more arguments
in the body, but such reading should be moved to the
interactive form anyway like 'rgrep' does.