emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Michael Brand <michael.ch.brand@gmail.com>
To: Org Mode <emacs-orgmode@gnu.org>
Subject: Re: [bug] org-babel-load-file
Date: Sat, 1 Sep 2012 15:45:31 +0200	[thread overview]
Message-ID: <CALn3zoh0qCWLB_3rHPbE_uaXZAPeMKHHHZusJb5OHJjxck_w7w@mail.gmail.com> (raw)
In-Reply-To: <CALn3zohirWbYy4Qnz9V-xf5T4nnX_NNhvkL--6XbbY8uUKdvLg@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 75 bytes --]

Hi all

This patch superseeds the last that introduced a new bug.

Michael

[-- Attachment #2: 0001-ob-tangle-Fix-bug-when-heading-has-no-text.patch.txt --]
[-- Type: text/plain, Size: 979 bytes --]

From 9c489e5f73d7208c43ad099c4f376acd1f3350f9 Mon Sep 17 00:00:00 2001
From: Michael Brand <michael.ch.brand@gmail.com>
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


  reply	other threads:[~2012-09-01 13:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-31  9:31 [bug] org-babel-load-file Michael Brand
2012-09-01 12:55 ` Michael Brand
2012-09-01 13:45   ` Michael Brand [this message]
2012-09-02  8:30     ` Bastien

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CALn3zoh0qCWLB_3rHPbE_uaXZAPeMKHHHZusJb5OHJjxck_w7w@mail.gmail.com \
    --to=michael.ch.brand@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).