[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Control help- and Info-mode buffers from other buffers
From: |
Juri Linkov |
Subject: |
Re: Control help- and Info-mode buffers from other buffers |
Date: |
Fri, 02 Jun 2023 19:13:30 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) |
> I hope I am not misunderstood here. I certainly don't dislike what Juri does;
> on
> contrary. I made that Reddit thread because I very much was looking for
> something similar, and I am using pre/post hack myself. However I see some
> fundamental issue in how Emacs works, which I am not sure can be easily
> overcom,
> but if Juri can fix them I will certainly be a happy user :).
It seems these fundamental issues can't be fixed without changing core
functions.
The problem is that another window's buffer should be selected before reading
a key sequence in it and executing the bound command. So the only reliable
alternative is to have global keymaps with tons of commands that use
with-selected-window.
To make them at least more general that just Help/Info specific, a better
pattern
would be to base these commands on 'scroll-other-window', e.g.
(defun forward-char-other-window (&optional n)
(interactive "P")
(with-selected-window (other-window-for-scrolling)
(forward-char n)))
(defun backward-char-other-window (&optional n)
(interactive "P")
(with-selected-window (other-window-for-scrolling)
(backward-char n)))
(defun forward-word-other-window (&optional n)
(interactive "P")
(with-selected-window (other-window-for-scrolling)
(forward-word n)))
(defun backward-word-other-window (&optional n)
(interactive "P")
(with-selected-window (other-window-for-scrolling)
(backward-word n)))
...
- Re: Control help- and Info-mode buffers from other buffers, (continued)
- Re: Control help- and Info-mode buffers from other buffers, Eli Zaretskii, 2023/06/02
- Re: Control help- and Info-mode buffers from other buffers, Arthur Miller, 2023/06/03
- Re: Control help- and Info-mode buffers from other buffers, Eli Zaretskii, 2023/06/03
- Re: Control help- and Info-mode buffers from other buffers, Arthur Miller, 2023/06/03
- Re: Control help- and Info-mode buffers from other buffers, Eli Zaretskii, 2023/06/03
- Re: Control help- and Info-mode buffers from other buffers, Arthur Miller, 2023/06/04
- Re: Control help- and Info-mode buffers from other buffers, Eli Zaretskii, 2023/06/04
- Re: Control help- and Info-mode buffers from other buffers, Juri Linkov, 2023/06/04
- Re: Control help- and Info-mode buffers from other buffers, Arthur Miller, 2023/06/04
- Re: Control help- and Info-mode buffers from other buffers, Juri Linkov, 2023/06/04
- Re: Control help- and Info-mode buffers from other buffers,
Juri Linkov <=
- Re: Control help- and Info-mode buffers from other buffers, Manuel Giraud, 2023/06/03
- Re: Control help- and Info-mode buffers from other buffers, Juri Linkov, 2023/06/04
- Re: Control help- and Info-mode buffers from other buffers, Eli Zaretskii, 2023/06/04
- RE: [External] : Re: Control help- and Info-mode buffers from other buffers, Drew Adams, 2023/06/04
- Re: [External] : Re: Control help- and Info-mode buffers from other buffers, Eli Zaretskii, 2023/06/04
- Re: [External] : Re: Control help- and Info-mode buffers from other buffers, Arthur Miller, 2023/06/04
- RE: [External] : Re: Control help- and Info-mode buffers from other buffers, Drew Adams, 2023/06/04
- Re: Control help- and Info-mode buffers from other buffers, Manuel Giraud, 2023/06/04
- Re: Control help- and Info-mode buffers from other buffers, Juri Linkov, 2023/06/04
Re: Control help- and Info-mode buffers from other buffers, Arthur Miller, 2023/06/01