From a5aa4cceb272185eb05c858a042a2b2a2991c095 Mon Sep 17 00:00:00 2001
From: Piotr Zielinski <[EMAIL PROTECTED]>
Date: Sun, 16 Nov 2008 20:27:30 +0000
Subject: [PATCH] Added support for <tomorrow> as a time specification in tag maching
engine, and fixed <today>.
---
 lisp/org.el |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/lisp/org.el b/lisp/org.el
index a598673..c2f4dc9 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -9256,11 +9256,16 @@ it as a time string and apply `float-time' to it.  f S is nil, just return 0."
       (error 0.)))
    (t 0.)))
 
+(defun org-time-today ()
+  "Returns the float number of seconds since the beginning of the
+epoch to the beginning of today (00:00)"
+  (float-time (apply 'encode-time (append '(0 0 0) (nthcdr 3 (decode-time))))))
+
 (defun org-matcher-time (s)
   (cond
-   ((equal s "<now>") (float-time))
-   ((equal s "<today>")
-    (float-time (append '(0 0 0) (nthcdr 3 (decode-time)))))
+   ((string= s "<now>") (float-time))
+   ((string= s "<today>") (org-time-today))
+   ((string= s "<tomorrow>") (+ 86400.0 (org-time-today)))
    (t (org-2ft s))))
 
 (defun org-match-any-p (re list)
-- 
1.5.2.5

_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

Reply via email to