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: Juri Linkov
Subject: bug#58447: [PATCH] In project-find-file, add absolute file name to history
Date: Thu, 15 Dec 2022 19:21:14 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu)

>> 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.)

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.





reply via email to

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