emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Bug in org-babel-tangle/org-babel-detangle
@ 2013-09-12 20:48 aditya siram
  0 siblings, 0 replies; only message in thread
From: aditya siram @ 2013-09-12 20:48 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1177 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 1453 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2013-09-12 20:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-12 20:48 Bug in org-babel-tangle/org-babel-detangle aditya siram

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).