unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* repeat last n commands
@ 2007-10-20 13:03 Nikola Skoric
  2007-10-20 14:19 ` Peter Dyballa
       [not found] ` <mailman.2351.1192889999.18990.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 9+ messages in thread
From: Nikola Skoric @ 2007-10-20 13:03 UTC (permalink / raw)
  To: help-gnu-emacs

How do I repeat last few commands? I know that repeating the last
command is C-xz, but what I want is repeat last *two*
comands. Thanks...

-- 
"Now the storm has passed over me
I'm left to drift on a dead calm sea
And watch her forever through the cracks in the beams
Nailed across the doorways of the bedrooms of my dreams"

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: repeat last n commands
  2007-10-20 13:03 repeat last n commands Nikola Skoric
@ 2007-10-20 14:19 ` Peter Dyballa
       [not found] ` <mailman.2351.1192889999.18990.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 9+ messages in thread
From: Peter Dyballa @ 2007-10-20 14:19 UTC (permalink / raw)
  To: Nikola Skoric; +Cc: help-gnu-emacs


Am 20.10.2007 um 15:03 schrieb Nikola Skoric:

> How do I repeat last few commands? I know that repeating the last
> command is C-xz, but what I want is repeat last *two*
> comands. Thanks...

C-x ESC ESC up up ... ?

--
Greetings

   Pete

A common mistake that people make when trying to design something  
completely foolproof is to underestimate the ingenuity of complete  
fools.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: repeat last n commands
       [not found] ` <mailman.2351.1192889999.18990.help-gnu-emacs@gnu.org>
@ 2007-10-20 15:04   ` Nikola Skoric
  2007-10-20 16:02     ` Drew Adams
                       ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Nikola Skoric @ 2007-10-20 15:04 UTC (permalink / raw)
  To: help-gnu-emacs

Dana Sat, 20 Oct 2007 16:19:51 +0200, 
Peter Dyballa <Peter_Dyballa@Web.DE> kaze:
>
> Am 20.10.2007 um 15:03 schrieb Nikola Skoric:
>
>> How do I repeat last few commands? I know that repeating the last
>> command is C-xz, but what I want is repeat last *two*
>> comands. Thanks...
>
> C-x ESC ESC up up ... ?

Aham. OK. Replace "commands" with... "things" :-D For instance, I
want to remove first 3 characters in next 5 lines. I do M-3 C-d,
then press down arrow and now I want to repeat that 4 times. C-xz
repeats only my next-line. And I want to repeat M-3 C-d that was
executed before next-line too.

-- 
"Now the storm has passed over me
I'm left to drift on a dead calm sea
And watch her forever through the cracks in the beams
Nailed across the doorways of the bedrooms of my dreams"

^ permalink raw reply	[flat|nested] 9+ messages in thread

* RE: repeat last n commands
  2007-10-20 15:04   ` Nikola Skoric
@ 2007-10-20 16:02     ` Drew Adams
  2007-10-20 17:05     ` Bastien
                       ` (2 subsequent siblings)
  3 siblings, 0 replies; 9+ messages in thread
From: Drew Adams @ 2007-10-20 16:02 UTC (permalink / raw)
  To: Nikola Skoric, help-gnu-emacs

> For instance, I
> want to remove first 3 characters in next 5 lines. I do M-3 C-d,
> then press down arrow and now I want to repeat that 4 times. C-xz
> repeats only my next-line. And I want to repeat M-3 C-d that was
> executed before next-line too.

See Info node "Keyboard Macros" in the Emacs manual:
C-h r g keyboard macros RET

Define a keyboard macro for the operations you want to repeat, then execute
the macro repeatedly, at will.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: repeat last n commands
  2007-10-20 15:04   ` Nikola Skoric
  2007-10-20 16:02     ` Drew Adams
@ 2007-10-20 17:05     ` Bastien
       [not found]     ` <mailman.2358.1192896349.18990.help-gnu-emacs@gnu.org>
  2007-10-23 13:21     ` Hans-Christoph Wirth
  3 siblings, 0 replies; 9+ messages in thread
From: Bastien @ 2007-10-20 17:05 UTC (permalink / raw)
  To: help-gnu-emacs

Nikola Skoric <nick-news@net4u.hr> writes:

> Dana Sat, 20 Oct 2007 16:19:51 +0200, 
> Peter Dyballa <Peter_Dyballa@Web.DE> kaze:
>>
>> Am 20.10.2007 um 15:03 schrieb Nikola Skoric:
>>
>>> How do I repeat last few commands? I know that repeating the last
>>> command is C-xz, but what I want is repeat last *two*
>>> comands. Thanks...
>>
>> C-x ESC ESC up up ... ?
>
> Aham. OK. Replace "commands" with... "things" :-D For instance, I
> want to remove first 3 characters in next 5 lines. I do M-3 C-d,
> then press down arrow and now I want to repeat that 4 times. C-xz
> repeats only my next-line. And I want to repeat M-3 C-d that was
> executed before next-line too.

I guess you need macros:

  (info "(emacs)Basic Keyboard Macro")

-- 
Bastien

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: repeat last n commands
       [not found]     ` <mailman.2358.1192896349.18990.help-gnu-emacs@gnu.org>
@ 2007-10-20 18:20       ` Nikola Skoric
  2007-10-20 20:11         ` Dieter Wilhelm
  0 siblings, 1 reply; 9+ messages in thread
From: Nikola Skoric @ 2007-10-20 18:20 UTC (permalink / raw)
  To: help-gnu-emacs

Dana Sat, 20 Oct 2007 18:05:47 +0100, 
Bastien <bzg@altern.org> kaze:
> Nikola Skoric <nick-news@net4u.hr> writes:
>> Aham. OK. Replace "commands" with... "things" :-D For instance, I
>> want to remove first 3 characters in next 5 lines. I do M-3 C-d,
>> then press down arrow and now I want to repeat that 4 times. C-xz
>> repeats only my next-line. And I want to repeat M-3 C-d that was
>> executed before next-line too.
>
> I guess you need macros:
>
>   (info "(emacs)Basic Keyboard Macro")

Emacs truly is the editor of the Lord. Blessed be the day I decided
to use emacs.

Anyway, thanks, keyboard macros are just what I needed.

-- 
"Now the storm has passed over me
I'm left to drift on a dead calm sea
And watch her forever through the cracks in the beams
Nailed across the doorways of the bedrooms of my dreams"

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: repeat last n commands
  2007-10-20 18:20       ` Nikola Skoric
@ 2007-10-20 20:11         ` Dieter Wilhelm
  0 siblings, 0 replies; 9+ messages in thread
From: Dieter Wilhelm @ 2007-10-20 20:11 UTC (permalink / raw)
  To: Nikola Skoric; +Cc: help-gnu-emacs

Nikola Skoric <nick-news@net4u.hr> writes:

> Emacs truly is the editor of the Lord. Blessed be the day I decided
> to use emacs.

Here seems to be another qualified disciple for The Church of Emacs,
have a look my son at

http://www.dina.kvl.dk/~abraham/religion/


-- 
    Best wishes

    H. Dieter Wilhelm
    Darmstadt, Germany

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: repeat last n commands
  2007-10-20 15:04   ` Nikola Skoric
                       ` (2 preceding siblings ...)
       [not found]     ` <mailman.2358.1192896349.18990.help-gnu-emacs@gnu.org>
@ 2007-10-23 13:21     ` Hans-Christoph Wirth
  3 siblings, 0 replies; 9+ messages in thread
From: Hans-Christoph Wirth @ 2007-10-23 13:21 UTC (permalink / raw)
  To: help-gnu-emacs

Nikola Skoric <nick-news@net4u.hr> wrote:
> 
>  Aham. OK. Replace "commands" with... "things" :-D For instance, I
>  want to remove first 3 characters in next 5 lines. I do M-3 C-d,
>  then press down arrow and now I want to repeat that 4 times. C-xz
>  repeats only my next-line. And I want to repeat M-3 C-d that was
>  executed before next-line too.

Use kill-rectangle, C-x r k

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: repeat last n commands
       [not found] <mailman.2357.1192896166.18990.help-gnu-emacs@gnu.org>
@ 2007-10-24 12:58 ` Mathias Dahl
  0 siblings, 0 replies; 9+ messages in thread
From: Mathias Dahl @ 2007-10-24 12:58 UTC (permalink / raw)
  To: help-gnu-emacs

"Drew Adams" <drew.adams@oracle.com> writes:

> Define a keyboard macro for the operations you want to repeat, then
> execute the macro repeatedly, at will.

I think there is also a way to use `view-lossage', i.e. the keyboard
history, as a template for a keyboard macro. This means that you can
even decide you want a macro for what you just typed. I don't remember
how to do it however, but I am sure someone else here does :)

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2007-10-24 12:58 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-20 13:03 repeat last n commands Nikola Skoric
2007-10-20 14:19 ` Peter Dyballa
     [not found] ` <mailman.2351.1192889999.18990.help-gnu-emacs@gnu.org>
2007-10-20 15:04   ` Nikola Skoric
2007-10-20 16:02     ` Drew Adams
2007-10-20 17:05     ` Bastien
     [not found]     ` <mailman.2358.1192896349.18990.help-gnu-emacs@gnu.org>
2007-10-20 18:20       ` Nikola Skoric
2007-10-20 20:11         ` Dieter Wilhelm
2007-10-23 13:21     ` Hans-Christoph Wirth
     [not found] <mailman.2357.1192896166.18990.help-gnu-emacs@gnu.org>
2007-10-24 12:58 ` Mathias Dahl

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).