From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bernt Hansen Subject: Re: Old entry remains in appt when the original one in org file is changed Date: Sun, 15 Jan 2012 21:44:31 -0500 Message-ID: <877h0sxt68.fsf@norang.ca> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([140.186.70.92]:36730) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RmcYo-0005O8-4v for emacs-orgmode@gnu.org; Sun, 15 Jan 2012 21:44:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RmcYm-0007Kt-Q6 for emacs-orgmode@gnu.org; Sun, 15 Jan 2012 21:44:38 -0500 Received: from mho-02-ewr.mailhop.org ([204.13.248.72]:12050) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RmcYm-0007Km-Jk for emacs-orgmode@gnu.org; Sun, 15 Jan 2012 21:44:36 -0500 In-Reply-To: (Takafumi Arakaki's message of "Fri, 13 Jan 2012 17:01:56 +0100") 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: Takafumi Arakaki Cc: emacs-orgmode@gnu.org Takafumi Arakaki 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---