emacs-orgmode
[Top][All Lists]
Advanced

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

[Orgmode] Visual indication on unscheduled TODOs


From: Martin Svenson
Subject: [Orgmode] Visual indication on unscheduled TODOs
Date: Wed, 1 Dec 2010 21:29:26 +0100

Hi (this is my first post),

I'm trying to get a visual hint that a certain TODO is unscheduled, so that I can immediately see this when I go through the outline during regular reviews.

My first strategy was to try and add a font-lock hook to achieve this multiline font-lock behaviour:

See
http://paste.lisp.org/+2IFV

However, this failed. I presume my added faces are being overwritten by org-mode since the hook is being called before org-mode writes the faces. What could I do about that?

My second option was to write an interactive function:

(defun org-mark-unscheduled ()
  (interactive) 
  (save-excursion
    (goto-char (point-min))
    (while (re-search-forward org-complex-heading-regexp nil t)
      (let* ((state (match-string 2))   
         (state-start (match-beginning 2))
         (state-end (match-end 2))
         (scheduled (org-entry-get nil "SCHEDULED"))
         (deadline (org-entry-get nil "DEADLINE")))
    (when (and (not scheduled) state-start state-end)
      (overlay-put
       (make-overlay state-start state-end)
       'face 'org-todo-scheduled))))))

This works quite well but I get the nagging feeling I'm going about this the wrong way. Surely, being able to see which items are due for scheduling is a common task? (I do note that I could search for them, but then I would not have the context of the actually scheduled tasks in the same view...)

Regards,
Martin

reply via email to

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