[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: |
Fri, 24 Sep 2021 18:31:59 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) |
> I came up with another idea last night and sent a patch, but I am not sure if
> it
> got to right place, I don't see it myself. It was an answer longer in the
> thread
> to Lars.
>
> This one makes it possible to run any command in *Help* buffer, not just those
> defined in help-mode.el, and those not need any patching or wrapping of
> existing
> commands.
>
> I don't know if it is correct place to put define-key for the global map, and
> I
> am not sure if C-h M-h is the right, but that's just a detail.
This would be a nice command. But why it's limited only to help-window?
It could allow reading and running the key sequences in any next-window.
> +(defun help-do-command ()
> + "Run a key-sequence in \"*Help*\" buffer from other buffers.
> +
> +If *Help* buffer is not visible, the HELP-DO-COMMAND will be aborterd."
> + (interactive)
> + (if (get-buffer-window (help-buffer))
I meant to replace '(get-buffer-window (help-buffer))' with '(next-window)'.
> + (let ((__key (read-key-sequence "Run command in *Help* buffer: ")))
> + (with-current-buffer (help-buffer)
> + (call-interactively
> + (key-binding
> + (kbd (edmacro-format-keys (vector last-input-event)))))))
> + (call-interactively (global-key-binding "\C-g"))))
> +
> +(define-key global-map (kbd "C-h M-h") 'help-do-command)
- Re: bug#36767: 26.1; request: add more quick keys to the *Help* buffer, Arthur Miller, 2021/09/23
- Re: bug#36767: 26.1; request: add more quick keys to the *Help* buffer, Arthur Miller, 2021/09/24
- Re: bug#36767: 26.1; request: add more quick keys to the *Help* buffer,
Juri Linkov <=
- Re: bug#36767: 26.1; request: add more quick keys to the *Help* buffer, Eli Zaretskii, 2021/09/24
- Re: bug#36767: 26.1; request: add more quick keys to the *Help* buffer, Arthur Miller, 2021/09/24
- Re: bug#36767: 26.1; request: add more quick keys to the *Help* buffer, Arthur Miller, 2021/09/24
- Re: bug#36767: 26.1; request: add more quick keys to the *Help* buffer, Arthur Miller, 2021/09/24
- Re: bug#36767: 26.1; request: add more quick keys to the *Help* buffer, Eli Zaretskii, 2021/09/25
- Re: bug#36767: 26.1; request: add more quick keys to the *Help* buffer, Arthur Miller, 2021/09/25
- Re: bug#36767: 26.1; request: add more quick keys to the *Help* buffer, Eli Zaretskii, 2021/09/25
- Re: bug#36767: 26.1; request: add more quick keys to the *Help* buffer, Arthur Miller, 2021/09/25
- Re: bug#36767: 26.1; request: add more quick keys to the *Help* buffer, Eli Zaretskii, 2021/09/25
- Re: bug#36767: 26.1; request: add more quick keys to the *Help* buffer, Arthur Miller, 2021/09/25