From mboxrd@z Thu Jan 1 00:00:00 1970 From: Juan Pechiar Subject: Re: Condition Case Before First Headline Date: Wed, 22 Aug 2012 14:27:15 -0300 Message-ID: <20120822172715.GE2280@soloJazz.com> References: <871uiy96jj.fsf@quasar.esben-stien.name> <87pq6ig8el.fsf@altern.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([208.118.235.92]:35452) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T4EiF-0007MR-5U for emacs-orgmode@gnu.org; Wed, 22 Aug 2012 13:27:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T4Ei8-0006IN-7i for emacs-orgmode@gnu.org; Wed, 22 Aug 2012 13:27:27 -0400 Received: from oproxy9.bluehost.com ([69.89.24.6]:45547) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1T4Ei7-0006I2-RS for emacs-orgmode@gnu.org; Wed, 22 Aug 2012 13:27:20 -0400 Content-Disposition: inline In-Reply-To: <87pq6ig8el.fsf@altern.org> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Bastien Cc: emacs-orgmode@gnu.org, Esben Stien I can reproduce this (latest git version) if the clocktable declaration lies before the first heading. Minimal example: ============================================================ bla bla #+BEGIN: clocktable :maxlevel 7 :block yesterday :scope tree1 #+END: bla bla * heading1 :LOGBOOK: CLOCK: [2012-08-22 Wed 14:18]--[2012-08-22 Wed 14:18] => 0:00 :END: ** heading2 * otherheading1 ============================================================ Position 2048 refers to the (character) position of the clocktable declaration. Debug trace: ============================================================ signal(error ("Before first headline at position 83 in buffer pepe.org")) error("Before first headline at position %d in buffer %s" 83 #) (condition-case nil (outline-back-to-heading invisible-ok) (error (error "Before first headline at position %d in buffer %s" (point) (current-buffer)))) org-back-to-heading(t) (let (start-level re) (org-back-to-heading t) (setq start-level (funcall outline-level)) (if (equal start-level 1) nil (setq re (concat "^\\*\\{1," (number-to-string (1- start-level)) "\\} ")) (if (re-search-backward re nil t) (funcall outline-level)))) org-up-heading-safe() ... ============================================================ On Wed, Aug 22, 2012 at 07:10:10PM +0200, Bastien wrote: > Esben Stien writes: > > > I've stumbled into serious trouble with my org file. > > What version of org are you using? > > > I C-c C-c over: > > > > #+BEGIN: clocktable :maxlevel 7 :block yesterday :scope tree1 > > > > , but I get: > > > > condition-case: Before first headline at position 2408 in buffer agenda.org > > > > I cannot figure out what's wrong; there's nothing special at line 2408 > > > > Is there some way to debug this? > > Can you make a minimal example to help us reproduce this? > > Thanks, >