From: Dmitry Gutov <dgutov@yandex.ru>
To: 16747@debbugs.gnu.org
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 [thread overview]
Message-ID: <871tz61b6b.fsf@yandex.ru> (raw)
[-- Attachment #1: Type: text/plain, Size: 494 bytes --]
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
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: ido-use-filename-at-point.diff --]
[-- Type: text/x-diff, Size: 1173 bytes --]
=== 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))
next reply other threads:[~2014-02-14 6:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-14 6:05 Dmitry Gutov [this message]
2014-02-14 6:52 ` bug#16747: 24.3.50; ido-find-file with ido-use-filename-at-point in dired inserts directory at point twice Leo Liu
2014-02-14 12:18 ` Dmitry Gutov
2014-02-15 9:36 ` Leo Liu
2014-02-16 4:17 ` Dmitry Gutov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=871tz61b6b.fsf@yandex.ru \
--to=dgutov@yandex.ru \
--cc=16747@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).