all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: Eric Abrahamsen <eric@ericabrahamsen.net>
Cc: emacs-orgmode@gnu.org
Subject: Re: nested macro expansion?
Date: Wed, 19 Aug 2015 22:18:18 +0200	[thread overview]
Message-ID: <877forkp6d.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <87egizo6mc.fsf@ericabrahamsen.net> (Eric Abrahamsen's message of "Wed, 19 Aug 2015 19:33:15 +0800")

Hello

Eric Abrahamsen <eric@ericabrahamsen.net> 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

  parent reply	other threads:[~2015-08-19 20:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-19 11:28 nested macro expansion? Eric Abrahamsen
2015-08-19 11:33 ` Eric Abrahamsen
2015-08-19 14:43   ` Pip Cet
2015-08-19 15:03     ` Eric Abrahamsen
2015-08-19 20:18   ` Nicolas Goaziou [this message]
2015-08-20  1:24     ` Eric Abrahamsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=877forkp6d.fsf@nicolasgoaziou.fr \
    --to=mail@nicolasgoaziou.fr \
    --cc=emacs-orgmode@gnu.org \
    --cc=eric@ericabrahamsen.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.