Florian Kaufmann
2006-03-12 13:59:15 UTC
Hello
I am searching for a command that repeats the last command n times. I
know there is repeat, usually bound to C-x z. However, if y want to
repeat the last command 12 times, I have to press z 12 times. Id rather
liked to enter 12 directly.
Using universal-argument, usually bound to C-u, also doesn't fit, since
its only an argument for the next command, and not in every case a
repeat count. For example I cant use it to repeat yank.
I thought I could write a little lisp function by myself and use the
command-history. But as its descriptions says it only contains commands
that read an argument from command line. It doesn't contain commands
like yank.
Using the output of view-lossage might be quite tricky, since I think
its not so easy to find out from this information which the last
command was.
Last but not least I could make use of keyboard macros. But then again,
(start-kbd-macro)[command-to-repeat](end-kbd-macro)(universal-argument)[repeat-count](call-last-kbd-macro)
seems quite more cumbersome than a simple
[command-to-repeat][my-super-repeat-command][repeat-count] or a
[my-super-repeat-next-command][repeat-command][command-to-repeat]
Any further ideas?
Greetings
Florian Kaufmann
I am searching for a command that repeats the last command n times. I
know there is repeat, usually bound to C-x z. However, if y want to
repeat the last command 12 times, I have to press z 12 times. Id rather
liked to enter 12 directly.
Using universal-argument, usually bound to C-u, also doesn't fit, since
its only an argument for the next command, and not in every case a
repeat count. For example I cant use it to repeat yank.
I thought I could write a little lisp function by myself and use the
command-history. But as its descriptions says it only contains commands
that read an argument from command line. It doesn't contain commands
like yank.
Using the output of view-lossage might be quite tricky, since I think
its not so easy to find out from this information which the last
command was.
Last but not least I could make use of keyboard macros. But then again,
(start-kbd-macro)[command-to-repeat](end-kbd-macro)(universal-argument)[repeat-count](call-last-kbd-macro)
seems quite more cumbersome than a simple
[command-to-repeat][my-super-repeat-command][repeat-count] or a
[my-super-repeat-next-command][repeat-command][command-to-repeat]
Any further ideas?
Greetings
Florian Kaufmann