[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [emacs-wiki-discuss] Re: Duplicate appointments with planner-appt
From: |
Jim Ottaway |
Subject: |
Re: [emacs-wiki-discuss] Re: Duplicate appointments with planner-appt |
Date: |
Thu, 23 Jun 2005 13:02:16 +0100 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
>>>>> Jim Ottaway <address@hidden> writes:
> Good point, I was thinking that some of the later 21.3 versions might
> have the change, but I see that they don't. I will improve on the
> "solution" I posted a while ago.
Here's another, better solution to the duplicate appt bug.
Also at:
Location: http://www.users.zetnet.co.uk/jeho/archives/2005
Archive name: address@hidden
Branch: planner--jeho--1.0
Patch: 74
--- orig/planner-appt.el
+++ mod/planner-appt.el
@@ -516,20 +516,29 @@
Tracks appointments ignored because they were too early.")
(defun planner-appt-clear-appts (appt-list)
- "Clear appointments in APPT-LIST from the alert list."
- (while appt-list
+ (while appt-list
(setq appt-time-msg-list
(delete (pop appt-list) appt-time-msg-list))))
+(eval-and-compile
+ (if (> emacs-major-version 21)
+ (defun planner-appt-make-appt-element (time text)
+ (list
+ (list (appt-convert-time time))
+ (concat time " " text)
+ t))
+ (defun planner-appt-make-appt-element (time text)
+ (list
+ (list (appt-convert-time time))
+ (concat time " " text)))))
+
+
(defun planner-appt-remember-appt (time text list)
"Store details of an appointment with TIME and TEXT in LIST.
Return the new list."
;; NB: copies the format from appt.el; could
;; break if the format is ever changed
- (push (list
- (list (appt-convert-time time))
- (concat time " " text))
- list))
+ (push (planner-appt-make-appt-element time text) list))
(defun planner-appt-forget-appt (appt appt-list)
"Remove APPT from APPT-LIST and return the new list.
@@ -625,8 +634,10 @@
(defun planner-appt-task-member (description time appt-list)
"Return non-nil if DESCRIPTION at TIME in APPT-LIST has been scheduled."
- (let ((appt (concat time " " description)))
- (member (list (list (appt-convert-time appt)) appt) appt-list)))
+ (member (planner-appt-make-appt-element time description) appt-list))
+;; (let ((appt (concat time " " description)))
+
+;; (member (list (list (appt-convert-time appt)) appt) appt-list)))
@@ -775,7 +786,7 @@
(progn
;; Remember earlier appts separately [principally for
;; their addition in an appointment section].
- (unless (planner-appt-task-member
+ (unless (planner-appt-task-member
desc time --planner-appt-tasks-earlier-appts)
(setq --planner-appt-tasks-earlier-appts
(planner-appt-remember-appt
- [emacs-wiki-discuss] planner-browse-position-url quick fix, Romain Francoise, 2005/06/21
- [emacs-wiki-discuss] Re: planner-browse-position-url quick fix, Sacha Chua, 2005/06/21
- [emacs-wiki-discuss] Re: planner-browse-position-url quick fix, Romain Francoise, 2005/06/21
- [emacs-wiki-discuss] Re: planner-browse-position-url quick fix, Sacha Chua, 2005/06/22
- [emacs-wiki-discuss] Re: planner-browse-position-url quick fix, Romain Francoise, 2005/06/22
- Re: [emacs-wiki-discuss] Re: planner-browse-position-url quick fix, Jim Ottaway, 2005/06/22
- [emacs-wiki-discuss] Duplicate appointments with planner-appt (was: planner-browse-position-url quick fix), Romain Francoise, 2005/06/23
- Re: [emacs-wiki-discuss] Duplicate appointments with planner-appt, Jim Ottaway, 2005/06/23
- [emacs-wiki-discuss] Re: Duplicate appointments with planner-appt, Romain Francoise, 2005/06/23
- Re: [emacs-wiki-discuss] Re: Duplicate appointments with planner-appt, Jim Ottaway, 2005/06/23
- Re: [emacs-wiki-discuss] Re: Duplicate appointments with planner-appt,
Jim Ottaway <=
- [emacs-wiki-discuss] Re: Duplicate appointments with planner-appt, Romain Francoise, 2005/06/23
- [emacs-wiki-discuss] trailing whitespace and such (was: Re: Duplicate appointments with planner-appt), Vadim Nasardinov, 2005/06/23
- [emacs-wiki-discuss] Re: trailing whitespace and such, Romain Francoise, 2005/06/23
- Re: [emacs-wiki-discuss] Re: Duplicate appointments with planner-appt, Jim Ottaway, 2005/06/23
- Re: [emacs-wiki-discuss] Duplicate appointments with planner-appt, Jim Ottaway, 2005/06/23
- [emacs-wiki-discuss] Welcome to Planner (was Re: planner-browse-position-url quick fix), Sacha Chua, 2005/06/22
- [emacs-wiki-discuss] Re: Welcome to Planner, Romain Francoise, 2005/06/23
- [emacs-wiki-discuss] Re: Welcome to Planner, Romain Francoise, 2005/06/24
- [emacs-wiki-discuss] Re: Welcome to Planner, Romain Francoise, 2005/06/24
- [emacs-wiki-discuss] Re: planner-browse-position-url quick fix, Zak B. Elep, 2005/06/23