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: Eli Zaretskii
Subject: Re: Control help- and Info-mode buffers from other buffers
Date: Fri, 02 Jun 2023 10:11:06 +0300

> From: Arthur Miller <arthur.miller@live.com>
> Cc: juri@linkov.net,  manuel@ledu-giraud.fr,  emacs-devel@gnu.org
> Date: Fri, 02 Jun 2023 03:26:26 +0200
> 
> > I don't understand why you see such complexity.  All we need is a
> > command that will do
> >
> >   (with-selected-window (get-buffer-window "*info*")
> >     BODY...
> No you need a bit more than that sometimes. In case that interactive is doing
> some prompting and buffer dependent setup, you will have to wrap interactive
> body for itself, and function body for itself. See Info-mode or Info-find (I
> think) in patch, but conceptually, yes that is about it. If you can live with
> wrapping commands in with-selected-window. Due to fact that interactive form
> must be the first form in a function body.

You also have call-interactively, which can work around this minor
obstacle.

> > and then we need to bind it to, say, "C-x 4 h m".  Did I miss
> > something important?
> 
> Basically that these were two discussions, one where Juri asked me about my
> experiences about running commands in other windows, and one about the
> patch. Juri dislike the idea of wrapping all commands into 
> with-selected-window
> and is trying to find a way to transfer command execution to other window
> without need to wrap commands explicitly as I understand him, which I hope he
> will find.

Well, I see no reason to dislike what Juri dislikes in this case.  So
now you get to choose whose preferences you want to follow ;-)

> The above is discussion about that general command that will send input
> to other windows.

As I said elsewhere in this thread, trying to make this more general
than it needs to be is over-engineering.  Not all commands can
naturally be used with the "other-window prefix", and we are talking
about help-related commands here.  For help-related commands, it is
natural to work in another window while having the help displayed
nearby, and it is therefore natural to control that non-selected help
window without having to select it first.  So that is what we should
do, IMO.



reply via email to

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