GNU bug report logs -
#21087
24.5; ff-find-other-file will create a file with an extra trailling backslash
Previous Next
Reported by: ".." <akml <at> 163.com>
Date: Sat, 18 Jul 2015 17:20:02 UTC
Severity: minor
Found in version 24.5
Done: Stefan Kangas <stefan <at> marxist.se>
Bug is archived. No further changes may be made.
Full log
Message #11 received at 21087 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi Eli,
Yes, you are right, then why it calls read-directory-name with default-name as the DEFAULT-DIRNAME parameter while default-name is actually the name of the file to find. And the patch will come to this:
--- emacs\share\emacs\24.5\lisp\find-file.el
+++ emacs\share\emacs\24.5\lisp\find-file.el
@@ -497,7 +497,7 @@
(expand-file-name
(read-directory-name
(format "Find or create %s in: " default-name)
- default-directory default-name nil)))
+ default-directory)))
(setq pathname
(if (file-directory-p name)
At 2015-07-19 01:40:52, "Eli Zaretskii" <eliz <at> gnu.org> wrote:
>> Date: Sat, 18 Jul 2015 23:47:15 +0800 (CST)
>> From: ".." <akml <at> 163.com>
>>
>> It jumps out that ff-find-other-file will create the expecting file name with
>> an extra
>> trailling backslash, which makes the the newly opened buffer as directory.
>> This happens after I updated all the 3rd party packages to the
>> latest version. Although I havn't found out which package caused this
>> issue, but the following patch will fix it, and I think it makes
>> more sense to use read-file-name than read-directory-name
>>
>> --- emacs\share\emacs\24.5\lisp\find-file.el
>> +++ emacs\share\emacs\24.5\lisp\find-file.el
>> @@ -495,7 +495,7 @@
>> (setq name
>> (expand-file-name
>> - (read-directory-name
>> + (read-file-name
>> (format "Find or create %s in: " default-name)
>> default-directory default-name nil)))
>
>But that question is about the directory in which to create a file, so
>read-directory-name sounds about right to me.
[Message part 2 (text/html, inline)]
This bug report was last modified 4 years and 286 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.