GNU bug report logs - #28513
25.1; ido insists on guessing the wrong directory

Previous Next

Package: emacs;

Reported by: Guillaume Salagnac <guillaume.salagnac <at> gmail.com>

Date: Tue, 19 Sep 2017 15:29:01 UTC

Severity: minor

Tags: fixed

Found in version 25.1

Fixed in version 28.1

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: Dmitry Gutov <dgutov <at> yandex.ru>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Guillaume Salagnac <guillaume.salagnac <at> gmail.com>, 28513 <at> debbugs.gnu.org
Subject: bug#28513: 25.1; ido insists on guessing the wrong directory
Date: Thu, 17 Dec 2020 13:54:58 +0200
On 17.12.2020 13:33, Lars Ingebrigtsen wrote:
> I've read the doc string again -- I didn't think the current behaviour
> was documented, but it is:
> 
> ---
> If DEFAULT-FILENAME is omitted or
> nil, then if INITIAL is non-nil, the default is DIR combined with
> INITIAL; otherwise, if the current buffer is visiting a file,
> that file serves as the default; otherwise, the default is simply
> the string inserted into the minibuffer.
> ---

That's the doc for read-file-name, so another option would be to pass an 
explicit third argument from write-file to read-file-name.

> So it's documented that buffer-file-name is the default value, no matter
> what default-directory is.
> 
> I guess the fix here has to be in ido itself, and it'll have to
> special-case write-file.
> 
> [time passes]
> 
> OK, now done in Emacs 28, and the test case now works better, and there
> probably shouldn't be a lot of regressions here...

But this works too. Thanks!




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

Previous Next


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