From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#19450: 25.0.50; In vc-dir display file in other window Date: Sat, 27 Dec 2014 03:10:47 +0200 Organization: LINKOV.NET Message-ID: <87ppb5j3s8.fsf@mail.linkov.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1419642741 9106 80.91.229.3 (27 Dec 2014 01:12:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 27 Dec 2014 01:12:21 +0000 (UTC) To: 19450@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Dec 27 02:12:12 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Y4fvO-00079U-Ph for geb-bug-gnu-emacs@m.gmane.org; Sat, 27 Dec 2014 02:12:11 +0100 Original-Received: from localhost ([::1]:54762 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y4fvN-00078b-SE for geb-bug-gnu-emacs@m.gmane.org; Fri, 26 Dec 2014 20:12:09 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55260) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y4fvL-00078U-10 for bug-gnu-emacs@gnu.org; Fri, 26 Dec 2014 20:12:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y4fvH-0004Nu-0O for bug-gnu-emacs@gnu.org; Fri, 26 Dec 2014 20:12:06 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:49126) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y4fvG-0004Nq-UA for bug-gnu-emacs@gnu.org; Fri, 26 Dec 2014 20:12:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Y4fvG-00057E-KX for bug-gnu-emacs@gnu.org; Fri, 26 Dec 2014 20:12:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 27 Dec 2014 01:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 19450 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.141964268319602 (code B ref -1); Sat, 27 Dec 2014 01:12:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 27 Dec 2014 01:11:23 +0000 Original-Received: from localhost ([127.0.0.1]:58492 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y4fuc-000565-JI for submit@debbugs.gnu.org; Fri, 26 Dec 2014 20:11:22 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:53490) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y4fua-00055w-56 for submit@debbugs.gnu.org; Fri, 26 Dec 2014 20:11:20 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y4fuY-0004Fp-R4 for submit@debbugs.gnu.org; Fri, 26 Dec 2014 20:11:19 -0500 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:34357) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y4fuY-0004Fl-Ow for submit@debbugs.gnu.org; Fri, 26 Dec 2014 20:11:18 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55212) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y4fuX-00075W-N7 for bug-gnu-emacs@gnu.org; Fri, 26 Dec 2014 20:11:18 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y4fuT-0004EQ-Kf for bug-gnu-emacs@gnu.org; Fri, 26 Dec 2014 20:11:17 -0500 Original-Received: from ps18281.dreamhost.com ([69.163.222.226]:60999 helo=ps18281.dreamhostps.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y4fuT-0004Dq-Eo for bug-gnu-emacs@gnu.org; Fri, 26 Dec 2014 20:11:13 -0500 Original-Received: from localhost.linkov.net (ps18281.dreamhostps.com [69.163.222.226]) by ps18281.dreamhostps.com (Postfix) with ESMTP id F3CDE30A2110F1 for ; Fri, 26 Dec 2014 17:11:09 -0800 (PST) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (x86_64-pc-linux-gnu) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:97750 Archived-At: 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)