From: Ihor Radchenko <yantar92@posteo.net>
To: Robert Klein <roklein@roklein.de>
Cc: emacs-orgmode@gnu.org
Subject: Re: [BUG] emphasis marker inside macro breaks macro [9.7.16 (release_9.7.16 @ /home/roklein/ot/org-mode/lisp/)]
Date: Sat, 23 Nov 2024 18:50:53 +0000 [thread overview]
Message-ID: <874j3x4wdu.fsf@localhost> (raw)
In-Reply-To: <20241113131945.26fe6c33@pcedv2.poly.mpip-mainz.mpg.de>
Robert Klein <roklein@roklein.de> writes:
> When I have an emphasized section with a macro inside and the macro
> contains the emphasis delimiter, macro expansion is broken (i.e. doesn't
> happen, it is exported verbatim, including the braces and the macro name).
>
> In for / and * the emphasis section ends where the delimiter shows up in the Macro
> though not for =.
> ...
> - wrong:
>
> /Open the file {{{Pathname(/ bashrc)}}}/
>
> /Open the file {{{Pathname(alpha/ bashrc)}}}/
>
> /Open the file {{{Pathname(~/.bashrc)}}}/
>
> *bold faced Macro {{{Pathname(*.org)}}}*
>
> `another {{{Pathname(a = is an equal sign)}}} example'
This is not a bug. You just gave Org ambiguous markup and Org resolved
the ambiguity in a way you did not expect.
/Open the file {{{Pathname(/ bashrc)}}}/ could be parsed in two ways
<italics>Open the file <macro>Pathname(/ bashrc)<end macro><end italics>
or
<italics>Open the file {{{Pathname(<end italics> bashrc)}}}/
Org happens to use "first matching markup wins" rule, leading to what
you have observed.
You can resolve such ambiguity in two ways:
1. Use zero-width space, as we suggest in https://orgmode.org/manual/Escape-Character.html
2. Use \slash entity to specify slash explicitly where you do not want
it to be treated as markup delimiter.
Canceled.
--
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>
prev parent reply other threads:[~2024-11-23 18:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-13 12:19 [BUG] emphasis marker inside macro breaks macro [9.7.16 (release_9.7.16 @ /home/roklein/ot/org-mode/lisp/)] Robert Klein
2024-11-23 18:50 ` Ihor Radchenko [this message]
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=874j3x4wdu.fsf@localhost \
--to=yantar92@posteo.net \
--cc=emacs-orgmode@gnu.org \
--cc=roklein@roklein.de \
/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).