* M-0 within keyboard macros
@ 2006-08-08 14:04 medievalrants
2006-08-09 11:52 ` Mathias Dahl
0 siblings, 1 reply; 3+ messages in thread
From: medievalrants @ 2006-08-08 14:04 UTC (permalink / raw)
A problem I've worked around for years - wondering if there's a good
solution.
I sometimes want to create macros that include other macros. Normally,
this works fine. But if I want to execute the included macro as many
times as possible with M-0 (or a defined number of times that exceeds
the number in the file - e.g. M-10 when there are 5 executions in the
file), it seems like the macro rings the bell and execution stops, even
though there was more to do.
For instance - I use a macro to locate a chunk of text, and narrow the
screen - within the narrowed window, I want to execute a couple of
"included" macros M-0 times, returning to the top of the narrowed
window then widen the window and close the macro. (For re-execution
throughout the file).
(I'm a totally self-taught emacs user - I'm competent end enjoy
puzzling these things out but I have an arts background -- so be gentle
:)
Thanks
Alison
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: M-0 within keyboard macros
2006-08-08 14:04 M-0 within keyboard macros medievalrants
@ 2006-08-09 11:52 ` Mathias Dahl
2006-08-10 14:16 ` medievalrants
0 siblings, 1 reply; 3+ messages in thread
From: Mathias Dahl @ 2006-08-09 11:52 UTC (permalink / raw)
"medievalrants" <medievalrants@yahoo.ca> writes:
> For instance - I use a macro to locate a chunk of text, and narrow
> the screen - within the narrowed window, I want to execute a couple
> of "included" macros M-0 times, returning to the top of the narrowed
> window then widen the window and close the macro. (For re-execution
> throughout the file).
Could you try to explain that example in even more detail? Sometimes
keyboard macros (I think this is what you refer to as "macros") are a
bit limited. In those cases I usually write a small elisp function to
help me out. If you haven't tried writing any elisp functions you
should really start now :), it is not as hard as it might seem.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: M-0 within keyboard macros
2006-08-09 11:52 ` Mathias Dahl
@ 2006-08-10 14:16 ` medievalrants
0 siblings, 0 replies; 3+ messages in thread
From: medievalrants @ 2006-08-10 14:16 UTC (permalink / raw)
Mathias Dahl wrote:
> "medievalrants" <medievalrants@yahoo.ca> writes:
>
> > For instance - I use a macro to locate a chunk of text, and narrow
> > the screen - within the narrowed window, I want to execute a couple
> > of "included" macros M-0 times, returning to the top of the narrowed
> > window then widen the window and close the macro. (For re-execution
> > throughout the file).
>
> Could you try to explain that example in even more detail? Sometimes
> keyboard macros (I think this is what you refer to as "macros") are a
> bit limited. In those cases I usually write a small elisp function to
> help me out. If you haven't tried writing any elisp functions you
> should really start now :), it is not as hard as it might seem.
Yes, I think I need elisp for this - this issue of M-0 within kbd
macros comes up all the time for me. In this case, I'm doing something
really convoluted involving resetting the numbering register for each
paragraph in a large sgml coded text file. You really don't want to
know. I'm in kind of a hurry now, so I'm repeating keystrokes for each
para to run 2 sets of kbd macros. I hate repeating keystrokes! When I
get a chance, I'll learn elisp - I've got the O'Reilly book.. The other
option is awk, but I'm not comfortable there yet either.
Thanks for your advice! I think you're right.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-08-10 14:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-08 14:04 M-0 within keyboard macros medievalrants
2006-08-09 11:52 ` Mathias Dahl
2006-08-10 14:16 ` medievalrants
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).