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: Thu, 01 Jun 2023 22:15:39 +0300

> From: Juri Linkov <juri@linkov.net>
> Cc: Manuel Giraud <manuel@ledu-giraud.fr>,  emacs-devel@gnu.org
> Date: Thu, 01 Jun 2023 19:39:58 +0300
> 
> > I would prefer if there was a code gen in form of a macro, as suggested, 
> > similar
> > to define-minor-mode, that does this switching on pre-defined prefixes so 
> > that
> > we get uniformity, and helps people write commands so they work from
> > anywhere. Since it is not possible to completely automate it, perhaps lisp
> > manual could mention how to write commands so they are callable from other
> > windows then just selected one.
> 
> The downside is that every command needs to be modified and its body
> wrapped with a macro.  An alternative would be to put a new property
> on the command symbol with a function that selects a window to redirect
> input to.  Implementation-wise this is like repeat-mode works.

I don't think we need to come up with a generic way of making any
command work on "the other window".  That would be over-engineering,
IMO.  This is only needed in cases when the user is unlikely to have
the window be the selected one.  The number of commands for which this
makes sense is not too large, so I'm not convinced a general-purpose
infrastructure for that is needed.  with-selected-window seems more
than enough to me.



reply via email to

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