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 14:55:29 +0200 [thread overview]
Message-ID: <CALn3zohirWbYy4Qnz9V-xf5T4nnX_NNhvkL--6XbbY8uUKdvLg@mail.gmail.com> (raw)
In-Reply-To: <CALn3zoiLkmvYqB7PjhS-Xn97rqAZ0FxcAikyn9EULnLFHGgJKA@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 474 bytes --]
Hi all
On Fri, Aug 31, 2012 at 11:31 AM, Michael Brand
<michael.ch.brand@gmail.com> wrote:
> With emacs -q and today’s release_7.9-176-g2939333 I get “Wrong type
> argument: arrayp, nil” after org-babel-load-file with this file:
>
> #+BEGIN_SRC org
> ,* TODO
> , #+BEGIN_SRC emacs-lisp
> , (message "any")
> , #+END_SRC
> #+END_SRC
This issue with tangling a source block when heading has no text is
solved with the attached patch.
Michael
[-- Attachment #2: 0001-ob-tangle-Fix-bug-when-heading-has-no-text.patch.txt --]
[-- Type: text/plain, Size: 988 bytes --]
From 3e6720982352e1cf6aaa640e1dedc37ac937f9d0 Mon Sep 17 00:00:00 2001
From: Michael Brand <michael.ch.brand@gmail.com>
Date: Sat, 1 Sep 2012 14:51:42 +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..eb47e02 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))
+ (unless (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
next prev parent reply other threads:[~2012-09-01 12:55 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 [this message]
2012-09-01 13:45 ` Michael Brand
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CALn3zohirWbYy4Qnz9V-xf5T4nnX_NNhvkL--6XbbY8uUKdvLg@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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.