From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Deniz Dogan Newsgroups: gmane.emacs.devel Subject: ido-vc-dir anyone? Date: Thu, 25 Aug 2011 17:53:47 +0200 Message-ID: <4E56700B.9010108@dogan.se> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------020903030005070702010209" X-Trace: dough.gmane.org 1314287743 18719 80.91.229.12 (25 Aug 2011 15:55:43 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 25 Aug 2011 15:55:43 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Aug 25 17:55:37 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QwcHI-0005vx-Pm for ged-emacs-devel@m.gmane.org; Thu, 25 Aug 2011 17:55:36 +0200 Original-Received: from localhost ([::1]:52307 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QwcHI-0000Yp-CK for ged-emacs-devel@m.gmane.org; Thu, 25 Aug 2011 11:55:36 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:42848) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QwcHF-0000Xh-OM for emacs-devel@gnu.org; Thu, 25 Aug 2011 11:55:34 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QwcHD-0002fK-Kj for emacs-devel@gnu.org; Thu, 25 Aug 2011 11:55:33 -0400 Original-Received: from ch-smtp04.sth.basefarm.net ([80.76.153.5]:58622) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QwcHD-0002Xb-3i for emacs-devel@gnu.org; Thu, 25 Aug 2011 11:55:31 -0400 Original-Received: from c80-216-105-155.bredband.comhem.se ([80.216.105.155]:54023 helo=[192.168.0.10]) by ch-smtp04.sth.basefarm.net with esmtp (Exim 4.76) (envelope-from ) id 1QwcGQ-0006ec-Cz for emacs-devel@gnu.org; Thu, 25 Aug 2011 17:54:43 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:6.0) Gecko/20110812 Thunderbird/6.0 X-Originating-IP: 80.216.105.155 X-Scan-Result: No virus found in message 1QwcGQ-0006ec-Cz. X-Scan-Signature: ch-smtp04.sth.basefarm.net 1QwcGQ-0006ec-Cz 8046784ba807397fc3e7eb3436d071fb X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.76.153.5 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:143581 Archived-At: This is a multi-part message in MIME format. --------------020903030005070702010209 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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 --------------020903030005070702010209 Content-Type: text/plain; name="ido-vc-dir.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="ido-vc-dir.patch" === 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. --------------020903030005070702010209--