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: Augusto Stoffel
Subject: bug#58447: [PATCH] In project-find-file, add absolute file name to history
Date: Wed, 14 Dec 2022 20:32:46 +0100
User-agent: Gnus/5.13 (Gnus v5.13)

On Wed, 14 Dec 2022 at 20:45, Dmitry Gutov wrote:

> On 14/12/2022 18:47, Augusto Stoffel wrote:
>> On the other hand, your trick works by accident.  If you switch between
>> unrelated projects, then 'C-x p f M-p' brings up a non-existing file.
>> One might say each project should have its own history, but then it's
>> not clear whether/when equally named projects in different locations
>> should count as "the same" project.
>
> Perhaps the first step to resolving all this is for project-find-file
> to use a different history variable than find-file.

This is fine by me, but do you feel confident such a variable will be
a good design for the long run?  In particular, have you discarded the
idea of per-project history variables?

The advantage of my suggestion (filter the file-name-history on the fly)
is that no new variables need to be defined, so nothing needs to be
obsoleted and phased out if we change our minds.

> Which makes sense, given that one (usually) uses relative file names,
> and the other -- absolute ones.
>
> Maybe project--read-file-absolute could continue using the current
> variable, too.
>
> As a result, all projects will share history, for good and
> bad. Perhaps next we could do something about that, e.g. if the
> history iteration could allow pre-filtering, we could also filter out
> non-existing files.

This kind of filtering would be slower than the one I proposed, and
prohibitively slow over Tramp, I think.





reply via email to

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