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
   #+end_src
produces:

# [[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.

Thanks!
-deech

Reply via email to