emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Juan Pechiar <juan@pechiar.com>
To: Bastien <bzg@altern.org>
Cc: emacs-orgmode@gnu.org, Esben Stien <b0ef@esben-stien.name>
Subject: Re: Condition Case Before First Headline
Date: Wed, 22 Aug 2012 14:27:15 -0300	[thread overview]
Message-ID: <20120822172715.GE2280@soloJazz.com> (raw)
In-Reply-To: <87pq6ig8el.fsf@altern.org>

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


bla bla

* heading1
  CLOCK: [2012-08-22 Wed 14:18]--[2012-08-22 Wed 14:18] =>  0:00

** heading2

* otherheading1

Position 2048 refers to the (character) position of the clocktable

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 #<buffer pepe.org>)

  (condition-case nil (outline-back-to-heading invisible-ok) (error (error "Before first headline at position %d in buffer %s" (point) (current-buffer))))

  (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))))


On Wed, Aug 22, 2012 at 07:10:10PM +0200, Bastien wrote:
> Esben Stien <b0ef@esben-stien.name> 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,

  reply	other threads:[~2012-08-22 17:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-22 17:32 Condition Case Before First Headline Esben Stien
2012-08-22 17:10 ` Bastien
2012-08-22 17:27   ` Juan Pechiar [this message]
2012-08-22 17:45     ` 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:

  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=20120822172715.GE2280@soloJazz.com \
    --to=juan@pechiar.com \
    --cc=b0ef@esben-stien.name \
    --cc=bzg@altern.org \
    --cc=emacs-orgmode@gnu.org \


* 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


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).