* Preserve key echo among command invocation
@ 2016-03-08 13:58 Frank Fischer
2016-03-10 13:43 ` Michael Heerdegen
2016-03-10 15:16 ` Stefan Monnier
0 siblings, 2 replies; 3+ messages in thread
From: Frank Fischer @ 2016-03-08 13:58 UTC (permalink / raw)
To: help-gnu-emacs
Hi,
if a user starts typing a key sequence and stops for a few seconds
before the sequence is complete, the keys types so far are shown in the
echo area. As soon as the sequence is complete, the area is cleared and
for the next command only the new keys are shown.
My questions is if it is possible to preserve the sequence of keys to be
shown even if a certain command is executed. So I want to write a
command that, when called, does not cause the echo area to be cleared so
that the keys of the following command are appended.
Some commands like `digit-argument' behave like this (typing a number
calls that `digit-argument' put the echo area is preserved until the
actual command is executed). But that's a special case.
Is there way to do this for my own commands?
Thanks in advance.
Frank
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Preserve key echo among command invocation
2016-03-08 13:58 Preserve key echo among command invocation Frank Fischer
@ 2016-03-10 13:43 ` Michael Heerdegen
2016-03-10 15:16 ` Stefan Monnier
1 sibling, 0 replies; 3+ messages in thread
From: Michael Heerdegen @ 2016-03-10 13:43 UTC (permalink / raw)
To: Frank Fischer; +Cc: help-gnu-emacs
Frank Fischer <frank-fischer@shadow-soft.de> writes:
> Hi,
>
> if a user starts typing a key sequence and stops for a few seconds
> before the sequence is complete, the keys types so far are shown in the
> echo area. As soon as the sequence is complete, the area is cleared and
> for the next command only the new keys are shown.
>
> My questions is if it is possible to preserve the sequence of keys to be
> shown even if a certain command is executed. So I want to write a
> command that, when called, does not cause the echo area to be cleared so
> that the keys of the following command are appended.
When do you want to stop with echoing prior keys and make a cut? You
probably don't want to list the complete key history of the whole Emacs
session in the echo area...?
One thing in advance: key echoing is induced from C (including
`digit-argument') - if you want to have a very different behavior, this
won't be possible in a trivial way but only with some kind of hack.
Michael.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Preserve key echo among command invocation
2016-03-08 13:58 Preserve key echo among command invocation Frank Fischer
2016-03-10 13:43 ` Michael Heerdegen
@ 2016-03-10 15:16 ` Stefan Monnier
1 sibling, 0 replies; 3+ messages in thread
From: Stefan Monnier @ 2016-03-10 15:16 UTC (permalink / raw)
To: help-gnu-emacs
> Some commands like `digit-argument' behave like this (typing a number
> calls that `digit-argument' put the echo area is preserved until the
> actual command is executed). But that's a special case.
> Is there way to do this for my own commands?
The answer depends on several aspects, but in Emacs-25 we added the
prefix-command-echo-keystrokes-functions hook specifically so that C-u
is not so special anymore and other commands can provide the same kind
of functionality (this is used for example in the GNU ELPA package
`other-frame-window' which aims to replace the C-x 4 and C-x 5 prefix
keymaps with prefix commands).
Stefan
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-03-10 15:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-08 13:58 Preserve key echo among command invocation Frank Fischer
2016-03-10 13:43 ` Michael Heerdegen
2016-03-10 15:16 ` Stefan Monnier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).