/[emacs]/emacs/lisp/calendar/appt.el
ViewVC logotype

Diff of /emacs/lisp/calendar/appt.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.55 by kfstorm, Wed Feb 9 15:50:40 2005 UTC revision 1.56 by rms, Wed Feb 23 21:05:51 2005 UTC
# Line 189  Only relevant if reminders are being dis Line 189  Only relevant if reminders are being dis
189  Use `appt-add' and `appt-delete' to add and delete appointments.  Use `appt-add' and `appt-delete' to add and delete appointments.
190  The original list is generated from today's `diary-entries-list', and  The original list is generated from today's `diary-entries-list', and
191  can be regenerated using the function `appt-check'.  can be regenerated using the function `appt-check'.
192  Each element of the generated list has the form (MINUTES) STRING; where  Each element of the generated list has the form (MINUTES STRING [FLAG]); where
193  MINUTES is the time in minutes of the appointment after midnight, and  MINUTES is the time in minutes of the appointment after midnight, and
194  STRING is the description of the appointment.")  STRING is the description of the appointment.
195    FLAG, if non-nil, says that the element was made with `appt-add'
196    so calling `appt-make-list' again should preserve it.")
197    
198  (defconst appt-max-time 1439  (defconst appt-max-time 1439
199    "11:59pm in minutes - number of minutes in a day minus 1.")    "11:59pm in minutes - number of minutes in a day minus 1.")
# Line 493  The time should be in either 24 hour for Line 495  The time should be in either 24 hour for
495      (error "Unacceptable time-string"))      (error "Unacceptable time-string"))
496    (let* ((appt-time-string (concat new-appt-time " " new-appt-msg))    (let* ((appt-time-string (concat new-appt-time " " new-appt-msg))
497           (appt-time (list (appt-convert-time new-appt-time)))           (appt-time (list (appt-convert-time new-appt-time)))
498           (time-msg (cons appt-time (list appt-time-string))))           (time-msg (list appt-time appt-time-string t)))
499      (setq appt-time-msg-list (nconc appt-time-msg-list (list time-msg)))      (setq appt-time-msg-list (nconc appt-time-msg-list (list time-msg)))
500      (setq appt-time-msg-list (appt-sort-list appt-time-msg-list))))      (setq appt-time-msg-list (appt-sort-list appt-time-msg-list))))
501    
# Line 525  The time should be in either 24 hour for Line 527  The time should be in either 24 hour for
527                     (defvar diary-entries-list))                     (defvar diary-entries-list))
528  ;;;###autoload  ;;;###autoload
529  (defun appt-make-list ()  (defun appt-make-list ()
530    "Create the appointments list from today's diary buffer.    "Update the appointments list from today's diary buffer.
531  The time must be at the beginning of a line for it to be  The time must be at the beginning of a line for it to be
532  put in the appointments list (see examples in documentation of  put in the appointments list (see examples in documentation of
533  the function `appt-check').  We assume that the variables DATE and  the function `appt-check').  We assume that the variables DATE and
534  NUMBER hold the arguments that `list-diary-entries' received.  NUMBER hold the arguments that `list-diary-entries' received.
535  They specify the range of dates that the diary is being processed for."  They specify the range of dates that the diary is being processed for.
536    
537    Any appointments made with `appt-add' are not affected by this
538    function."
539    
540    ;; We have something to do if the range of dates that the diary is    ;; We have something to do if the range of dates that the diary is
541    ;; considering includes the current date.    ;; considering includes the current date.
# Line 544  They specify the range of dates that the Line 549  They specify the range of dates that the
549                        number)))))                        number)))))
550        (save-excursion        (save-excursion
551          ;; Clear the appointments list, then fill it in from the diary.          ;; Clear the appointments list, then fill it in from the diary.
552          (setq appt-time-msg-list nil)          (dolist (elt appt-time-msg-list)
553              ;; Delete any entries that were not made with appt-add.
554              (unless (nth 2 elt)
555                (setq appt-time-msg-list
556                      (delq elt appt-time-msg-list))))
557          (if diary-entries-list          (if diary-entries-list
558    
559              ;; Cycle through the entry-list (diary-entries-list)              ;; Cycle through the entry-list (diary-entries-list)

Legend:
Removed from v.1.55  
changed lines
  Added in v.1.56

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26