emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Tangling org file with nested org source block


From: Thibault Marin
Subject: Re: [O] Tangling org file with nested org source block
Date: Fri, 20 Oct 2017 23:05:08 -0500
User-agent: mu4e 0.9.18; emacs 25.2.2

Following-up on the issue I reported some time ago with tangling of
nested source blocks, I would like to propose a patch for review.

Before the patch, the following file:

,----
| #+PROPERTY: header-args :tangle output.org
| 
| #+BEGIN_SRC org
| 
| ,* Test
| 
| ,#+BEGIN_SRC org
| ,,#+BEGIN_SRC emacs-lisp
| '(1 2 3)
| ,,#+END_SRC
| ,#+END_SRC
| 
| #+END_SRC
`----

is tangled to:

,---- output.org
| * Test
| 
| #+BEGIN_SRC org
| #+BEGIN_SRC emacs-lisp
| '(1 2 3)
| #+END_SRC
| #+END_SRC
`----

which misses the escaping (commas) for the inner source block.

Tangling after applying the proposed patch results in:

,---- output.org
| * Test
| 
| #+BEGIN_SRC org
| ,#+BEGIN_SRC emacs-lisp
| '(1 2 3)
| ,#+END_SRC
| #+END_SRC
`----

which is properly escaped.

The patch also contains a simple test to validate tangling of nested
blocks.

Could this be considered for a merge?

Thanks in advance

thibault

Attachment: 0001-ob-tangle.el-Fix-tangling-of-org-block-with-nested-s.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]