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: Fri, 09 Dec 2022 09:38:34 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu)

>> I'm not quite sure what Juri meant here.  If from some project I do
>>
>>   C-x p f /tmp RET RET
>>
>> then Emacs opens the /tmp dired buffer (RET twice because REQUIRE-MATCH
>> is 'confirm), as I think it should.
>
> Actually, that [Confirm] part is not quite a hassle, so your patch
> already handles that in both ways, thanks for this.

After stumbling on this confirmation snag every time while using 'C-x p f M-p',
I have to admit this is still a hassle that needs to be avoided in some way.

One solution would be to write a confirmation function instead of using
the symbol 'confirm' for completing-read in project--completing-read-strict.
Such a function could check if the filename is absolute and not require
confirmation in this case.

Another solution would be to add absolute filenames to the history
'file-name-history' used by 'C-x C-f'.  Then add relative filenames
to another history e.g. 'project-file-name-history' that will be used
only by 'C-x p f'.





reply via email to

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