emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] org-expiry not compatible with the new drawer syntax


From: Samuel Loury
Subject: Re: [O] org-expiry not compatible with the new drawer syntax
Date: Fri, 30 Jan 2015 11:35:17 +0100
User-agent: Notmuch/0.18.2 (http://notmuchmail.org) Emacs/24.4.1 (x86_64-pc-linux-gnu)

Samuel Loury <address@hidden> writes:

> Nicolas Goaziou <address@hidden> writes:
>
>> Samuel Loury <address@hidden> writes:
>>
>>> 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:
>>>
>>> ** test
>>>   <2015-01-30 Fri>
>>>    :PROPERTIES:
>>>    :CREATED:  [2015-01-30 Fri 08:00]
>>>    :END:
>>>
>>> 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:
>>
>> Actually, AFAICT, the sole function calling `org-insert-heading' in
>> "org-agenda.el" is `org-agenda-insert-diary-make-new-entry'. I fixed it
>> so it properly puts point on the right spot in the entry.
>
> The function `org-agenda-insert-diary-as-top-level' is a few line above
> the one you patched.
>
> I copied the code you've written in
> `org-agenda-insert-diary-make-new-entry' and I've put it in
> `org-agenda-insert-diary-as-top-level'. This fixes my problem. Please
> find attached the associated patch.

I just realized that the call to `org-insert-heading' was into one of my
local patches.

Actually, I think this patch may be worth applying to prior to the one I
just sent.

Please, find it attached to this email.

Attachment: 0001-Make-use-of-org-insert-heading-instead-of-inserting-.patch
Description: Text Data

It makes sure the `org-insert-heading' is called instead of hard-coding
its behavior by inserting the "*" character. I initially made this patch
to make sure the org-expiry hook is called whenever I create diary
entries.

-- 
Konubinix
GPG Key    : 7439106A
Fingerprint: 5993 BE7A DA65 E2D9 06CE  5C36 75D2 3CED 7439 106A

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]