bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#58447: [PATCH] In project-find-file, add absolute file name to histo


From: Dmitry Gutov
Subject: bug#58447: [PATCH] In project-find-file, add absolute file name to history
Date: Fri, 16 Dec 2022 00:50:58 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2

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!





reply via email to

[Prev in Thread] Current Thread [Next in Thread]