org-agenda.el (org-agenda-to-appt): Don't echo already added

`appt-add' returns nil when the event was already added previously.
This commit is contained in:
Oleh Krehel 2016-03-18 15:20:15 +01:00
parent ebd68ae499
commit 809a838844
1 changed files with 47 additions and 46 deletions

View File

@ -10216,15 +10216,16 @@ to override `appt-message-warning-time'."
;; FIXME: Shall we remove text-properties for the appt text?
;; (setq evt (set-text-properties 0 (length evt) nil evt))
(when (and ok tod (not (string-match "\\`DONE\\|CANCELLED" evt)))
(setq tod (concat "00" (number-to-string tod))
tod (when (string-match
(setq tod (concat "00" (number-to-string tod)))
(setq tod (when (string-match
"\\([0-9]\\{1,2\\}\\)\\([0-9]\\{2\\}\\)\\'" tod)
(concat (match-string 1 tod) ":"
(match-string 2 tod))))
(if (version< emacs-version "23.3")
(when (if (version< emacs-version "23.3")
(appt-add tod evt)
(appt-add tod evt wrn))
(setq cnt (1+ cnt))))) entries)
(setq cnt (1+ cnt))))))
entries)
(org-release-buffers org-agenda-new-buffers)
(if (eq cnt 0)
(message "No event to add")