diff options
author | Michael Brand <michael.ch.brand@gmail.com> | 2012-09-01 15:38:09 +0200 |
---|---|---|
committer | Bastien Guerry <bzg@altern.org> | 2012-09-02 10:30:40 +0200 |
commit | 9852ad9418e57548b71b48aa84eb0ef9153fc60c (patch) | |
tree | 9a25cd0fc2b1e316842295a6b27fa1f88274ef0c | |
parent | 8d09d1aaa9534d63d40f27c79737ab89664b4e3b (diff) | |
download | org-mode-9852ad9418e57548b71b48aa84eb0ef9153fc60c.tar.gz |
ob-tangle: Fix bug when heading has no text
* lisp/ob-tangle.el (org-babel-tangle-collect-blocks): Use dummy
string when heading has no text.
-rw-r--r-- | lisp/ob-tangle.el | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/ob-tangle.el b/lisp/ob-tangle.el index 5bf70fe..7077a15 100644 --- a/lisp/ob-tangle.el +++ b/lisp/ob-tangle.el @@ -360,7 +360,8 @@ code blocks by language." (setq block-counter (+ 1 block-counter)))) (replace-regexp-in-string "[ \t]" "-" (condition-case nil - (nth 4 (org-heading-components)) + (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))))) |