diff options
author | Bastien Guerry <bzg@altern.org> | 2013-02-28 10:25:21 +0100 |
---|---|---|
committer | Bastien Guerry <bzg@altern.org> | 2013-02-28 10:25:21 +0100 |
commit | 8e0b4529f780de4e442d26a7ba4aedd892c78c5b (patch) | |
tree | 0e9c339d299a5bcf4366dc9a8ea4e38953e29070 | |
parent | fb920a38ad1ff66d319e61a7c92cf8af072ab77c (diff) | |
download | org-mode-8e0b4529f780de4e442d26a7ba4aedd892c78c5b.tar.gz |
ob-tangle.el (org-babel-tangle-collect-blocks): Don't collect blocks in commented out headings
* ob-tangle.el (org-babel-tangle-collect-blocks): Don't
collect blocks in commented out headings.
Thansk to the various people who requested this.
-rw-r--r-- | lisp/ob-tangle.el | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lisp/ob-tangle.el b/lisp/ob-tangle.el index 6c79794..14ef97b 100644 --- a/lisp/ob-tangle.el +++ b/lisp/ob-tangle.el @@ -373,12 +373,13 @@ code blocks by language." (or (nth 4 (org-heading-components)) "(dummy for heading without text)") (error (buffer-file-name))))) - (let* ((start-line (save-restriction (widen) - (+ 1 (line-number-at-pos (point))))) + (let* ((start-line + (save-restriction (widen) (+ 1 (line-number-at-pos (point))))) (file (buffer-file-name)) (info (org-babel-get-src-block-info 'light)) (src-lang (nth 0 info))) - (unless (string= (cdr (assoc :tangle (nth 2 info))) "no") + (unless (or (string-match (concat "^" org-comment-string) current-heading) + (string= (cdr (assoc :tangle (nth 2 info))) "no")) (unless (and language (not (string= language src-lang))) (let* ((info (org-babel-get-src-block-info)) (params (nth 2 info)) |