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

From: Juri Linkov <[email-masked]>
Date: Fri, 09 Dec 2022 09:38:34 +0200

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