[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[O] Header ':comments noweb' mangles lines in tangled code
From: |
Vladimir Lomov |
Subject: |
[O] Header ':comments noweb' mangles lines in tangled code |
Date: |
Tue, 18 Mar 2014 15:29:12 +0900 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
Hello,
consider the following example Org document:
------------------------------ 8< ------------------------------
#+TITLE: Example
#+AUTHOR: Vladimir Lomov
* How ~comments~ interferes with ~noweb~
#+NAME: code1
#+BEGIN_SRC sh
var1
#+END_SRC
#+NAME: code2
#+BEGIN_SRC sh
[[ -t ${SHELL} ]]
#+END_SRC
#+BEGIN_SRC sh :noweb yes :tangle ex-sh.sh
<<code1>> = <<code1>>
<<code2>> && {
echo "HELLO..."
}
#+END_SRC
** Now ~comments~ is on
At first, ~comments~ is ~link~
#+BEGIN_SRC sh :noweb yes :tangle ex-c:link.sh :comments link
<<code1>> = <<code1>>
<<code2>> && {
echo "HELLO..."
}
#+END_SRC
Then ~comments~ is ~org~
#+BEGIN_SRC sh :noweb yes :tangle ex-c:org.sh :comments org
<<code1>> = <<code1>>
<<code2>> && {
echo "HELLO..."
}
#+END_SRC
Now ~comments~ is ~both~
#+BEGIN_SRC sh :noweb yes :tangle ex-c:both.sh :comments both
<<code1>> = <<code1>>
<<code2>> && {
echo "HELLO..."
}
#+END_SRC
And finally, ~comments~ is ~noweb~
#+BEGIN_SRC sh :noweb yes :tangle ex-c:noweb.sh :comments noweb
<<code1>> = <<code1>>
<<code2>> && {
echo "HELLO..."
}
#+END_SRC
------------------------------ 8< ------------------------------
All combinations except ':comments noweb' give expected results, while
the last one produces a file with mangled lines,
--------------------- 8< ex-c:noweb.sh 8< ----------------------
# [[file:ex.org::*Now%20~comments~%20is%20on][Now\ ~comments~\ is\ on:4]]
# [[file:~/tmp/ex.org::*How%20~comments~%20interferes%20with%20~noweb~][code1]]
var1
# code1 ends here = #
[[file:~/tmp/ex.org::*How%20~comments~%20interferes%20with%20~noweb~][code1]]
<<code1>> = var1
<<code1>> = # code1 ends here
# [[file:~/tmp/ex.org::*How%20~comments~%20interferes%20with%20~noweb~][code2]]
[[ -t ${SHELL} ]]
# code2 ends here && {
echo "HELLO..."
}
# Now\ ~comments~\ is\ on:4 ends here
------------------------------ 8< ------------------------------
Is it expected behaviour meaning a limitation of ':comments noweb' or a
bug?
I'm using Org mode:
Org-mode version 8.2.5h (release_8.2.5h-777-g5d8cc3
@/usr/share/emacs/site-lisp/org/)
---
WBR, Vladimir Lomov
--
My mother was a test tube; my father was a knife.
-- Friday
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [O] Header ':comments noweb' mangles lines in tangled code,
Vladimir Lomov <=