0

In contract to vim's arbitrary behaviors in choosing keys,
emacs's key binding performs semantically,

C-x (C for commands, x for execute)
M-x (M for meta commands or named command, invoke a command by its original name)
C-c (c for create)
C-p (previous)
C-n (next)

Even the arcane bindings:
C-v (vertical)
M-v (m for meta(above beyond) so M-v is move vertically above and thus illustrate why C-v moving down.

When it comes to C-x z which evaluate repeat,

What's z here and it relation with repeat?

P.S. Why dig it

We now come to the decisive step of mathematical abstraction: we forget about what the symbols stand for. ...[The mathematician] need not be idle; there are many operations which he may carry out with these symbols, without ever having to look at the things they stand for.

  • Hermann Weyl, The Mathematical Way of Thinking
  • 5
    Don't expect everything to have a neat explanation. The alphabet existed first, so expecting all of it to map precisely to Emacs command mnemonics sounds awfully optimistic to me. Someone might correct me here (I even hope that they do), but I strongly suspect the answer is "repeat should have an easy key sequence, and this one wasn't taken". – phils Oct 29 '19 at 6:26
  • 1
    Here is the commit in which this binding was added (1998) Here is an old ChangeLog that shows a lot of discussion about vi-dot and repeat in 1998. – daveloyall Oct 30 '19 at 23:23
  • 1
    I was unable to find 1998 archives for any kind of mailing list like emacs-devel. I'll ask a question about that.. – daveloyall Oct 30 '19 at 23:25
3

Following from the excellent comment by @daveloyall, here's the key quote from the Commentary of vi-dot.el by Will Mengarini (circa March 1998, before vi-dot was renamed to repeat). This is from lisp/repeat.el.~0a8cbe6881^~.

Since the whole point of vi-dot is to let you repeat commands that are bound to multiple keystrokes by leaning on a single key, it seems not to make sense to bind vi-dot itself to a multiple-character key sequence, but there aren't any appropriate single characters left in the orthodox global map. (Meta characters don't count because they require two keystrokes if you don't have a real meta key, and things like function keys can't be relied on to be available to all users. We considered rebinding C-z, since C-x C-z is also bound to the same command, but RMS decided too many users were accustomed to the orthodox meaning of C-z.) So the vi-dot command checks what key sequence it was invoked by, and allows you to repeat the final key in that sequence to keep repeating the command. For example, C-x ] C-x z z z will move forward 4 pages.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.