[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [emacs-wiki-discuss] Saving day pages and planner-appt error
From: |
Jim Ottaway |
Subject: |
Re: [emacs-wiki-discuss] Saving day pages and planner-appt error |
Date: |
Tue, 07 Jun 2005 10:33:39 +0100 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
>>>>> David Lord <address@hidden> writes:
> Jim,
> Thanks for the reply. The description does have this in it: -
> This subr is advised.
> Around-advice `senator'.
> Regards
> --
> David Lord
Thanks. I don't know anything about senator; it is possible that
whatever it does to re-search-forward is interfering with the appt
updating function.
Nevertheless, I note that the original function doesn't check for an
empty schedule. Does it work if you replace the original
planner-appt-add-appts-from-schedule with the version below?
(defun planner-appt-add-appts-from-schedule ()
"Add appointment reminders from the schedule if this is today's plan."
(interactive)
(when (planner-appt-todays-page-p)
;; Delete old appts created by this function.
(planner-appt-clear-appts --planner-appt-schedule-added-appts)
(setq --planner-appt-schedule-added-appts '())
(save-excursion
(planner-seek-to-first planner-appt-schedule-section)
(let ((bound (save-excursion
(planner-appt-seek-to-end-of-current-section)))
line time text)
;; There are no entries in the schedule unless bound is
;; greater than point.
(when (> bound (point))
(while (re-search-forward
planner-appt-schedule-appt-regexp bound t)
(setq line (match-string-no-properties 0)
time (match-string-no-properties 1)
text (planner-appt-format-description
(match-string-no-properties 3)))
(unless (or (planner-appt-earlier-than-now-p time)
;; Ignore if this is an appt copied from the
;; task section.
(member line
--planner-appt-lines-added-to-section))
(appt-add time text)
;; Remember tasks added here.
(setq --planner-appt-schedule-added-appts
(planner-appt-remember-appt
time text --planner-appt-schedule-added-appts)))))))))
Regards,
--
Jim Ottaway