all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Arthur Miller <arthur.miller@live.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: juri@linkov.net,  manuel@ledu-giraud.fr,  emacs-devel@gnu.org
Subject: Re: Control help- and Info-mode buffers from other buffers
Date: Fri, 02 Jun 2023 17:09:36 +0200	[thread overview]
Message-ID: <AM9PR09MB497772570D3778BB3E1A36F4964EA@AM9PR09MB4977.eurprd09.prod.outlook.com> (raw)
In-Reply-To: <83o7lybaph.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 02 Jun 2023 03:10:20 -0400")

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: 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.

Can it? I am talking about interactive "marker" when in defun impelementation; not
calling interactive functions. 

>> > 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 ;-)

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 :).

>> 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.

We share similar opinion. As I have mentioned elsewhere, even if pre/post-hack
could be used as a general solution, one would still like to make particular
specialization for certain modes like Help, Info and perhaps a handfull of
others, so in that case I can just give up on generality and manually wrap stuff
as I did.

As just a small update, I was able to string-replace all get-buffer-window
according to Drews helpful tip, so now everything seems to work accross the
frames too. However I haven't had time to test each and every function so they
really work, so I will send in a patch probably tomorrow or day after when I
have had time to go through all to ensure they really do work. I have also
removed the prefix-key helper. Theat removed those 5 lines of :set method from
Helm. I guess you or someone else can put in something similar later on, or just
defvar the prefix in source. Probably not meany people use Customize to redefine
their kes anyway.





  reply	other threads:[~2023-06-02 15:09 UTC|newest]

Thread overview: 62+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-30  5:38 Control help- and Info-mode buffers from other buffers Arthur Miller
2023-05-30 12:54 ` Manuel Giraud via Emacs development discussions.
2023-05-30 13:31   ` Arthur Miller
2023-05-30 15:22     ` Manuel Giraud via Emacs development discussions.
2023-05-30 17:29     ` Juri Linkov
2023-05-31  5:55       ` Arthur Miller
2023-05-31 17:13         ` Juri Linkov
2023-06-01  3:16           ` Arthur Miller
2023-06-01  6:35             ` Juri Linkov
2023-06-01  7:05               ` Eli Zaretskii
2023-06-01  7:20                 ` Juri Linkov
2023-06-01  9:03                   ` Arthur Miller
2023-06-01  9:55                     ` Eli Zaretskii
2023-06-01 14:01                       ` Arthur Miller
2023-06-01  9:16                   ` Arthur Miller
2023-06-01  9:58                     ` Eli Zaretskii
2023-06-01 13:45                       ` Arthur Miller
2023-06-01 16:19                         ` Eli Zaretskii
2023-06-02  1:26                           ` Arthur Miller
2023-06-02  6:34                             ` Juri Linkov
2023-06-02 15:11                               ` Arthur Miller
2023-06-02 15:29                               ` Yuri Khan
2023-06-02 16:32                                 ` Juri Linkov
2023-06-04 14:09                                   ` Arthur Miller
2023-06-02  7:11                             ` Eli Zaretskii
2023-06-02 15:09                               ` Arthur Miller [this message]
2023-06-02 15:16                                 ` Eli Zaretskii
2023-06-03 13:53                                   ` Arthur Miller
2023-06-03 14:04                                     ` Eli Zaretskii
2023-06-03 15:06                                       ` Arthur Miller
2023-06-03 15:15                                         ` Eli Zaretskii
2023-06-04 14:19                                           ` Arthur Miller
2023-06-04 14:33                                             ` Eli Zaretskii
2023-06-04  7:52                                     ` Juri Linkov
2023-06-04 14:04                                       ` Arthur Miller
2023-06-04 16:50                                         ` Juri Linkov
2023-06-02 16:13                                 ` Juri Linkov
2023-06-03 13:49                                   ` Manuel Giraud via Emacs development discussions.
2023-06-04  7:44                                     ` Juri Linkov
2023-06-04  8:50                                       ` Eli Zaretskii
2023-06-04 13:40                                         ` [External] : " Drew Adams
2023-06-04 13:53                                           ` Arthur Miller
2023-06-04 14:00                                             ` Drew Adams
2023-06-04 14:20                                           ` Eli Zaretskii
2023-06-04 13:38                                       ` Manuel Giraud via Emacs development discussions.
2023-06-04  7:48                                   ` Juri Linkov
2023-06-01  8:50               ` Arthur Miller
2023-06-01 10:04                 ` Eli Zaretskii
2023-06-01 11:33                   ` Arthur Miller
2023-06-01 16:39                 ` Juri Linkov
2023-06-01 19:15                   ` Eli Zaretskii
2023-06-02  1:10                   ` Arthur Miller
2023-06-02  6:32                     ` Juri Linkov
2023-06-04 14:41                       ` Arthur Miller
2023-06-04 16:54                         ` Juri Linkov
2023-06-01  6:31           ` Juri Linkov
2023-05-30 16:15 ` Eli Zaretskii
2023-05-31  6:38   ` Arthur Miller
2023-05-30 18:04 ` [External] : " Drew Adams
2023-05-31  6:06   ` Arthur Miller
2023-05-31 13:00     ` Drew Adams
2023-05-31 13:27       ` Arthur Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AM9PR09MB497772570D3778BB3E1A36F4964EA@AM9PR09MB4977.eurprd09.prod.outlook.com \
    --to=arthur.miller@live.com \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=juri@linkov.net \
    --cc=manuel@ledu-giraud.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.