unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* ido-vc-dir anyone?
@ 2011-08-25 15:53 Deniz Dogan
  2011-08-26 10:19 ` Leo
  0 siblings, 1 reply; 6+ messages in thread
From: Deniz Dogan @ 2011-08-25 15:53 UTC (permalink / raw)
  To: emacs-devel

[-- 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.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: ido-vc-dir anyone?
  2011-08-25 15:53 ido-vc-dir anyone? Deniz Dogan
@ 2011-08-26 10:19 ` Leo
  2011-08-26 11:48   ` Deniz Dogan
  0 siblings, 1 reply; 6+ messages in thread
From: Leo @ 2011-08-26 10:19 UTC (permalink / raw)
  To: emacs-devel

On 2011-08-25 23:53 +0800, Deniz Dogan wrote:
> 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?

Why do we need this? I just tried vc-dir and when ido-mode is used, it
is already very convenient to use.

Leo




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: ido-vc-dir anyone?
  2011-08-26 10:19 ` Leo
@ 2011-08-26 11:48   ` Deniz Dogan
  2011-08-26 12:41     ` Leo
  0 siblings, 1 reply; 6+ messages in thread
From: Deniz Dogan @ 2011-08-26 11:48 UTC (permalink / raw)
  To: emacs-devel

On 08/26/2011 12:19 PM, Leo wrote:
> On 2011-08-25 23:53 +0800, Deniz Dogan wrote:
>> 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?
> Why do we need this? I just tried vc-dir and when ido-mode is used, it
> is already very convenient to use.

When I do vc-dir with ido-mode, I don't get ido-read-file-name, just the 
plain old read-file-name.




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: ido-vc-dir anyone?
  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
  0 siblings, 2 replies; 6+ messages in thread
From: Leo @ 2011-08-26 12:41 UTC (permalink / raw)
  To: emacs-devel

On 2011-08-26 19:48 +0800, Deniz Dogan wrote:
> When I do vc-dir with ido-mode, I don't get ido-read-file-name, just
> the plain old read-file-name.

You probably don't have ido-everywhere.
See example: http://i.imgur.com/xyCOf.png

Leo




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: ido-vc-dir anyone?
  2011-08-26 12:41     ` Leo
@ 2011-08-26 12:51       ` Richard Riley
  2011-08-26 15:05       ` Deniz Dogan
  1 sibling, 0 replies; 6+ messages in thread
From: Richard Riley @ 2011-08-26 12:51 UTC (permalink / raw)
  To: emacs-devel

Leo <sdl.web@gmail.com> writes:

> On 2011-08-26 19:48 +0800, Deniz Dogan wrote:
>> When I do vc-dir with ido-mode, I don't get ido-read-file-name, just
>> the plain old read-file-name.
>
> You probably don't have ido-everywhere.
> See example: http://i.imgur.com/xyCOf.png

Possibly you have a working patch so that ido completion will work with
tags files when using "find-tag" (M .) ?

cheers

r.




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: ido-vc-dir anyone?
  2011-08-26 12:41     ` Leo
  2011-08-26 12:51       ` Richard Riley
@ 2011-08-26 15:05       ` Deniz Dogan
  1 sibling, 0 replies; 6+ messages in thread
From: Deniz Dogan @ 2011-08-26 15:05 UTC (permalink / raw)
  To: emacs-devel

On 08/26/2011 02:41 PM, Leo wrote:
> On 2011-08-26 19:48 +0800, Deniz Dogan wrote:
>> When I do vc-dir with ido-mode, I don't get ido-read-file-name, just
>> the plain old read-file-name.
> You probably don't have ido-everywhere.
> See example: http://i.imgur.com/xyCOf.png

You are right, I did not know about this functionality.




^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-08-26 15:05 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-25 15:53 ido-vc-dir anyone? Deniz Dogan
2011-08-26 10:19 ` 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

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).