[Orgmode] [PATCH] Added support for tomorrow as a time specification in tag maching engine, and fixed today.

2008-11-16 Thread Piotr Zielinski

From a5aa4cceb272185eb05c858a042a2b2a2991c095 Mon Sep 17 00:00:00 2001
From: Piotr Zielinski [EMAIL PROTECTED]
Date: Sun, 16 Nov 2008 20:27:30 +
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


Re: [Orgmode] [PATCH] Added support for tomorrow as a time specification in tag maching engine, and fixed today.

2008-11-16 Thread Carsten Dominik

Hi Piotr,

how nice to hear from you and to find out that you are still around,  
using Org-mode.


I have applied your patch, thanks.

- Carsten

On Nov 16, 2008, at 11:10 PM, Piotr Zielinski wrote:



0006-Added-support-for-tomorrow-as-a-time- 
specification.patch___

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




___
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