* [bug] org-babel-load-file
@ 2012-08-31 9:31 Michael Brand
2012-09-01 12:55 ` Michael Brand
0 siblings, 1 reply; 4+ messages in thread
From: Michael Brand @ 2012-08-31 9:31 UTC (permalink / raw)
To: Org Mode
Hi all
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
Michael
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [bug] org-babel-load-file
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
0 siblings, 1 reply; 4+ messages in thread
From: Michael Brand @ 2012-09-01 12:55 UTC (permalink / raw)
To: Org Mode
[-- 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
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-09-02 11:46 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2012-09-02 8:30 ` Bastien
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).