[Top][All Lists]

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

[O] Bug in org-babel-tangle/org-babel-detangle

From: aditya siram
Subject: [O] Bug in org-babel-tangle/org-babel-detangle
Date: Thu, 12 Sep 2013 15:48:04 -0500

Hi all,
Currently in HEAD a file tangled with org-babel-tangle does not detangle with org-babel-detangle.

The problem is that the chunk delimiters in the tangled file are cushioned with empty lines whereas the same chunk in the Org file is not. So when 'org-babel-detangle' tries to determine the beginning and end of the chunk it includes the spaces which causes it to error out when trying to re-insert the chunk in the Org file because the size of the chunks don't match.

This is a simple fix and I would have submitted a patch but I don't know if the problem is that org-tangle is adding empty lines or if the detangle process should be taking that into account.  Let me know which and I'll submit a patch.

This can be reproduced in the following way:

Tangling the following snippet:
* Test Tangle
   #+begin_src sh :tangle /tmp/test-tangle.txt :comments yes
     hello world

# [[file:~/WorkingFiles/Org.org::*Test%20Tangle][Test\ Tangle:1]]

hello world

# Test\ Tangle:1 ends here

Detangling the same file highlights the code chunk in the Org file and leaves an error message: 
"progn: End of buffer" in the *Messages* buffer.


reply via email to

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