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: Arthur Miller
Subject: Re: Control help- and Info-mode buffers from other buffers
Date: Sun, 04 Jun 2023 16:19:20 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Arthur Miller <arthur.miller@live.com>
>> Cc: juri@linkov.net,  manuel@ledu-giraud.fr,  emacs-devel@gnu.org
>> Date: Sat, 03 Jun 2023 17:06:24 +0200
>> 
>> Eli Zaretskii <eliz@gnu.org> writes:
>> 
>> >> From: Arthur Miller <arthur.miller@live.com>
>> >> Cc: juri@linkov.net,  manuel@ledu-giraud.fr,  emacs-devel@gnu.org
>> >> Date: Sat, 03 Jun 2023 15:53:22 +0200
>> >> 
>> >> The interactive form has to be the very first form in a function body, 
>> >> which
>> >> makes it impossible to just wrap the entire function  into
>> >> with-selected-window.
>> >
>> > I still don't understand why you need the entire function to be
>> > wrapped in with-selected-window.
>> 
>> Because part in the interactive form would like to do some work in the info 
>> buffer
>> too. Since we have called function from some other buffer it simply wont
>> work before switch to info buffer. 
>
> Then use with-selected-window inside the interactive form.
>
>> > I don't understand: I thought we were talking about causing the other
>> > window to do something without the user selecting that window.  So why
>> > does it matter where input goes? what input do you want to go to the
>> > non-selected window or frame?
>> 
>> Yes we are; but some functions prompts user for additional input, and if the
>> info is in another frame but the one with the focus, than minibuffer does not
>> get the focus, and the input instead goes into the frame where mouse
>> cursor/point is. See more further down.
>
> I don't understand: prompts are in the minibuffer, so are you saying
> that there's some situation in Emacs when a Lisp program prompts the
> user, but the minibuffer with the prompts doesn't get input focus?
> That'd be a terrible bug in Emacs in general, not related to the issue
> we are discussing.  Please report such a bug ASAP!

Yes, there is definitely such a situation, in my personal copy of Emacs and Arch
Linux at least. But I also said that I believe it is probably due to my X11
window manager :-)

Anyway, I have found a way to do it without switching; as said, I just needed
the data, so with-current-buffer solves it. Now I get the prompt in the selected
frame, not in one with the info buffer. All good.

>> Not *Help*; I am asking about multiple *info* windows.
>
> A prefix arg should be able to solve at least some such problems.

Are you sure you need a prefix? I can just get list of info (and help buffers to
make Drew happy) and prompt user via completing read to pick one.

Since we are aiming at Emacs 30, and there is still no Emacs 29 released, I
guess there is no rush, so I'll take a bit more time to experiment. I'll come
back to the last when I done :).



reply via email to

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