emacs-bug-tracker
[Top][All Lists]
Advanced

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

[debbugs-tracker] bug#19450: closed (25.0.50; In vc-dir display file in


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#19450: closed (25.0.50; In vc-dir display file in other window)
Date: Mon, 29 Dec 2014 00:48:02 +0000

Your message dated Mon, 29 Dec 2014 02:47:15 +0200
with message-id <address@hidden>
and subject line Re: bug#19450: 25.0.50; In vc-dir display file in other window
has caused the debbugs.gnu.org bug report #19450,
regarding 25.0.50; In vc-dir display file in other window
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
19450: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=19450
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: 25.0.50; In vc-dir display file in other window Date: Sat, 27 Dec 2014 03:10:47 +0200 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (x86_64-pc-linux-gnu)
This patch adds the standard keybinding `C-o' to vc-dir:

diff --git a/lisp/vc/vc-dir.el b/lisp/vc/vc-dir.el
index 54496b9..c90bf1c 100644
--- a/lisp/vc/vc-dir.el
+++ b/lisp/vc/vc-dir.el
@@ -169,6 +169,9 @@ (defvar vc-dir-menu-map
     (define-key map [ise]
       '(menu-item "Isearch Files..." vc-dir-isearch
                  :help "Incremental search a string in the marked files"))
+    (define-key map [display]
+      '(menu-item "Display in Other Window" vc-dir-display-file
+                 :help "Display the file on the current line, in another 
window"))
     (define-key map [open-other]
       '(menu-item "Open in Other Window" vc-dir-find-file-other-window
                  :help "Find the file on the current line, in another window"))
@@ -273,6 +276,7 @@ (defvar vc-dir-mode-map
     (define-key map "e" 'vc-dir-find-file) ; dired-mode compatibility
     (define-key map "\C-m" 'vc-dir-find-file)
     (define-key map "o" 'vc-dir-find-file-other-window)
+    (define-key map "\C-o" 'vc-dir-display-file)
     (define-key map "\C-c\C-c" 'vc-dir-kill-dir-status-process)
     (define-key map [down-mouse-3] 'vc-dir-menu)
     (define-key map [mouse-2] 'vc-dir-toggle-mark)
@@ -755,6 +759,13 @@ (defun vc-dir-find-file-other-window (&optional event)
   (if event (posn-set-point (event-end event)))
   (find-file-other-window (vc-dir-current-file)))
 
+(defun vc-dir-display-file (&optional event)
+  "Display the file on the current line, in another window."
+  (interactive (list last-nonmenu-event))
+  (if event (posn-set-point (event-end event)))
+  (display-buffer (find-file-noselect (vc-dir-current-file))
+                 t))
+
 (defun vc-dir-isearch ()
   "Search for a string through all marked buffers using Isearch."
   (interactive)



--- End Message ---
--- Begin Message --- Subject: Re: bug#19450: 25.0.50; In vc-dir display file in other window Date: Mon, 29 Dec 2014 02:47:15 +0200 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (x86_64-pc-linux-gnu)
>> `vc-dir-display-file' is intended to provide consistency with
>> all other similar commands:
>
> Ok, that makes sense.

So let it be.


--- End Message ---

reply via email to

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