[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#37883: 27.0.50; read-file-name: Scrambled INITIAL
From: |
Michael Albinus |
Subject: |
bug#37883: 27.0.50; read-file-name: Scrambled INITIAL |
Date: |
Wed, 23 Oct 2019 15:20:45 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
Michael Heerdegen <michael_heerdegen@web.de> writes:
> Andreas Schwab <schwab@suse.de> writes:
>
>> > in emacs -Q (with default-directory -> ~/)
>> >
>> > (read-file-name-default "File: " nil nil nil "~/.bash_history" nil)
>> >
>> > prompts with default minibuffer contents "/:~/~/.bash_history". No part
>> > of that is shadowed (to indicate which part is meaningful). Without
>> > fully understanding how the initial contents are calculated, it doesn't
>> > seem very useful with the doubled ~/. Why can't INITIAL be used
>> > literally?
>>
>> I think INITIAL is supposed to be a file name component, not a full file
>> name. (The manual also discourages the use of INITIAL.)
>
> I have no clue. The manual describes INITIAL as "initial file name".
The docstring of `read-file-name' says
--8<---------------cut here---------------start------------->8---
If DEFAULT-FILENAME is omitted or nil, then if INITIAL is non-nil, the
default is DIR combined with INITIAL
--8<---------------cut here---------------end--------------->8---
> Regards,
>
> Michael.
Best regards, Michael.
bug#37883: 27.0.50; read-file-name: Scrambled INITIAL, Michael Heerdegen, 2019/10/23