From 9c489e5f73d7208c43ad099c4f376acd1f3350f9 Mon Sep 17 00:00:00 2001 From: Michael Brand Date: Sat, 1 Sep 2012 15:38:09 +0200 Subject: [PATCH] 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. --- 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))))) -- 1.7.4.2