* Visual indication on unscheduled TODOs
@ 2010-12-01 20:29 Martin Svenson
0 siblings, 0 replies; 3+ messages in thread
From: Martin Svenson @ 2010-12-01 20:29 UTC (permalink / raw)
To: emacs-orgmode
[-- 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: 1596 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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Visual indication on unscheduled TODOs
@ 2010-12-01 20:30 Martin Svenson
2010-12-02 1:31 ` Matt Lundin
0 siblings, 1 reply; 3+ messages in thread
From: Martin Svenson @ 2010-12-01 20:30 UTC (permalink / raw)
To: emacs-orgmode
[-- 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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Visual indication on unscheduled TODOs
2010-12-01 20:30 Martin Svenson
@ 2010-12-02 1:31 ` Matt Lundin
0 siblings, 0 replies; 3+ messages in thread
From: Matt Lundin @ 2010-12-02 1:31 UTC (permalink / raw)
To: Martin Svenson; +Cc: emacs-orgmode
Martin Svenson <phromo@mail.com> writes:
> 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.
> ...
> ...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...)
Within an org buffer, I would use a sparse tree:
C-c / m
-SCHEDULED={.}/!
This tells org to highlight anything that does not have a scheduled
property. The "/!" tells Org to limit the search to active todos.
To see all unscheduled todos across my agenda files, I would use:
--8<---------------cut here---------------start------------->8---
(add-to-list 'org-agenda-custom-commands
'("u" "Unscheduled" alltodo ""
((org-agenda-todo-ignore-scheduled t))))
--8<---------------cut here---------------end--------------->8---
Best,
Matt
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-12-02 1:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-01 20:29 Visual indication on unscheduled TODOs Martin Svenson
-- strict thread matches above, loose matches on Subject: below --
2010-12-01 20:30 Martin Svenson
2010-12-02 1:31 ` Matt Lundin
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).