From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Fuchs Subject: org-capture: file to top level with prepend Date: Sun, 3 Oct 2010 06:01:38 +0200 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=001636e903100c65c40491ae7cd5 Return-path: Received: from [140.186.70.92] (port=54727 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P2Fld-0000Nh-Uu for emacs-orgmode@gnu.org; Sun, 03 Oct 2010 00:01:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1P2Flc-0004Di-Kp for emacs-orgmode@gnu.org; Sun, 03 Oct 2010 00:01:41 -0400 Received: from mail-iw0-f169.google.com ([209.85.214.169]:44554) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1P2Flc-0004Da-H3 for emacs-orgmode@gnu.org; Sun, 03 Oct 2010 00:01:40 -0400 Received: by iwn33 with SMTP id 33so8466474iwn.0 for ; Sat, 02 Oct 2010 21:01:39 -0700 (PDT) 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: emacs-orgmode@gnu.org --001636e903100c65c40491ae7cd5 Content-Type: multipart/alternative; boundary=001636e903100c65bd0491ae7cd3 --001636e903100c65bd0491ae7cd3 Content-Type: text/plain; charset=ISO-8859-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. Regards Thomas --001636e903100c65bd0491ae7cd3 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi!

I'm trying to capture and file an entry as an top-level entr= y as first entry
in an org file without config at the beginning (no &qu= ot;#+").
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=A0 :NOT= E:\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 c= onfig header and starts with the first headline. Calling outline-next-headi= ng
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 headli= ne
and then skips jumping to next headline.

Regards
Thomas
=


--001636e903100c65bd0491ae7cd3-- --001636e903100c65c40491ae7cd5 Content-Type: application/octet-stream; name=patch Content-Disposition: attachment; filename=patch Content-Transfer-Encoding: base64 X-Attachment-Id: f_gete27b20 ZGlmZiAtLWdpdCBhL2xpc3Avb3JnLWNhcHR1cmUuZWwgYi9saXNwL29yZy1jYXB0dXJlLmVsCmlu ZGV4IDZjZTljZGQuLjQxNDNmN2IgMTAwNjQ0Ci0tLSBhL2xpc3Avb3JnLWNhcHR1cmUuZWwKKysr IGIvbGlzcC9vcmctY2FwdHVyZS5lbApAQCAtNzEyLDcgKzcxMiw4IEBAIGFscmVhZHkgZ29uZS4i CiAgICAgICAoc2V0cSBsZXZlbCAxKQogICAgICAgKGlmIHJldmVyc2VkCiAJICAocHJvZ24gKGdv dG8tY2hhciAocG9pbnQtbWluKSkKLQkJIChvdXRsaW5lLW5leHQtaGVhZGluZykpCisJCSAoaWYg KG5vdCAob3JnLWF0LWhlYWRpbmctcCkpCisJCSAgICAgKG91dGxpbmUtbmV4dC1oZWFkaW5nKSkp CiAJKGdvdG8tY2hhciAocG9pbnQtbWF4KSkKIAkob3IgKGJvbHApIChpbnNlcnQgIlxuIikpKSkK ICAgICAgKHQK --001636e903100c65c40491ae7cd5 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 --001636e903100c65c40491ae7cd5-- 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==-- 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