emacs-orgmode
[Top][All Lists]
Advanced

[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: Bernt Hansen
Subject: Re: [O] Old entry remains in appt when the original one in org file is changed
Date: Sun, 15 Jan 2012 21:44:31 -0500
User-agent: Gnus/5.110018 (No Gnus v0.18) Emacs/23.2 (gnu/linux)

Takafumi Arakaki <address@hidden> writes:

> I am using org-agenda-to-appt and I noticed a bug.
>
>
> 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. 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 guess a workaround will be removing any entries which has
> org-heading as property from appt-time-msg-list before adding the new
> entries.
>
> I think this guy had the same problem:
> http://article.gmane.org/gmane.emacs.orgmode/8008/

Hi Takafumi,

This is the setup I use to deal with this.

There is no magic that updates your appt-time-msg-list just because your
org file changed.  I regenerate the appointment list everytime I visit
the agenda -- and I do that often.

HTH,
Bernt


--8<---------------cut here---------------start------------->8---
; Erase all reminders and rebuilt reminders for today from the agenda
(defun bh/org-agenda-to-appt ()
  (interactive)
  (setq appt-time-msg-list nil)
  (org-agenda-to-appt))

; Rebuild the reminders everytime the agenda is displayed
(add-hook 'org-finalize-agenda-hook 'bh/org-agenda-to-appt 'append)

; This is at the end of my .emacs - so appointments are set up when Emacs starts
(bh/org-agenda-to-appt)

; Activate appointments so we get notifications
(appt-activate t)

; If we leave Emacs running overnight - reset the appointments one minute after 
midnight
(run-at-time "24:01" nil 'bh/org-agenda-to-appt)

--8<---------------cut here---------------end--------------->8---



reply via email to

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