GNU bug report logs - #47247
28.0.50; read-file-name: should display slash correctly in the prompt

Previous Next

Package: emacs;

Reported by: Jean Louis <bugs <at> gnu.support>

Date: Thu, 18 Mar 2021 18:20:02 UTC

Severity: minor

Tags: notabug

Found in version 28.0.50

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Jean Louis <bugs <at> gnu.support>, 47247 <at> debbugs.gnu.org
Subject: bug#47247: 28.0.50; read-file-name: should display slash correctly in the prompt
Date: Fri, 19 Mar 2021 09:04:50 +0100
Eli Zaretskii <eliz <at> gnu.org> 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.





This bug report was last modified 4 years and 65 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.