emacs-devel
[Top][All Lists]
Advanced

[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: Wed, 31 May 2023 20:13:13 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu)

>> since it would be nice to have a general function
>> that will delegate key presses to any window,
>
> I think it is similar, but still a different problem then remotely executing 
> commands available in other buffer. To start with there is a nice trick
> via pre/post command hooks, someone posted to me on Reddit:
>
> https://www.reddit.com/r/emacs/comments/x0r0pe/share_your_otherwindow_commands/

A hook-based approach looks promising.

When such simplest prototype that demonstrates this solution
conceptually works well

  (progn
    (add-hook 'pre-command-hook (lambda () (other-window 1)))
    (add-hook 'post-command-hook (lambda () (other-window -1))))

then it could be extended by adding customization, etc.

> It works quite well in some cases, but not in all. For example it does not 
> work
> with Info-menu when invoked from other buffer either.

If the code above doesn't work in all cases, this means we have a bug.



reply via email to

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