From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Maus Subject: Re: org-capture: file to top level with prepend Date: Fri, 15 Oct 2010 21:51:54 +0200 Message-ID: <878w1z9qud.wl%dmaus@ictsoc.de> References: Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: multipart/mixed; boundary="===============1884909347==" Return-path: Received: from [140.186.70.92] (port=55693 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P6qJu-0008Qw-5Z for emacs-orgmode@gnu.org; Fri, 15 Oct 2010 15:52:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P6qJs-0006nI-8t for emacs-orgmode@gnu.org; Fri, 15 Oct 2010 15:52:02 -0400 Received: from mysql-slave-app3.mysql1.xlhost.de ([213.202.242.107]:40417 helo=mysql1.xlhost.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P6qJs-0006mq-46 for emacs-orgmode@gnu.org; Fri, 15 Oct 2010 15:52:00 -0400 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 --===============1884909347== Content-Type: multipart/signed; boundary="pgp-sign-Multipart_Fri_Oct_15_21:51:54_2010-1"; micalg=pgp-sha256; protocol="application/pgp-signature" Content-Transfer-Encoding: 7bit --pgp-sign-Multipart_Fri_Oct_15_21:51:54_2010-1 Content-Type: multipart/mixed; boundary="Multipart_Fri_Oct_15_21:51:54_2010-1" --Multipart_Fri_Oct_15_21:51:54_2010-1 Content-Type: text/plain; charset=US-ASCII At Sun, 3 Oct 2010 06:01:38 +0200, Thomas Fuchs wrote: > > [1 ] > [1.1 ] > 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. Just resending the patch: The patchtracker[1] didn't catch it because it was attached as application/octet-stream. Best, -- David -- OpenPGP... 0x99ADB83B5A4478E6 Jabber.... dmjena@jabber.org Email..... dmaus@ictsoc.de --Multipart_Fri_Oct_15_21:51:54_2010-1 Content-Type: text/plain; charset=US-ASCII Content-Disposition: attachment; filename="patch" Content-Transfer-Encoding: base64 ZGlmZiAtLWdpdCBhL2xpc3Avb3JnLWNhcHR1cmUuZWwgYi9saXNwL29yZy1jYXB0dXJlLmVsCmlu ZGV4IDZjZTljZGQuLjQxNDNmN2IgMTAwNjQ0Ci0tLSBhL2xpc3Avb3JnLWNhcHR1cmUuZWwKKysr IGIvbGlzcC9vcmctY2FwdHVyZS5lbApAQCAtNzEyLDcgKzcxMiw4IEBAIGFscmVhZHkgZ29uZS4i CiAgICAgICAoc2V0cSBsZXZlbCAxKQogICAgICAgKGlmIHJldmVyc2VkCiAJICAocHJvZ24gKGdv dG8tY2hhciAocG9pbnQtbWluKSkKLQkJIChvdXRsaW5lLW5leHQtaGVhZGluZykpCisJCSAoaWYg KG5vdCAob3JnLWF0LWhlYWRpbmctcCkpCisJCSAgICAgKG91dGxpbmUtbmV4dC1oZWFkaW5nKSkp CiAJKGdvdG8tY2hhciAocG9pbnQtbWF4KSkKIAkob3IgKGJvbHApIChpbnNlcnQgIlxuIikpKSkK ICAgICAgKHQK --Multipart_Fri_Oct_15_21:51:54_2010-1-- --pgp-sign-Multipart_Fri_Oct_15_21:51:54_2010-1 Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iF4EABEIAAYFAky4sNoACgkQma24O1pEeOZs2gEAqLuolP82ZjAlqs3pt6S+E71L IW3lW9ODo9/Xtqgyl+wA/2GcjSCTag/RdJaTDjMrB/QaIZ8p8kYqnWOn1Q7hTUTD =Iwyk -----END PGP SIGNATURE----- --pgp-sign-Multipart_Fri_Oct_15_21:51:54_2010-1-- --===============1884909347== 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 --===============1884909347==--