--- Begin Message ---
Subject: |
24.3.50; ido-find-file with ido-use-filename-at-point in dired inserts directory at point twice |
Date: |
Fri, 14 Feb 2014 08:05:32 +0200 |
Tags: patch
1. (setq ido-use-filename-at-point t)
2. M-x ido-mode
3. Open a Dired buffer, move point to a directory, press C-x C-f.
4. See the directory name inserted in the prompt both as directory and a
file name.
In GNU Emacs 24.3.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.8.6)
of 2014-02-07 on axl
Repository revision: 116299 address@hidden
Windowing system distributor `The X.Org Foundation', version 11.0.11405000
System Description: Ubuntu 13.10
=== modified file 'lisp/ido.el'
--- lisp/ido.el 2014-01-31 06:34:44 +0000
+++ lisp/ido.el 2014-02-14 05:59:01 +0000
@@ -2375,14 +2375,14 @@
(if (eq ido-use-filename-at-point 'guess)
(ffap-guesser)
(ffap-string-at-point))))
- (not (string-match "^http:/" fn))
- (let ((absolute-fn (expand-file-name fn)))
- (setq d (if (file-directory-p absolute-fn)
- (file-name-as-directory absolute-fn)
- (file-name-directory absolute-fn))))
- (file-directory-p d))
- (setq ido-current-directory d)
- (setq initial (file-name-nondirectory fn))))))
+ (not (string-match "^http:/" fn)))
+ (let ((absolute-fn (expand-file-name fn)))
+ (cond
+ ((file-directory-p absolute-fn)
+ (setq ido-current-directory (file-name-as-directory
absolute-fn)))
+ ((file-directory-p (file-name-directory absolute-fn))
+ (setq ido-current-directory (file-name-directory absolute-fn))
+ (setq initial (file-name-nondirectory absolute-fn)))))))))
(let (ido-saved-vc-hb
(vc-handled-backends (and (boundp 'vc-handled-backends)
vc-handled-backends))
--- End Message ---
--- Begin Message ---
Subject: |
Re: bug#16747: 24.3.50; ido-find-file with ido-use-filename-at-point in dired inserts directory at point twice |
Date: |
Sun, 16 Feb 2014 06:17:21 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 |
On 15.02.2014 11:36, Leo Liu wrote:
> Maybe
that separation should be done in ffap, which would make the glue code
in ido minimal. But maybe this is for another bug.
Yes, that's probably something for after 24.4.
Feel free to install your fix ;)
Done!
--- End Message ---