|
From: | Matthias Meulien |
Subject: | Re: Key bindings for info in other window or frame |
Date: | Fri, 26 Jul 2013 23:46:41 +0200 |
User-agent: | Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
Stefan Monnier <address@hidden> writes:
(...) 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).
Here is my 2c. It works as expected with the key bindings `C-x 5 C-h i', `C-x 5 C-x C-b' or `C-x 5 M-x compose-mail' but not with `C-x 5 C-x d' or `C-x 5 M-x gnus'... So I am not sure, I am doing it the right way... Please feel free to comment.
(defun other-frame-visitor (_arg) (interactive "p") (let* ((key-seq (read-key-sequence "Other frame: ")) (display-buffer-alist (cons '(".*" (display-buffer-pop-up-frame)) display-buffer-alist)) (cmd (lookup-key (current-global-map) key-seq))) (call-interactively cmd))) (global-set-key "\C-x5" 'other-frame-visitor)
-- Matthias
[Prev in Thread] | Current Thread | [Next in Thread] |