[Top][All Lists]

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

Re: [Emacs-orgmode] todo and deadline highlighting

From: Piotr Zielinski
Subject: Re: [Emacs-orgmode] todo and deadline highlighting
Date: Mon, 19 Jun 2006 21:09:51 +0100

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))


reply via email to

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