From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Error when invoking remember before the first header of org file Date: Thu, 1 Oct 2009 13:14:28 +0200 Message-ID: <9FB62AB4-8A1B-42C1-8195-42F0CE5CA9AD@gmail.com> References: Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MtJcM-000515-3t for emacs-orgmode@gnu.org; Thu, 01 Oct 2009 07:14:38 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MtJcH-0004tD-8h for emacs-orgmode@gnu.org; Thu, 01 Oct 2009 07:14:37 -0400 Received: from [199.232.76.173] (port=48952 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MtJcH-0004t3-3u for emacs-orgmode@gnu.org; Thu, 01 Oct 2009 07:14:33 -0400 Received: from ey-out-1920.google.com ([74.125.78.144]:60157) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MtJcG-0005UN-7k for emacs-orgmode@gnu.org; Thu, 01 Oct 2009 07:14:32 -0400 Received: by ey-out-1920.google.com with SMTP id 3so52059eyh.34 for ; Thu, 01 Oct 2009 04:14:31 -0700 (PDT) In-Reply-To: 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: PT Cc: emacs-orgmode@gnu.org Hi PT, please always try the latest version before reporting a bug. The bug might be fixed already. This particular bug was fixed on September 4th. http://repo.or.cz/w/org-mode.git?a=commit;h=206660bc8c02e5025d5f43cd3e5fb36c2fe0c8f3 - Carsten On Oct 1, 2009, at 12:40 PM, PT wrote: > I have remember set up, so that new notes always go to a certain org > file under a certain header: > > > (setq org-default-notes-file (concat org-directory "/todo.org")) > (setq org-remember-default-headline "capture") > (setq org-remember-templates > '(("Todo" ?t "* TODO %?"))) > > > It works well, but if I'm at the beginning of an org file, before the > first header then M-x org-remember bails out with an error. > > Is it a bug? Why does it care where I'm standing in the file? > > Org-mode version 6.30: > > Debugger entered--Lisp error: (error "Before first headline at > position 1 > in buffer work.org") > signal(error ("Before first headline at position 1 in buffer > work.org")) > error("Before first headline at position %d in buffer %s" > 1 #) > byte-code(" `p# " [error "Before first headline at position %d > in buffer %s"] 4) > org-back-to-heading(t) > org-heading-components() > org-store-link(nil) > org-remember-annotation() > run-hook-with-args-until-success(org-remember-annotation) > remember(nil) > org-do-remember() > org-remember(nil) > call-interactively(org-remember t nil) > execute-extended-command(nil) > call-interactively(execute-extended-command nil nil) > > > > > > _______________________________________________ > Emacs-orgmode mailing list > Remember: use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode