From: "Florian Kaufmann" <sensorflo@gmail.com>
Subject: repeat the last command n times
Date: 12 Mar 2006 05:59:15 -0800 [thread overview]
Message-ID: <1142171955.459973.111290@j33g2000cwa.googlegroups.com> (raw)
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
next reply other threads:[~2006-03-12 13:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-12 13:59 Florian Kaufmann [this message]
2006-03-13 21:11 ` repeat the last command n times Drew Adams
[not found] ` <mailman.10.1142284306.30034.help-gnu-emacs@gnu.org>
2006-03-13 21:43 ` Johan Bockgård
2006-03-13 22:58 ` Florian Kaufmann
2006-03-17 4:36 ` Drew Adams
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1142171955.459973.111290@j33g2000cwa.googlegroups.com \
--to=sensorflo@gmail.com \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).