From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: nested macro expansion? Date: Wed, 19 Aug 2015 22:18:18 +0200 Message-ID: <877forkp6d.fsf@nicolasgoaziou.fr> References: <87io8bo6uv.fsf@ericabrahamsen.net> <87egizo6mc.fsf@ericabrahamsen.net> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:58157) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZS9mw-0004Xw-SW for emacs-orgmode@gnu.org; Wed, 19 Aug 2015 16:16:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZS9mv-0000Qy-U1 for emacs-orgmode@gnu.org; Wed, 19 Aug 2015 16:16:46 -0400 Received: from relay4-d.mail.gandi.net ([2001:4b98:c:538::196]:38633) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZS9mv-0000Qb-NU for emacs-orgmode@gnu.org; Wed, 19 Aug 2015 16:16:45 -0400 In-Reply-To: <87egizo6mc.fsf@ericabrahamsen.net> (Eric Abrahamsen's message of "Wed, 19 Aug 2015 19:33:15 +0800") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Eric Abrahamsen Cc: emacs-orgmode@gnu.org Hello Eric Abrahamsen 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. Regards, -- Nicolas Goaziou