From: Deniz Dogan <deniz@dogan.se>
To: emacs-devel@gnu.org
Subject: ido-vc-dir anyone?
Date: Thu, 25 Aug 2011 17:53:47 +0200 [thread overview]
Message-ID: <4E56700B.9010108@dogan.se> (raw)
[-- Attachment #1: Type: text/plain, Size: 245 bytes --]
Attached is a patch suggestion which implements `ido-vc-dir' which is an
ido replacement for `vc-dir'. There is some code duplication (copied
straight from the definition of `vc-dir'), which we probably don't want.
What do you think?
Deniz
[-- Attachment #2: ido-vc-dir.patch --]
[-- Type: text/plain, Size: 1254 bytes --]
=== modified file 'lisp/ido.el'
--- lisp/ido.el 2011-08-04 00:58:07 +0000
+++ lisp/ido.el 2011-08-25 15:52:09 +0000
@@ -1533,6 +1533,7 @@
(define-key map [remap insert-file] 'ido-insert-file)
(define-key map [remap list-directory] 'ido-list-directory)
(define-key map [remap dired] 'ido-dired)
+ (define-key map [remap vc-dir] 'ido-vc-dir)
(define-key map [remap find-file-other-window]
'ido-find-file-other-window)
(define-key map [remap find-file-read-only-other-window]
@@ -4245,6 +4246,23 @@
(ido-auto-merge-work-directories-length -1))
(ido-file-internal 'dired 'dired nil "Dired: " 'dir)))
+(defun ido-vc-dir (dir &optional backend)
+ "Call `vc-dir' the ido way.
+The directory is selected interactively by typing a substring.
+For details of keybindings, see `vc-dir'."
+ (interactive
+ (list
+ (file-truename
+ (ido-read-directory-name "VC status for directory: "))
+ (if current-prefix-arg
+ (intern
+ (completing-read
+ "Use VC backend: "
+ (mapcar (lambda (b) (list (symbol-name b)))
+ vc-handled-backends)
+ nil t nil nil)))))
+ (vc-dir dir backend))
+
(defun ido-list-directory ()
"Call `list-directory' the ido way.
The directory is selected interactively by typing a substring.
next reply other threads:[~2011-08-25 15:53 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-25 15:53 Deniz Dogan [this message]
2011-08-26 10:19 ` ido-vc-dir anyone? Leo
2011-08-26 11:48 ` Deniz Dogan
2011-08-26 12:41 ` Leo
2011-08-26 12:51 ` Richard Riley
2011-08-26 15:05 ` Deniz Dogan
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=4E56700B.9010108@dogan.se \
--to=deniz@dogan.se \
--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 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).