[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#12492: Acknowledgement (24.2.50; Open vc-dir buffer easier and faste

From: Juri Linkov
Subject: bug#12492: Acknowledgement (24.2.50; Open vc-dir buffer easier and faster)
Date: Thu, 04 Jul 2019 23:25:27 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu)

>>> +(defun vc-root-dir ()
>> This is already defined in vc.el.
> True. The patch predated the introduction of that function.

Maybe better to add interactivity to the existing function
`vc-root-dir', i.e. to add a new arg `(&optional interactive)'
and add `(interactive "p")'.

BTW, I propose another useful command without a keybinding.
I have a habit of mistyping `v' in vc-dir to view a file like in dired.
That often has adverse effect.  So I rebound these keys in ~/.emacs
to a Dired-like command.  Maybe this command could be useful for anyone
who has the same problem:

diff --git a/lisp/vc/vc-dir.el b/lisp/vc/vc-dir.el
index 6afc599d4c..a6a87e51e3 100644
--- a/lisp/vc/vc-dir.el
+++ b/lisp/vc/vc-dir.el
@@ -784,6 +784,11 @@ vc-dir-display-file
   (display-buffer (find-file-noselect (vc-dir-current-file))
+(defun vc-dir-view-file ()
+  "Examine a file on the current line in view mode."
+  (interactive)
+  (view-file (vc-dir-current-file)))
 (defun vc-dir-isearch ()
   "Search for a string through all marked buffers using Isearch."

reply via email to

[Prev in Thread] Current Thread [Next in Thread]