Subject: Re: bug#47247: 28.0.50; read-file-name: should display slash correctly in the prompt

From: Michael Albinus <[email-masked]>
Date: Fri, 19 Mar 2021 09:04:50 +0100

Eli Zaretskii <[email-masked]> writes:

>> When I do this:
>>
>> (read-file-name "File name for export: " (getenv "HOME") nil nil (concat "Location-Set-ID-" "731" ".gpx"))
>>
>> The file name in the prompt s displayed as:
>>
>> File name for export: ~Location-Set-ID-731.gpx
>>
>> without slash, rather than as:
>>
>> File name for export: ~/Location-Set-ID-731.gpx
>
> That's a cockpit error: you should run the directory through
> expand-file-name if you want to use (getenv "HOME") in that context.

Likely, it's not sufficient:

(expand-file-name "~") => "/home/albinus"

Better, run it through file-name-as-directory.

Best regards, Michael.