{"thread":{"id":"43438","subject":"[PATCH 2/4] git.el: Added a function to open the current file in another window.","startedAt":"2006-11-03T16:41:46Z","lastAt":"2006-11-03T16:41:46Z","messageCount":1,"participants":["Alexandre Julliard"],"isPatch":true,"patchVersion":1,"patchTotal":4},"messages":[{"id":"294787","messageId":"878xis32k5.fsf@wine.dyndns.org","threadId":"43438","inReplyTo":null,"subject":"[PATCH 2/4] git.el: Added a function to open the current file in another window.","fromName":"Alexandre Julliard","fromEmail":"julliard@winehq.org","sentAt":"2006-11-03T16:41:46Z","receivedAt":"2006-11-03T16:41:46Z","isPatch":true,"sender":{"key":"julliard@winehq.org","avatar":null},"body":"Bound to 'o' by default, compatible with pcl-cvs and\nbuffer-mode. Suggested by Han-Wen Nienhuys.\n\nSigned-off-by: Alexandre Julliard <julliard@winehq.org>\n---\n contrib/emacs/git.el |   10 ++++++++++\n 1 files changed, 10 insertions(+), 0 deletions(-)\n\ndiff --git a/contrib/emacs/git.el b/contrib/emacs/git.el\nindex e283df2..08d6404 100644\n--- a/contrib/emacs/git.el\n+++ b/contrib/emacs/git.el\n@@ -910,6 +910,15 @@ and returns the process output as a stri\n     (when (eq 'unmerged (git-fileinfo->state info))\n       (smerge-mode))))\n \n+(defun git-find-file-other-window ()\n+  \"Visit the current file in its own buffer in another window.\"\n+  (interactive)\n+  (unless git-status (error \"Not in git-status buffer.\"))\n+  (let ((info (ewoc-data (ewoc-locate git-status))))\n+    (find-file-other-window (git-fileinfo->name info))\n+    (when (eq 'unmerged (git-fileinfo->state info))\n+      (smerge-mode))))\n+\n (defun git-find-file-imerge ()\n   \"Visit the current file in interactive merge mode.\"\n   (interactive)\n@@ -994,6 +1003,7 @@ and returns the process output as a stri\n     (define-key map \"M\"   'git-mark-all)\n     (define-key map \"n\"   'git-next-file)\n     (define-key map \"N\"   'git-next-unmerged-file)\n+    (define-key map \"o\"   'git-find-file-other-window)\n     (define-key map \"p\"   'git-prev-file)\n     (define-key map \"P\"   'git-prev-unmerged-file)\n     (define-key map \"q\"   'git-status-quit)\n-- \n1.4.3.3.gf3240\n\n-- \nAlexandre Julliard\n"}]}