summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Guerry <bzg@altern.org>2008-02-26 16:26:20 +0000
committerBastien Guerry <bzg@altern.org>2008-02-26 16:26:20 +0000
commit91ee57eed1ee8ba1892abb668da8ea498f010cd9 (patch)
treee1df0f5f06190548a209ce53db0ca93d4f1276db
parent24282ebf749639b27cd892ca11e4e19b10e0ad8e (diff)
downloadorg-mode-91ee57eed1ee8ba1892abb668da8ea498f010cd9.tar.gz
Fixed `org-agenda-to-appt'.
Refresh the list of appointments. Don't include appointments of deadlines, unless the deadline is for today. (org-agenda-get-day-entries file today :timestamp :scheduled) should be enough, since :timestamp also returns deadlines for today.
-rw-r--r--org.el11
1 files changed, 7 insertions, 4 deletions
diff --git a/org.el b/org.el
index f1fe3d7..01d2f82 100644
--- a/org.el
+++ b/org.el
@@ -4195,6 +4195,8 @@ If it is less than 8, the level-1 face gets re-used for level N+1 etc."
;; FIXME: get the argument lists for the UNKNOWN stuff
(declare-function add-to-diary-list "diary-lib"
(date string specifier &optional marker globcolor literal))
+(defvar appt-time-msg-list)
+(declare-function appt-check "appt" (&optional force))
(declare-function table--at-cell-p "table" (position &optional object at-column))
(declare-function Info-find-node "info" (filename nodename &optional no-going-back))
(declare-function Info-goto-node "info" (nodename &optional fork))
@@ -18577,7 +18579,6 @@ If there is already a time stamp at the cursor position, update it."
(org-insert-time-stamp
(encode-time 0 0 0 (nth 1 cal-date) (car cal-date) (nth 2 cal-date))))))
-;; Make appt aware of appointments from the agenda
;;;###autoload
(defun org-agenda-to-appt (&optional filter)
"Activate appointments found in `org-agenda-files'.
@@ -18597,6 +18598,9 @@ will only add headlines containing IMPORTANT or headlines
belonging to the category \"Work\"."
(interactive "P")
(require 'calendar)
+ (require 'appt)
+ (setq appt-time-msg-list nil)
+ (appt-check t)
(if (equal filter '(4))
(setq filter (read-from-minibuffer "Regexp filter: ")))
(let* ((cnt 0) ; count added events
@@ -18609,10 +18613,9 @@ belonging to the category \"Work\"."
(setq entries
(append entries
(org-agenda-get-day-entries
- file today
- :timestamp :scheduled :deadline))))
+ file today :timestamp :scheduled))))
(setq entries (delq nil entries))
- ;; Map thru entries and find if they pass thru the filter
+ ;; Map thru entries and find if we should filter them out
(mapc
(lambda(x)
(let* ((evt (org-trim (get-text-property 1 'txt x)))