From mboxrd@z Thu Jan 1 00:00:00 1970 From: Samuel Loury Subject: org-expiry not compatible with the new drawer syntax Date: Fri, 30 Jan 2015 08:22:26 +0100 Message-ID: <87lhkkg2bx.fsf@konixwork.incubateur.ens-lyon.fr> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48514) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YH5uX-0002sW-Kr for emacs-orgmode@gnu.org; Fri, 30 Jan 2015 02:22:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YH5uU-0002Gq-B0 for emacs-orgmode@gnu.org; Fri, 30 Jan 2015 02:22:37 -0500 Received: from mail-wi0-x22e.google.com ([2a00:1450:400c:c05::22e]:64484) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YH5uU-0002Dt-3C for emacs-orgmode@gnu.org; Fri, 30 Jan 2015 02:22:34 -0500 Received: by mail-wi0-f174.google.com with SMTP id n3so981782wiv.1 for ; Thu, 29 Jan 2015 23:22:32 -0800 (PST) Received: from localhost (162.48.7.109.rev.sfr.net. [109.7.48.162]) by mx.google.com with ESMTPSA id a20sm5610997wic.16.2015.01.29.23.22.31 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 29 Jan 2015 23:22:31 -0800 (PST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: OrgMode ML --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Dear All, I am running the version cd6fa4c15e8e35afa6beb9e89ad3723fb82df091 (git sha) of org-mode. I just realized that when creating a new entry in my org-diary (`org-agenda-add-entry-to-org-agenda-diary-file'), the entry looks like: =2D-8<---------------cut here---------------start------------->8--- ** test <2015-01-30 Fri> :PROPERTIES: :CREATED: [2015-01-30 Fri 08:00] :END: =2D-8<---------------cut here---------------end--------------->8--- The property is added by an call to `org-expiry-insert-created' in the `org-insert-heading-hook'. see in contrib/lisp/org-expiry.el:179 With more details: In the process in inserting the diary entry, `org-agenda-add-entry-to-org-agenda-diary-file' calls (lisp/org-agenda.el:9460) `org-agenda-insert-diary-as-top-level' (lisp/org-agenda.el:9479). The later then calls `org-insert-heading' (calling the org-expiry hook that creates the property drawer), and inserts the text of the heading followed by a new line, resulting in the insertion of: =2D-8<---------------cut here---------------start------------->8--- ** test :PROPERTIES: :CREATED: [2015-01-30 Fri 08:00] :END: =2D-8<---------------cut here---------------end--------------->8--- Then `org-agenda-add-entry-to-org-agenda-diary-file' inserts the timestamp, resulting in: =2D-8<---------------cut here---------------start------------->8--- ** test <2015-01-30 Fri> :PROPERTIES: :CREATED: [2015-01-30 Fri 08:00] :END: =2D-8<---------------cut here---------------end--------------->8--- This is not compatible with the new drawer syntax (see http://article.gmane.org/gmane.emacs.orgmode/91752). My opinion is that we should either consider that adding a property in `org-insert-heading-hook' is a bad practice or change the functions that create entries to make sure they move beyond a potentially created properties drawer before adding extra information such as timestamps. What is your opinion? Best regards, =2D-=20 Konubinix GPG Key : 7439106A Fingerprint: 5993 BE7A DA65 E2D9 06CE 5C36 75D2 3CED 7439 106A --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJUyzEyAAoJEHXSPO10ORBq7EMIAKWmZmWGVqvolzzXzgMWXYX5 LYa14oO7erW37BoEDmMVf5T8tYqHD6Ue+kvS50zXJS+5WYdZbCBJ21LJaj5uiTq2 K3i6YmXGGWdxcfnIiyL9ni+H9tqstu4LBmjUJViAdGAevsYKdtWZ3F1yCJB74tz+ wUVCQgeNanDrXSPOUXJvVIFUzsRykv88NtduGuyvmm4+Wtlz/X7QUkcy0l5Bm3BL vtvYm2E/fEv0qrpFcKJb3ypjX1rNGKTIXhtLeyGQCAVrozrCHqVMatlC2RHCxhH/ gyaPYUzU226sn74oOwI2XDzmgMyx0cVSLRWfq46YmfiA7C/Y1gVSkFxXOvR2pi8= =HudS -----END PGP SIGNATURE----- --=-=-=--