all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: "Juri Linkov" <juri@jurta.org>,
	"Gauthier Östervall" <gauthier@ostervall.se>,
	emacs-devel@gnu.org
Subject: RE: [PATCH] Make `C-x {' and `C-x }' repeatable
Date: Wed, 22 May 2013 16:53:43 -0700 (PDT)	[thread overview]
Message-ID: <a182e0ba-ca89-43c0-8c8a-901f9118053c@default> (raw)
In-Reply-To: <jwvzjvmfz4y.fsf-monnier+emacs@gnu.org>

> >> But it seems repeat.el can't be used if there are different commands
> >> in the key sequence.
> > No (i.e., correct), at least not the way I did it.
> 
> Indeed.  But I don't think it's a big deal: set-temporary-overlay-map
> makes it easy enough that you shouldn't need to use repeat.el
> programatically (i.e. repeat.el is only useful as an implementation of
> the C-x z command).

Fine with me, if the things discussed (e.g., prefix arg passed to all
final-key "repetitions" after the prefix key) can be worked out.

I agree that, since it lets you define a group of related "repeatable"
final keys for the same prefix key, the `set-temporary-overlay-map'
approach is more general than what I do with `repeat-command'.  But it
is a little less convenient for the use case of a singleton group.

One good thing might be to have an abbreviation to handle that use case.
IOW, a simple way to do what one can do with `repeat-command', avoiding
explicitly creating a singleton keymap.  Not a big deal; it would be
just a little more convenient.

There is also the question (assuming a fix that would apply the prefix
arg from the prefix key to each repeated final key) of whether using a
prefix arg before an individual final key should affect only that key
occurrence or all subsequent key hits as well.

IOW, should using a prefix arg be modal for the repeated keys that follow it
(until/unless you use another prefix arg), or should it apply only to the
next final-key occurrence?

E.g., C-2 C-x a a a  C-6 a a a  C-3 a a

A prefix arg value of 2 should apply to each of the first 3 `a's (what
`repeat-command' does that Juri's approach currently does not do).

But should the prefix arg of 6 apply to just the first `a' that follows it,
with the next 2 `a's getting a prefix arg value of 2?  And likewise, the
prefix arg of 3 apply only to the `a' that immediately follows it?

Or should the prefix arg of 6 apply to the 3 `a's that follow it, and the
prefix arg of 3 apply to the last two `a's?  IOW, modal among final-key
repetitions.



  reply	other threads:[~2013-05-22 23:53 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-20 19:59 [PATCH] Make `C-x {' and `C-x }' repeatable Gauthier Östervall
2013-05-21  9:58 ` Vitalie Spinu
2013-05-21 13:53   ` Gauthier Östervall
2013-05-21 18:34 ` Juri Linkov
2013-05-22 17:44   ` Drew Adams
2013-05-22 18:55     ` Juri Linkov
2013-05-22 21:39       ` Drew Adams
2013-05-22 22:08         ` Stefan Monnier
2013-05-22 23:53           ` Drew Adams [this message]
2013-05-23  0:18             ` chad
2013-05-23 16:19               ` Drew Adams
2013-05-23 16:48                 ` Stefan Monnier
2013-05-23 19:52                   ` Drew Adams
2013-05-24  4:53                     ` Stephen J. Turnbull
2013-05-24 15:55                       ` Drew Adams
2013-05-24 17:00                         ` Stephen J. Turnbull
2013-05-22 21:47       ` Stefan Monnier
2013-05-22 22:24         ` Stefan Monnier
2013-05-22 23:53         ` Drew Adams
2013-05-23 22:30         ` Juri Linkov
2013-05-24  3:58           ` Stefan Monnier
2013-05-22 19:05 ` Stefan Monnier
2013-05-23 12:21   ` Gauthier Östervall
2013-05-23 13:41     ` Stefan Monnier
2013-05-23 22:04       ` Juri Linkov
2013-05-24  9:38         ` Alan Mackenzie
2013-05-24 20:31           ` Juri Linkov
2013-05-25 20:01             ` Alan Mackenzie
2013-05-25 20:40               ` Juri Linkov
2013-06-02 21:05                 ` isearch-allow-prefix [Was: [PATCH] Make `C-x {' and `C-x }' repeatable] Alan Mackenzie
2013-06-04 18:03                   ` Juri Linkov
2013-06-04 21:24                     ` Alan Mackenzie
2013-06-05  8:23                       ` Juri Linkov
2013-06-05 21:02                         ` Alan Mackenzie
2013-06-06  6:07                           ` isearch-allow-move [Was: isearch-allow-prefix] Juri Linkov
2013-06-06 12:45                             ` Stefan Monnier
2013-06-06 15:07                               ` Juri Linkov
2013-06-06 15:43                                 ` Drew Adams
2013-06-06 16:39                                 ` Stefan Monnier
2013-06-07  7:07                                   ` Juri Linkov
2013-06-06 20:07                             ` Alan Mackenzie
2013-06-07  6:59                               ` Juri Linkov
2013-06-07 10:30                                 ` Alan Mackenzie
2013-06-07 19:30                                   ` Juri Linkov
2013-06-09 20:09                                     ` Juri Linkov
2013-06-11 19:35                                       ` Juri Linkov
2013-06-07 20:04                               ` Juri Linkov
2013-06-09 12:07         ` [PATCH] set-temporary-overlay-map improvement and make windresize exit on other commands Vitalie Spinu
2013-06-09 16:03           ` Stefan Monnier
2013-06-09 17:12             ` Vitalie Spinu
2013-06-13 20:44               ` Stefan Monnier

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=a182e0ba-ca89-43c0-8c8a-901f9118053c@default \
    --to=drew.adams@oracle.com \
    --cc=emacs-devel@gnu.org \
    --cc=gauthier@ostervall.se \
    --cc=juri@jurta.org \
    --cc=monnier@iro.umontreal.ca \
    /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.