GNU bug report logs - #58447
[PATCH] In project-find-file, add absolute file name to history

Previous Next

Package: emacs;

Reported by: Augusto Stoffel <arstoffel <at> gmail.com>

Date: Tue, 11 Oct 2022 18:30:02 UTC

Severity: normal

Tags: patch

Done: Dmitry Gutov <dgutov <at> yandex.ru>

Bug is archived. No further changes may be made.

Full log


Message #169 received at 58447 <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Juri Linkov <juri <at> linkov.net>
Cc: Eli Zaretskii <eliz <at> gnu.org>, Augusto Stoffel <arstoffel <at> gmail.com>,
 58447 <at> debbugs.gnu.org
Subject: Re: bug#58447: [PATCH] In project-find-file, add absolute file name
 to history
Date: Fri, 16 Dec 2022 00:50:58 +0200
On 15/12/2022 19:21, Juri Linkov wrote:
>>> In fact I think v2 already is a completely satisfactory implementation
>>> the project-local file history feature.
>>
>> It seems like there are two incompatible behaviors here and you and Juri
>> want. One is to filter by current project, and another to be able to reuse
>> previous inputs freely.
>>
>> If forced to choose, I would be slightly inclined toward the latter (which
>> could be implemented using text properties, although the concept is
>> a little awkward). But both are reasonable.
>>
>> I think we should install one of them and then later (on master) add a user
>> option to switch to the other behavior.
> 
> I agree with Augusto that filtering that implements project-local history
> should be the default behavior for emacs-29.  I tried your second patch
> and it nicely handles even such sequences as `C-x p f' and `C-x p F'.
> (and in the opposite direction from `C-x p F' to `C-x p f' it
> filters out external files, that is expected and consistent.)

That sounds like a consensus, then. I've pushed the v2 patch to emacs-29.

> OTOH, `C-x p f M-p' in another project is not my primary workflow.
> But if someone wants to keep a plain history, this could be added
> later in master, e.g. by a new value of project-read-file-name-function
> and a function that is mostly a copy of project--read-file-cpd-relative.
> 
> BTW, in a fresh emacs -Q `C-x p f' raises:
>    Debugger entered--Lisp error: (void-function cl-find-if)
> But not sure how important is this case since usually `C-x p f'
> is invoked on a project's file when project.el with cl is loaded.

...and included a fix for this too. Thanks!




This bug report was last modified 2 years and 232 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.