From a5aa4cceb272185eb05c858a042a2b2a2991c095 Mon Sep 17 00:00:00 2001 From: Piotr Zielinski Date: Sun, 16 Nov 2008 20:27:30 +0000 Subject: [PATCH] Added support for as a time specification in tag maching engine, and fixed . --- 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 "") (float-time)) - ((equal s "") - (float-time (append '(0 0 0) (nthcdr 3 (decode-time))))) + ((string= s "") (float-time)) + ((string= s "") (org-time-today)) + ((string= s "") (+ 86400.0 (org-time-today))) (t (org-2ft s)))) (defun org-match-any-p (re list) -- 1.5.2.5