[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Old entry remains in appt when the original one in org file is c
From: |
Takafumi Arakaki |
Subject: |
Re: [O] Old entry remains in appt when the original one in org file is changed |
Date: |
Tue, 17 Jan 2012 08:02:26 +0100 |
Hi Bernt,
Thanks for your setup recipe. However, I noticed I failed to explain
what I meant; the old entry remains in appt-time-msg-list even if you
call org-agenda-to-appt.
So, the procedure to reproduce my problem is the following:
1. Add the following in the agenda file
* TODO test
SCHEDULED: <2012-01-14 Sat 12:00>
2. Call org-agenda-to-appt
3. Change the SCHEDULED time-stamp in the entry like this
* TODO test
SCHEDULED: <2012-01-14 Sat 12:00>
4. Call org-agenda-to-appt again # ADDED THIS
5. appt-time-msg-list has the old entry
((1380)
#("12:00 TODO test" 6 15
(org-heading t))
t)
((1390)
#("12:10 TODO test" 6 15
(org-heading t))
t)
I found how to fix this. You can tell org-agenda-to-appt forcefully
clear the old entries by passing non-nil to the first argument of
org-agenda-to-appt.
This is how I use it:
(defun my-org-agenda-to-appt-when-saved ()
(when (member buffer-file-name (mapcar 'expand-file-name org-agenda-files))
(org-agenda-to-appt t)))
(add-hook 'after-save-hook 'my-org-agenda-to-appt-when-saved)
Note that this will clear all entries stored in appt, including the
ones unrelated to org-mode. But if you are using appt only from
org-mode, there is no problem.
--
Takafumi