all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Michael Heerdegen <michael_heerdegen@web.de>
To: Emacs mailing list <help-gnu-emacs@gnu.org>
Subject: repeatable vs. non-repeatable commands
Date: Sat, 24 Jun 2017 08:17:26 +0200	[thread overview]
Message-ID: <8760floqo9.fsf@drachen> (raw)

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.



             reply	other threads:[~2017-06-24  6:17 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-24  6:17 Michael Heerdegen [this message]
2017-06-24 10:01 ` repeatable vs. non-repeatable commands 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

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=8760floqo9.fsf@drachen \
    --to=michael_heerdegen@web.de \
    --cc=help-gnu-emacs@gnu.org \
    /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.