|
From: | Juri Linkov |
Subject: | Re: Control help- and Info-mode buffers from other buffers |
Date: | Sun, 04 Jun 2023 10:48:20 +0300 |
User-agent: | Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) |
> The problem is that another window's buffer should be selected before > reading a key sequence in it and executing the bound command. Another alternate that we currently are trying to avoid is a pattern used in e.g. 'project-switch-project': #+begin_src emacs-lisp (defun run-command-other-window (window) (interactive (list (other-window-for-scrolling))) (with-selected-window window (let* ((keys (read-key-sequence "Run in another window: ")) (command (key-binding keys))) (call-interactively command)))) (keymap-global-set "M-i" 'run-command-other-window) #+end_src Then 'M-i m' will read a menu in the adjacent Info window, and visit the selected Info node.
[Prev in Thread] | Current Thread | [Next in Thread] |