emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bug#36767: 26.1; request: add more quick keys to the *Help* buffer


From: Juri Linkov
Subject: Re: bug#36767: 26.1; request: add more quick keys to the *Help* buffer
Date: Sat, 25 Sep 2021 21:46:15 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)

> #+begin_src emacs-lisp
> (defun remote-control-other-window ()
>   (interactive)
>   (let ((buffer (window-buffer (next-window))))
>     (if (and buffer (get-buffer-window buffer))
>         (progn
>           (read-key-sequence (format "Run command in %s buffer: "
>                                      (buffer-name buffer)))
>           (with-current-buffer buffer
>             (call-interactively
>              (key-binding
>               (kbd (edmacro-format-keys (vector last-input-event)))))))
>       (keyboard-quit))))
> #+end_src

Thanks, I missed such a command for a long time.
And 'remote-control-other-window' is an exact name.

> I tried with next-window, but does it give me current-buffers window
> when there are no other windows? When there are two windows, it works fine.

It does no harm when the command is redirected to the same single window.

> If it would be interesting to develop furhter, where would it belong?
> Windmove.el or elswehere?

Windmove.el looks like the most suitable place since it also
provides quick keys for customization.  The same way you can choose
a key to use another window, like there are already similar keys
to scroll another window with M-<next>/C-M-v and M-<prior>/C-M-S-v,
etc.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]