* Escape :end: inside #+begin_example
@ 2023-10-16 14:43 Max Nikulin
2023-10-17 8:31 ` Ihor Radchenko
0 siblings, 1 reply; 2+ messages in thread
From: Max Nikulin @ 2023-10-16 14:43 UTC (permalink / raw)
To: emacs-orgmode
Hi,
is there a way to quote a drawer inside a literal example that resides
in another drawer? Leading comma ",:end:", unlike for ",* Heading" or
",#+end_src", is not stripped on export or C-c ' (`org-edit-special')
:drawer:
#+begin_src elisp
":src:
%s
:end:
"
#+end_src
:end:
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Escape :end: inside #+begin_example
2023-10-16 14:43 Escape :end: inside #+begin_example Max Nikulin
@ 2023-10-17 8:31 ` Ihor Radchenko
0 siblings, 0 replies; 2+ messages in thread
From: Ihor Radchenko @ 2023-10-17 8:31 UTC (permalink / raw)
To: Max Nikulin; +Cc: emacs-orgmode
Max Nikulin <manikulin@gmail.com> writes:
> is there a way to quote a drawer inside a literal example that resides
> in another drawer? Leading comma ",:end:", unlike for ",* Heading" or
> ",#+end_src", is not stripped on export or C-c ' (`org-edit-special')
>
> :drawer:
> #+begin_src elisp
> ":src:
> %s
> :end:
> "
> #+end_src
> :end:
AFAIK, no. We should fix this.
From a quick glance, we need to update
`org-element--unescape-substring', `org-escape-code-in-region',
`org-escape-code-in-string', `org-unescape-code-in-region', and
`org-unescape-code-in-string'.
Also, the manual, and org-syntax document.
I see no obvious downside in additional escaping, except lesser blocks
with ,:... lines.
--
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>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-10-17 8:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-16 14:43 Escape :end: inside #+begin_example Max Nikulin
2023-10-17 8:31 ` Ihor Radchenko
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.