From: Robert Klein <roklein@roklein.de>
To: emacs-orgmode@gnu.org
Subject: breakage: Using self-defined Macro in macro definition
Date: Mon, 20 Jan 2020 11:27:04 +0100 [thread overview]
Message-ID: <20200120112704.2cb35eac@pckr200.mpip-mainz.mpg.de> (raw)
Hi,
when I use a self-defined macro in a macro definition, subsequent
macros in the same macro definition don't get expanded (tested with
org version 9.2.1 and tip of maint):
--- snip example ---
#+Macro: newline (eval "\n")
#+Macro: new $1 {{{newline}}}#+Index: $1 {{{newline}}}
Use the {{{new(format)}}}
command to format a string according to the
/format-string/ argument.
--- snip example ---
the output of which is:
--- snip resulting output ---
Use the format a
\index{format {{{newline}}}}
command to format a string according to the
\emph{format-string} argument.
--- snip resulting output ---
The expected output would be:
--- snip expected output ---
Use the format a
\index{format}
command to format a string according to the
\emph{format-string} argument.
--- snip expected output ---
PS: leaving the second {{{newline}}} out is not a solution, as
paragraph reformatting will put the macro in the middle of the line.
The issue doesn't crop up, when using a predefined macro, e.g. ` date'
or `author'.
It also doesn't show up, when the first macro in the macro is e.g. the
predefined macro `date'. That is the following example 2 works ok:
--- snip example 2 ---
#+Date: <2020-01-20 Mon>
#+Macro: old $1 {{{date}}} {{{newline}}} alpha {{{newline}}} beta
{{{old}}}
--- snip example 2 ---
Thanks for any hints/help.
Best regards
Robert
next reply other threads:[~2020-01-20 10:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-20 10:27 Robert Klein [this message]
2020-01-20 19:04 ` breakage: Using self-defined Macro in macro definition Berry, Charles
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
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200120112704.2cb35eac@pckr200.mpip-mainz.mpg.de \
--to=roklein@roklein.de \
--cc=emacs-orgmode@gnu.org \
/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 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).