* [bug] Macro expansion not recursive
@ 2014-01-30 11:32 Sebastien Vauban
2014-01-30 11:57 ` Nicolas Goaziou
0 siblings, 1 reply; 3+ messages in thread
From: Sebastien Vauban @ 2014-01-30 11:32 UTC (permalink / raw)
To: emacs-orgmode-mXXj517/zsQ
Hello,
It was said that "Macro expansion is already recursive: the template can
be another macro." Though, my example does not work: the second macro
call is exported almost "verbatim".
--8<---------------cut here---------------start------------->8---
#+MACRO: highlight @@html:<span style="background-color: $1;">$2</span>@@
#+MACRO: hl {{{highlight(#FFFF00,$1}}}
{{{highlight(yellow,This is important!)}}}
{{{hl(This is important!)}}}
--8<---------------cut here---------------end--------------->8---
Am I missing something?
Best regards,
Seb
--
Sebastien Vauban
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [bug] Macro expansion not recursive
2014-01-30 11:32 [bug] Macro expansion not recursive Sebastien Vauban
@ 2014-01-30 11:57 ` Nicolas Goaziou
2014-01-30 12:15 ` Sebastien Vauban
0 siblings, 1 reply; 3+ messages in thread
From: Nicolas Goaziou @ 2014-01-30 11:57 UTC (permalink / raw)
To: Sebastien Vauban; +Cc: public-emacs-orgmode-mXXj517/zsQ
Hello,
"Sebastien Vauban" <sva-news-D0wtAvR13HarG/iDocfnWg@public.gmane.org>
writes:
> It was said that "Macro expansion is already recursive: the template can
> be another macro." Though, my example does not work: the second macro
> call is exported almost "verbatim".
>
> #+MACRO: highlight @@html:<span style="background-color: $1;">$2</span>@@
> #+MACRO: hl {{{highlight(#FFFF00,$1}}}
>
> {{{highlight(yellow,This is important!)}}}
>
> {{{hl(This is important!)}}}
>
> Am I missing something?
Yes, a parenthesis after $1 in hl macro.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [bug] Macro expansion not recursive
2014-01-30 11:57 ` Nicolas Goaziou
@ 2014-01-30 12:15 ` Sebastien Vauban
0 siblings, 0 replies; 3+ messages in thread
From: Sebastien Vauban @ 2014-01-30 12:15 UTC (permalink / raw)
To: emacs-orgmode-mXXj517/zsQ
Hello Nicolas,
Nicolas Goaziou wrote:
> "Sebastien Vauban" writes:
>
>> It was said that "Macro expansion is already recursive: the template can
>> be another macro." Though, my example does not work: the second macro
>> call is exported almost "verbatim".
>>
>> #+MACRO: highlight @@html:<span style="background-color: $1;">$2</span>@@
>> #+MACRO: hl {{{highlight(#FFFF00,$1}}}
>>
>> {{{highlight(yellow,This is important!)}}}
>>
>> {{{hl(This is important!)}}}
>>
>> Am I missing something?
>
> Yes, a parenthesis after $1 in hl macro.
Blush...
Thanks!
Seb
--
Sebastien Vauban
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-01-30 12:15 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-30 11:32 [bug] Macro expansion not recursive Sebastien Vauban
2014-01-30 11:57 ` Nicolas Goaziou
2014-01-30 12:15 ` Sebastien Vauban
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
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).