From: Vitalie Spinu <spinuvit@gmail.com>
To: emacs-devel@gnu.org
Subject: [PATCH] make ido show known tramp host in read-directory-name
Date: Tue, 19 Nov 2013 19:10:19 -0800 [thread overview]
Message-ID: <87iovnu5t0.fsf@gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 414 bytes --]
Hi,
Ido doesn't show known hosts with read-directory-name with tramp
directories. For example /ssh: or /ftp: show completions on
read-file-name, but not on read-directory-name. This simple patch fixes
that.
If I am not mistaken this was also a request of bug#10911:
http://emacs.1067599.n5.nabble.com/bug-10911-24-0-94-ido-read-directory-name-should-offer-known-hosts-for-completion-td4703.html
Vitalie
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-make-ido-make-dir-list-1-show-known-host.patch --]
[-- Type: text/x-diff, Size: 997 bytes --]
From eeb19169db1e0b3223abfe0e9ed3e76ddcbaa21a Mon Sep 17 00:00:00 2001
From: Vitalie Spinu <spinuvit@gmail.com>
Date: Tue, 19 Nov 2013 18:52:35 -0800
Subject: [PATCH 1/1] make ido-make-dir-list-1 show known host
ido-final-slash checks for tramp directory and acts accordingly, but
it never gets the full directory name when it is called from
ido-make-dir-list-1.
---
lisp/ido.el | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lisp/ido.el b/lisp/ido.el
index 42b3607..f6104a6 100644
--- a/lisp/ido.el
+++ b/lisp/ido.el
@@ -3676,7 +3676,8 @@ If MERGED is non-nil, each subdir is cons'ed with DIR."
(delq nil
(mapcar
(lambda (name)
- (and (ido-final-slash name) (not (ido-ignore-item-p name ido-ignore-directories))
+ (and (ido-final-slash (concat dir name))
+ (not (ido-ignore-item-p name ido-ignore-directories))
(if merged (cons name dir) name)))
(ido-file-name-all-completions dir)))))
--
1.8.1.2
next reply other threads:[~2013-11-20 3:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-20 3:10 Vitalie Spinu [this message]
2013-11-20 13:29 ` [PATCH] make ido show known tramp host in read-directory-name Stefan Monnier
2013-11-20 21:44 ` Vitalie Spinu
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87iovnu5t0.fsf@gmail.com \
--to=spinuvit@gmail.com \
--cc=emacs-devel@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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.