Hello,
Simon Campese emacs-orgm...@campese.de writes:
I just noticed that org-babel-tangle removes the comma if its at the
beginning of a line inside a source block. This seems to be independent from
the
language indicated (tried with sh, js and emacs-lisp) and also
independent from the characters that follow (',' gets tangled to a blank
line, ',,,' gets tangled to ',,', ',sometext' gets tangled to 'sometext'
etc.).
That looks like a bug, indeed. Thank you for reporting it.
Would the following patch fix it?
Regards,
--
Nicolas Goaziou
From c9dc22ea651056d6411dd27b57a252007d97bc00 Mon Sep 17 00:00:00 2001
From: Nicolas Goaziou n.goaz...@gmail.com
Date: Wed, 27 Feb 2013 08:58:32 +0100
Subject: [PATCH] ob-tangle: Correctly unescape code when tangling
* lisp/ob-tangle.el (org-babel-spec-to-string): Use dedicated function
for unescaping code.
---
lisp/ob-tangle.el | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/lisp/ob-tangle.el b/lisp/ob-tangle.el
index 6c79794..2c2e7dd 100644
--- a/lisp/ob-tangle.el
+++ b/lisp/ob-tangle.el
@@ -346,8 +346,7 @@ form
(insert
(format
%s\n
- (replace-regexp-in-string
- ^,
+ (org-unescape-code-in-string
(org-babel-trim body (if org-src-preserve-indentation [\f\n\r\v])
(when link-p
(funcall
--
1.8.1.4