Subject: Re: bug#28513: 25.1; ido insists on guessing the wrong directory

From: Lars Ingebrigtsen <[email-masked]>
Date: Sat, 12 Dec 2020 13:10:23 +0100

Guillaume Salagnac <[email-masked]> writes:

> emacs -Q
> M-x ido-mode

[...]

> expected behaviour: emacs may or may not ask for a confirmation here, but eventually it should save my buffer as ~/Desktop/filename (as is the case with M-x write-file)
>
> actual behaviour: emacs decides that I actually didn't want to change directories and says: File '~/filename' exists; overwrite ? I can choose either "cancel" or "confirm" but neither lead to the correct result.
>
> Is this indeed a bug, or am I missing something obvious ?

(This bug report unfortunately didn't get any response at the time.)

I can confirm that this odd behaviour is still present in Emacs 28.  It
seems like a bug to me -- the prompt says "Write file: ~/Documents/",
but hitting RET insists on writing to `default-directory' in the buffer.

I don't use ido-mode for files normally -- are there any ido users here
that do?  If so, does this seem like expected behaviour to you?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no