all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* repeatable vs. non-repeatable commands
@ 2017-06-24  6:17 Michael Heerdegen
  2017-06-24 10:01 ` Emanuel Berg
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Michael Heerdegen @ 2017-06-24  6:17 UTC (permalink / raw)
  To: Emacs mailing list

Hi,

in el-search, the default key bindings are all of the form
control-shift-letter, like C-S (search-forward), C-R (search-backward),
C-A (go to the first match) etc.

Since these bindings are not available in a console, I want to provide
another configurable binding-scheme of the form prefix+letter, where
"prefix" is a prefix key the user can choose.  In this case, I want to
equip the commands with a transient map so that the prefix has to be
given only the first time one of the commands is invoked.  For example,
if the prefix is meta-s e,

   meta-s e s s a

should invoke a forward search, then go to the next match, and then to
the first.

The transient map is the same for all prefixes, but in the shift-letter
case, it's wrong to use the transient map; it would be surprising when
C-S followed by r would search backward instead of stopping the search
and invoking the self-insert-command.

My question is: is there a way I'm not seeing to achieve this without
defining two sets of commands (one set establishing the transient map,
another without)?

FWIW, my idea was consulting `this-command-keys', but due to bug#27470,
I can't use it in my case.

Any ideas?


Thanks,

Michael.



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2017-06-26 15:31 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-24  6:17 repeatable vs. non-repeatable commands Michael Heerdegen
2017-06-24 10:01 ` Emanuel Berg
2017-06-25  4:56   ` Michael Heerdegen
2017-06-25 15:53     ` Emanuel Berg
2017-06-26 13:49       ` Michael Heerdegen
2017-06-24 10:22 ` Emanuel Berg
2017-06-25  4:59   ` Michael Heerdegen
2017-06-25 16:22     ` Emanuel Berg
2017-06-24 13:23 ` Stefan Monnier
2017-06-26 15:31   ` Michael Heerdegen

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.