* Key bindings for info in other window or frame
@ 2013-07-24 21:28 Matthias Meulien
2013-07-25 1:09 ` Stefan Monnier
0 siblings, 1 reply; 3+ messages in thread
From: Matthias Meulien @ 2013-07-24 21:28 UTC (permalink / raw)
To: bug-gnu-emacs; +Cc: emacs-devel
[-- Attachment #1: Type: text/plain, Size: 354 bytes --]
Severity: wishlist Tags: patch
Everything is in the subject!
The attached patch defines `info-other-frame' and bind it to `C-x
5 i'. It also bind `info-other-window' to `C-x 4 i'.
I know that `info-other-window' is already bind to `C-h 4 i' but I
found it more difficult to remember than the key binding which use
the ubiquitous `C-x 4' keymap.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Key bindings for info in other window or frame --]
[-- Type: text/x-diff, Size: 1590 bytes --]
From cf8d4210743c1c9b06db28e5b5bb5a51f8a190bf Mon Sep 17 00:00:00 2001
From: Matthias Meulien <orontee@gmail.com>
Date: Wed, 24 Jul 2013 23:23:44 +0200
Subject: [PATCH] lisp/info.el (info-other-window): Add key binding and other
frame defun
---
lisp/info.el | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/lisp/info.el b/lisp/info.el
index 0e0a117..99098e8 100644
--- a/lisp/info.el
+++ b/lisp/info.el
@@ -745,6 +745,7 @@ in `Info-file-supports-index-cookies-list'."
(not (member dir (split-string path ":" t)))
(push dir Info-directory-list)))))))
+;;;###autoload (define-key ctl-x-4-map "i" 'info-other-window)
;;;###autoload
(defun info-other-window (&optional file-or-node buffer)
"Like `info' but show the Info buffer in another window."
@@ -756,6 +757,18 @@ in `Info-file-supports-index-cookies-list'."
(info-setup file-or-node
(switch-to-buffer-other-window (or buffer "*info*"))))
+;;;###autoload (define-key ctl-x-5-map "i" 'info-other-frame)
+;;;###autoload
+(defun info-other-frame (&optional file-or-node buffer)
+ "Like `info' but put the Info buffer in another frame."
+ (interactive (list
+ (if (and current-prefix-arg (not (numberp current-prefix-arg)))
+ (read-file-name "Info file name: " nil nil t))
+ (if (numberp current-prefix-arg)
+ (format "*info*<%s>" current-prefix-arg))))
+ (info-setup file-or-node
+ (switch-to-buffer-other-frame (or buffer "*info*"))))
+
;;;###autoload (put 'info 'info-file (purecopy "emacs"))
;;;###autoload
(defun info (&optional file-or-node buffer)
--
1.8.3.3
[-- Attachment #3: Type: text/plain, Size: 34 bytes --]
Thanks for reading,
--
Matthias
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: Key bindings for info in other window or frame
2013-07-24 21:28 Key bindings for info in other window or frame Matthias Meulien
@ 2013-07-25 1:09 ` Stefan Monnier
2013-07-25 8:15 ` Matthias Meulien
0 siblings, 1 reply; 3+ messages in thread
From: Stefan Monnier @ 2013-07-25 1:09 UTC (permalink / raw)
To: Matthias Meulien; +Cc: bug-gnu-emacs, emacs-devel
> The attached patch defines `info-other-frame' and bind it to `C-x
> 5 i'. It also bind `info-other-window' to `C-x 4 i'.
Thanks. But what I'm looking for is a C-x 4 command and a C-x 5 command
which work like prefix keys changing the subsequent command to use a new
window/frame (presumably using display-buffer-overriding-action).
Then C-x 4 C-x C-f would do the same as the current C-x 4 f,
and C-x 4 M-x info would do the same as your C-x 4 i.
Also we could further tweak those commands to use
a set-temporary-overlay-map so as to provide shortcuts like the
preexisting C-x 4 f (which would map to C-x 4 C-x C-f), at which point
adding C-x 4 i and C-x 5 i would be easy and wouldn't require any
new command.
Stefan
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Key bindings for info in other window or frame
2013-07-25 1:09 ` Stefan Monnier
@ 2013-07-25 8:15 ` Matthias Meulien
0 siblings, 0 replies; 3+ messages in thread
From: Matthias Meulien @ 2013-07-25 8:15 UTC (permalink / raw)
To: Stefan Monnier; +Cc: bug-gnu-emacs, emacs-devel
> (...) But what I'm looking for is a C-x 4 command and a C-x 5 command
> which work like prefix keys changing the subsequent command to use a new
> window/frame (presumably using display-buffer-overriding-action).
I see. You're right and I'll make a try in that direction.
--
Matthias
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-07-25 8:15 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-24 21:28 Key bindings for info in other window or frame Matthias Meulien
2013-07-25 1:09 ` Stefan Monnier
2013-07-25 8:15 ` Matthias Meulien
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).