From: Jonathan Leech-Pepin <jonathan.leechpepin@gmail.com>
To: Org Mode Mailing List <emacs-orgmode@gnu.org>
Subject: Bug? : Nested macro expansion
Date: Thu, 6 Dec 2012 15:48:48 -0500 [thread overview]
Message-ID: <CAEWDx5eCd3mh3H0cNm7cUjPaj2L5wG9nUvYgj8XKFcXpOv5O1A@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1277 bytes --]
Hello all,
When trying to insert a macro as one of the variables in another macro
(inline and not in the definition), the export fails in both exporters
in different ways.
Using the following example:
#+begin_src org
#+MACRO: test2 /$1/
#+MACRO: test3 *$1*
#+MACRO: test {{{test2($1)}}} - $2
#+MACRO: test4 $1 - $2
Test
1. {{{test(hello,goodbye)}}}
2. {{{test(hello, {{{test3(goodbye)}}})}}}
3. {{{test({{{test3(hello)}}},goodbye)}}}
4. {{{test4({{{test3(hello)}}},goodbye)}}}
5. {{{test4(hello,{{{test3(goodbye)}}})}}}
#+end_src
Old exporter (ascii):
Test
====
1. /hello/ - goodbye
2. /hello/ - *goodbye*
3. /*hello/ - goodbye*
4. *hello - goodbye*
5. hello - *goodbye*
New exporter (org-e-ascii-as-ascii):
Test
1. /hello/ - goodbye
2. /hello/ - *goodbye*
3. /{{{test3(hello/ - ,goodbye)}}}
4. *hello -*
5. hello - *goodbye*
The issues are with examples 3 and 4, where the interior macro does
not close any markup until after the end of the exterior macro. The
new exporter is particularly bad, since in 3 it does not even expand
the internal macro (although it does expand it if it is part of the
original definition), and in 4 it completely omits $2 when creating
the expansion.
Regards,
--
Jon
[-- Attachment #2: Type: text/html, Size: 1515 bytes --]
next reply other threads:[~2012-12-06 20:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-06 20:48 Jonathan Leech-Pepin [this message]
2012-12-06 21:47 ` Bug? : Nested macro expansion Nicolas Goaziou
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=CAEWDx5eCd3mh3H0cNm7cUjPaj2L5wG9nUvYgj8XKFcXpOv5O1A@mail.gmail.com \
--to=jonathan.leechpepin@gmail.com \
--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 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.