emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] nested macro expansion?


From: Eric Abrahamsen
Subject: Re: [O] nested macro expansion?
Date: Thu, 20 Aug 2015 09:24:59 +0800
User-agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/25.0.50 (gnu/linux)

Nicolas Goaziou <address@hidden> writes:

> Hello
>
> Eric Abrahamsen <address@hidden> writes:
>
>> After googling for a while, I also thought this might work:
>>
>> #+MACRO: bubba (eval (format-time-string "%Y" property{{{TIMESTAMP}}}))
>>
>> {{{bubba}}}
>>
>> But the nested definition isn't expanded, either with or without
>> quotes.
>
> As you noticed, you cannot nest macros. You can use macros within macro
> definitions, tho. Alas, it will not work with (eval ...) templates,
> since those make no assumptions about the rest of the template and
> simply use `read' on it.
>
> Anyway, as pointed out in this thread, if you take the (eval ...) path,
> you don't really need macros: you're in Elisp.

Thanks to both of you for the pointers! This is my first time trying to
do anything non-trivial with macros, and the orientation is very useful.

Eric




reply via email to

[Prev in Thread] Current Thread [Next in Thread]