From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: org-capture: file to top level with prepend Date: Sat, 16 Oct 2010 07:17:18 +0200 Message-ID: <9B1DD909-1B19-4DD1-B3FF-C6FAFB1EAFBD@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 [140.186.70.92] (port=53570 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P6z92-0005mD-Qr for emacs-orgmode@gnu.org; Sat, 16 Oct 2010 01:17:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P6z91-0002JQ-Ub for emacs-orgmode@gnu.org; Sat, 16 Oct 2010 01:17:24 -0400 Received: from mail-ew0-f41.google.com ([209.85.215.41]:59918) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P6z91-0002JK-Q1 for emacs-orgmode@gnu.org; Sat, 16 Oct 2010 01:17:23 -0400 Received: by ewy5 with SMTP id 5so1136944ewy.0 for ; Fri, 15 Oct 2010 22:17:22 -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: Thomas Fuchs Cc: emacs-orgmode@gnu.org Applied, thanks. - Carsten On Oct 3, 2010, at 6:01 AM, Thomas Fuchs wrote: > Hi! > > I'm trying to capture and file an entry as an top-level entry as > first entry > in an org file without config at the beginning (no "#+"). > This leads to filing the entry as _second_ headline in the org file. > > The template is: > ("z" "test" entry (file "~/Data/z.org") "* %^{Note} %t :NOTE:\n > %?" :prepend t) > > I think this is due to jumping over lines starting with "#+" at the > beginning of the org file > (line 715 in org-capture.el (org-capture-place-entry)). > My file has no config header and starts with the first headline. > Calling outline-next-heading > in this situation leads to jumping to the second headline in the file. > > The appended patch fixes this problem by checking if we are on a > headline > and then skips jumping to next headline. > > Regards > Thomas > > > > _______________________________________________ > 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