From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Eric Schulte" Subject: Re: Re: [babel] Error Before first headline. Date: Tue, 03 Aug 2010 16:00:08 -0600 Message-ID: <87eiefpdav.fsf@gmail.com> References: <87d3tzydwh.fsf@gmail.com> <87mxt3tyfu.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from [140.186.70.92] (port=56944 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OgPWx-0006XF-TO for emacs-orgmode@gnu.org; Tue, 03 Aug 2010 18:00:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OgPWv-0005BV-P3 for emacs-orgmode@gnu.org; Tue, 03 Aug 2010 18:00:15 -0400 Received: from mail-px0-f169.google.com ([209.85.212.169]:52374) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OgPWv-0005BR-JV for emacs-orgmode@gnu.org; Tue, 03 Aug 2010 18:00:13 -0400 Received: by pxi7 with SMTP id 7so4062331pxi.0 for ; Tue, 03 Aug 2010 15:00:12 -0700 (PDT) In-Reply-To: <87mxt3tyfu.fsf@gmail.com> (Eric Schulte's message of "Tue, 03 Aug 2010 11:09:34 -0600") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Eric Schulte Cc: Rustom Mody , emacs-orgmode --=-=-= I've fixed this problem with the attached patch. I'll push this patch up to the repository as soon as repo.or.cz comes back online (looks like it's been down for the last couple of hours) with the patch applied the following will now tangle --8<---------------cut here---------------start------------->8--- #+begin_src emacs-lisp :tangle yes (message "is a problem?") #+end_src --8<---------------cut here---------------end--------------->8--- Best -- Eric --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-ob-tangle-don-t-throw-errors-when-we-re-not-under-of.patch >From a8ff1b0319bb536eca123b77ec1e5b3f702c2ff5 Mon Sep 17 00:00:00 2001 From: Eric Schulte Date: Tue, 3 Aug 2010 11:20:48 -0600 Subject: [PATCH] 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 --- lisp/ob-tangle.el | 4 +++- 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))))) -- 1.7.0.4 --=-=-= "Eric Schulte" writes: > Oh, > > I missed the first message in this thread and didn't realize that the > previous message was a response to an existing bug report (one which > *did* include an error message and reproduction information). > > My Apologies for the harsh reply -- Eric > > also, I think the original message indicates a bug in Babel's tangling > which I will take a look at. > > "Eric Schulte" writes: > >> Hi, >> >> Please include the actual error, as well as a minimal Org-mode file >> sufficient to generate the error. The email below does not contain >> enough information to diagnose your problem. >> >> Thanks -- Eric >> >> Rustom Mody writes: >> >>>> Hi im trying to figure out how to generate sourcefiles from babel files >>> and i keep getting the same error. >>> >>> Tried putting a 'first headline' as it wants? >>> ie >>> * Dummy header >>> #+BEGIN_SRC emacs-lisp >>> (defun org-xor (a b) >>> etc >>> _______________________________________________ >>> Emacs-orgmode mailing list >>> Please use `Reply All' to send replies to the list. >>> Emacs-orgmode@gnu.org >>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode --=-=-= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --=-=-=--