[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[O] [Babel] : Bug in org-tangle with :comments, patch included
From: |
aditya siram |
Subject: |
[O] [Babel] : Bug in org-tangle with :comments, patch included |
Date: |
Thu, 8 Mar 2012 13:36:22 -0600 |
Hi all,
When I tangle a source block with ":comments yes" any spaces in the
sub-heading in which the block is found are replaced with "%2520"
instead of "%20". As a consequence when I "org-babel-detangle" the
correct heading is not found.
As an example given the following org file:
* Babel Tangling
** Test Source 1
#+begin_src c :tangle /tmp/source1.txt :comments yes
nothing
#+end_src
running "org-babel-tangle" generates the following source:
/* [[file:~/WorkingFiles/Org.org::*Test%2520Source%25201][Test-Source-1:1]] */
nothing
/* Test-Source-1:1 ends here */
The problem is in the "org-babel-spec-to-string" function which takes
the correctly escaped link generated by "org-store-link":
"[[file:~/WorkingFiles/Org.org::*Test%20Source%201][Test-Source-1:1]]"
and escapes it again with "org-link-escape" which yielding the erroneous:
"[[file:~/WorkingFiles/Org.org::*Test%2520Source%25201][Test-Source-1:1]]".
I have included a patch that removes the call to "org-link-escape" and
that fixes it on my machine. A grep of my current source tree shows
that "org-babel-spec-to-string" is only called from
"org-babel-tangle". I don't know if any other contribs are using this
function.
-deech
link-escaped-twice.patch
Description: Text Data
- [O] [Babel] : Bug in org-tangle with :comments, patch included,
aditya siram <=