From: Arthur Miller <arthur.miller@live.com>
To: Juri Linkov <juri@linkov.net>
Cc: Manuel Giraud <manuel@ledu-giraud.fr>, emacs-devel@gnu.org
Subject: Re: Control help- and Info-mode buffers from other buffers
Date: Thu, 01 Jun 2023 10:50:36 +0200 [thread overview]
Message-ID: <AM9PR09MB49775C9B8F5EF19E1AAE8FF696499@AM9PR09MB4977.eurprd09.prod.outlook.com> (raw)
In-Reply-To: <86ilc78zc2.fsf@mail.linkov.net> (Juri Linkov's message of "Thu, 01 Jun 2023 09:35:09 +0300")
Juri Linkov <juri@linkov.net> writes:
>> Why can't we just invoke the command directly, via M-x, when anything
>> bound to a key is an interactive command by definition? The reason is
>> that commands are written with (or without) some assumptions.
>
> Because in this case you need to modify all commands to switch windows
> explicitly.
It was a rhetorical question, not something I really was asking you, and I gave
the very same answer after that one :).
Anyway, pre/post hook hack is very useful, and works with many commands, but not
with all, so it is not 100% failsafe and general.Try to execute Info-mode
from other window but Info (shortcut 'm'). In my Emacs it does not work.
My point was that commands to be written with this in mind.
Another problem with the above is that this will work only for 'other-window'
for which Emacs has an algorithm to figure out which window it is. But what when
you have more then two windows, and wish to switch to a different window than
what Emacs considers as 'other-window'? You will have to prompt the user, to
choose one. The help or info buffers are seldom the 'other-buffer' so constanly
choosing the window would be just as annoying as constantly switching to and
from, in my opinion.
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.
I don't say you should not include the pre/post hack into Emacs if you want, it
is better then what already is there for the similar purpose (don't remember
longer the one included since I don't use it). I am just saying that we should
perhaps write better commands in the future, so we don't need the hack :).
next prev parent reply other threads:[~2023-06-01 8:50 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
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 [this message]
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=AM9PR09MB49775C9B8F5EF19E1AAE8FF696499@AM9PR09MB4977.eurprd09.prod.outlook.com \
--to=arthur.miller@live.com \
--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.