[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] Startup option to separate macros arguments with an alternative
From: |
Juan Manuel Macías |
Subject: |
[PATCH] Startup option to separate macros arguments with an alternative string |
Date: |
Thu, 18 Feb 2021 17:33:46 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) |
Hi,
I would like to propose this (possible) patch.
With `#+STARTUP: macro-arg-sep-other' the macros arguments can be
separated by a string other than comma, whose value is defined in
`org-macro-arg-sep-other' (by default it is "'@").
Rationale for this patch: There are many contexts where the comma character can
be
inappropriate as an argument separator, since it has to be escaped many times.
If the patch is relevant, I can take care of writing the documentation and
docstrings.
Example:
#+begin_src org
,#+STARTUP: macro-arg-sep-other
,#+MACRO: lg (eval (if (org-export-derived-backend-p
org-export-current-backend 'latex) (concat "@@latex:\\foreignlanguage{@@" $1
"@@latex:}{@@" "\u200B" $2 "\u200B" "@@latex:}@@") $2))
{{{lg(latin'@Lorem ipsum dolor sit amet, consectetuer adipiscing elit, donec
hendrerit
tempor tellus, donec pretium posuere tellus, proin quam nisl, tincidunt et,
mattis eget,
convallis nec, purus.)}}}
With the escaped character:
{{{lg(latin'@Lorem ipsum dolor sit amet \'@)}}}
#+end_src
Best regards,
Juan Manuel
org-macro-arg-sep.patch
Description: Text Data
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH] Startup option to separate macros arguments with an alternative string,
Juan Manuel Macías <=