[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Emacs-orgmode] todo and deadline highlighting

From: Carsten Dominik
Subject: Re: [Emacs-orgmode] todo and deadline highlighting
Date: Tue, 20 Jun 2006 09:09:39 +0200

This looks like it is doing the right thing.

- Carsten

On Jun 19, 2006, at 22:09, Piotr Zielinski wrote:

On 12/06/06, Carsten Dominik <address@hidden> wrote:

On Jun 8, 2006, at 1:34, Piotr Zielinski wrote:

> The following two functions redefine org-show-todo-tree, so that TODO
> items SCHEDULED for the future are not highlighted.  Only
> non-scheduled TODO items or TODO items scheduled for the past or
> present are highlighted. The SCHEDULED directive must be on the same
> line as the TODO keyword.

This is another interesting idea, but the search must allow more than
the current line.  Everything up to the next headline  (or any level)
should be searched.

Another try:

(defun org-todo-is-current ()
 "Checks whether a TODO item is current."
 (if (re-search-forward org-scheduled-time-regexp
                         (save-excursion (outline-next-heading) (point)) t)
     (let ((today (calendar-absolute-from-gregorian
            (timestamp (time-to-days
                        (org-time-string-to-time (match-string 1)))))
        (<= timestamp today))


Carsten Dominik
Sterrenkundig Instituut "Anton Pannekoek"
Universiteit van Amsterdam
Kruislaan 403
NL-1098SJ Amsterdam
phone: +31 20 525 7477

reply via email to

[Prev in Thread] Current Thread [Next in Thread]