summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Schulte <schulte.eric@gmail.com>2010-08-03 11:20:48 -0600
committerEric Schulte <schulte.eric@gmail.com>2010-08-04 09:20:58 -0600
commit158f5cc7266f1cf9d86865ee1beb973d7b05c0a2 (patch)
tree6743c00481a9adb5c9aebd3c1c86aace0c795652
parent23a11da5dfdc3fe61bc7668693f8b4736d38ca6d (diff)
downloadorg-mode-158f5cc7266f1cf9d86865ee1beb973d7b05c0a2.tar.gz
ob-tangle: don't throw errors when we're not under of a headline
* lisp/ob-tangle.el (org-babel-tangle-collect-blocks): don't throw errors when we're not under of a headline
-rw-r--r--lisp/ob-tangle.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/ob-tangle.el b/lisp/ob-tangle.el
index 7464f59..a7ba072 100644
--- a/lisp/ob-tangle.el
+++ b/lisp/ob-tangle.el
@@ -234,7 +234,9 @@ code blocks by language."
(setq current-heading new-heading))
(setq block-counter (+ 1 block-counter))))
(replace-regexp-in-string "[ \t]" "-"
- (nth 4 (org-heading-components))))
+ (condition-case nil
+ (nth 4 (org-heading-components))
+ (error (buffer-file-name)))))
(let* ((link (progn (call-interactively 'org-store-link)
(org-babel-clean-text-properties
(car (pop org-stored-links)))))