[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#16747: 24.3.50; ido-find-file with ido-use-filename-at-point in dire
From: |
Dmitry Gutov |
Subject: |
bug#16747: 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 rgm@gnu.org-20140207032552-3ycw6hai2zl7yynq
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))
- bug#16747: 24.3.50; ido-find-file with ido-use-filename-at-point in dired inserts directory at point twice,
Dmitry Gutov <=