* Apply macro to region
@ 2005-07-21 17:32 Marc Tfardy
2005-07-21 23:08 ` Kevin Rodgers
[not found] ` <mailman.1234.1121988342.20277.help-gnu-emacs@gnu.org>
0 siblings, 2 replies; 5+ messages in thread
From: Marc Tfardy @ 2005-07-21 17:32 UTC (permalink / raw)
Hi,
I have a set of named macros. With apply-macro-to-region-lines command
I can apply last defined macro to each line of region. How can
I apply a named macro to region, except I define a "wrapper macro"
with C-x ( macro name C-x )? Any ideas?
regards
Marc
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: Apply macro to region
@ 2005-07-21 22:26 Dave Humphries
0 siblings, 0 replies; 5+ messages in thread
From: Dave Humphries @ 2005-07-21 22:26 UTC (permalink / raw)
Narrow to the region apply the macro then widen.
C-x nn apply macro Cx nw
Aternatively add the narrow and widen to your macro
Dave
-----Original Message-----
From: help-gnu-emacs-bounces+dave.humphries=dytech.com.au@gnu.org
[mailto:help-gnu-emacs-bounces+dave.humphries=dytech.com.au@gnu.org] On
Behalf Of Marc Tfardy
Sent: Friday, 22 July 2005 3:32 AM
To: help-gnu-emacs@gnu.org
Subject: Apply macro to region
Hi,
I have a set of named macros. With apply-macro-to-region-lines command I
can apply last defined macro to each line of region. How can I apply a
named macro to region, except I define a "wrapper macro"
with C-x ( macro name C-x )? Any ideas?
regards
Marc
_______________________________________________
Help-gnu-emacs mailing list
Help-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gnu-emacs
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Apply macro to region
2005-07-21 17:32 Apply macro to region Marc Tfardy
@ 2005-07-21 23:08 ` Kevin Rodgers
[not found] ` <mailman.1234.1121988342.20277.help-gnu-emacs@gnu.org>
1 sibling, 0 replies; 5+ messages in thread
From: Kevin Rodgers @ 2005-07-21 23:08 UTC (permalink / raw)
Marc Tfardy wrote:
> I have a set of named macros. With apply-macro-to-region-lines command
> I can apply last defined macro to each line of region. How can
> I apply a named macro to region, except I define a "wrapper macro"
> with C-x ( macro name C-x )? Any ideas?
Advise it to read a macro name (when preceded by C-u):
(defadvice apply-macro-to-region-lines (before read-named-macro activate)
"With a prefix arg, read a named macro to apply (instead of the last
macro)."
(interactive
(list (region-beginning)
(region-end)
(if current-prefix-arg
(read-command "Name of keyboard macro to apply: ")))))
BTW, frequent users of apply-macro-to-region-lines might like this:
(global-set-key "\C-xE" 'apply-macro-to-region-lines)
--
Kevin Rodgers
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Apply macro to region
[not found] ` <mailman.1234.1121988342.20277.help-gnu-emacs@gnu.org>
@ 2005-07-22 10:06 ` Marc Tfardy
0 siblings, 0 replies; 5+ messages in thread
From: Marc Tfardy @ 2005-07-22 10:06 UTC (permalink / raw)
Kevin Rodgers schrieb:
> Marc Tfardy wrote:
> > I have a set of named macros. With apply-macro-to-region-lines command
> > I can apply last defined macro to each line of region. How can
> > I apply a named macro to region, except I define a "wrapper macro"
> > with C-x ( macro name C-x )? Any ideas?
>
> Advise it to read a macro name (when preceded by C-u):
>
> (defadvice apply-macro-to-region-lines (before read-named-macro activate)
> "With a prefix arg, read a named macro to apply (instead of the last
> macro)."
> (interactive
> (list (region-beginning)
> (region-end)
> (if current-prefix-arg
> (read-command "Name of keyboard macro to apply: ")))))
>
> BTW, frequent users of apply-macro-to-region-lines might like this:
> (global-set-key "\C-xE" 'apply-macro-to-region-lines)
It works! Thanks a lot!
regards
Marc
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Apply macro to region
[not found] <mailman.1231.1121985007.20277.help-gnu-emacs@gnu.org>
@ 2005-07-22 10:11 ` Marc Tfardy
0 siblings, 0 replies; 5+ messages in thread
From: Marc Tfardy @ 2005-07-22 10:11 UTC (permalink / raw)
Dave Humphries schrieb:
> Narrow to the region apply the macro then widen.
> C-x nn apply macro Cx nw
> Aternatively add the narrow and widen to your macro
> Dave
>
> -----Original Message-----
> From: help-gnu-emacs-bounces+dave.humphries=dytech.com.au@gnu.org
> [mailto:help-gnu-emacs-bounces+dave.humphries=dytech.com.au@gnu.org] On
> Behalf Of Marc Tfardy
> Sent: Friday, 22 July 2005 3:32 AM
> To: help-gnu-emacs@gnu.org
> Subject: Apply macro to region
>
> Hi,
>
> I have a set of named macros. With apply-macro-to-region-lines command I
> can apply last defined macro to each line of region. How can I apply a
> named macro to region, except I define a "wrapper macro"
> with C-x ( macro name C-x )? Any ideas?
I tried this already, but it is not so "beatuy". Nevertheless, thanx!
regards
Marc
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2005-07-22 10:11 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-21 17:32 Apply macro to region Marc Tfardy
2005-07-21 23:08 ` Kevin Rodgers
[not found] ` <mailman.1234.1121988342.20277.help-gnu-emacs@gnu.org>
2005-07-22 10:06 ` Marc Tfardy
-- strict thread matches above, loose matches on Subject: below --
2005-07-21 22:26 Dave Humphries
[not found] <mailman.1231.1121985007.20277.help-gnu-emacs@gnu.org>
2005-07-22 10:11 ` Marc Tfardy
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.