From: Martin Svenson <phromo@mail.com>
To: emacs-orgmode@gnu.org
Subject: Visual indication on unscheduled TODOs
Date: Wed, 1 Dec 2010 21:30:45 +0100 [thread overview]
Message-ID: <AANLkTimmtGvzfykZ_e3fTOkdTtcgESOxxDCC7WroGjGe@mail.gmail.com> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 1404 bytes --]
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
[-- Attachment #1.2: Type: text/html, Size: 1661 bytes --]
[-- Attachment #2: Type: text/plain, Size: 201 bytes --]
_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode
next reply other threads:[~2010-12-01 20:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-01 20:30 Martin Svenson [this message]
2010-12-02 1:31 ` Visual indication on unscheduled TODOs Matt Lundin
-- strict thread matches above, loose matches on Subject: below --
2010-12-01 20:29 Martin Svenson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=AANLkTimmtGvzfykZ_e3fTOkdTtcgESOxxDCC7WroGjGe@mail.gmail.com \
--to=phromo@mail.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).