emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Bernt Hansen <bernt@norang.ca>
To: Takafumi Arakaki <aka.tkf@gmail.com>
Cc: emacs-orgmode@gnu.org
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	[thread overview]
Message-ID: <877h0sxt68.fsf@norang.ca> (raw)
In-Reply-To: <CAPM+gBQCFxWALibqi5Xni0HX10fhjmtZNPPKMRuCBuw4+Jmo0w@mail.gmail.com> (Takafumi Arakaki's message of "Fri, 13 Jan 2012 17:01:56 +0100")

Takafumi Arakaki <aka.tkf@gmail.com> 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	other threads:[~2012-01-16  2:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-13 16:01 Old entry remains in appt when the original one in org file is changed Takafumi Arakaki
2012-01-16  2:44 ` Bernt Hansen [this message]
2012-01-17  7:02   ` Takafumi Arakaki
2012-01-17 15:01     ` Bernt Hansen
2012-01-18 18:01       ` Takafumi Arakaki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=877h0sxt68.fsf@norang.ca \
    --to=bernt@norang.ca \
    --cc=aka.tkf@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).