emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Carsten Dominik <dominik@science.uva.nl>
To: Piotr Zielinski <piotr.zielinski@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: todo and deadline highlighting
Date: Tue, 20 Jun 2006 09:09:39 +0200	[thread overview]
Message-ID: <51495e013973953fee5ddac4741cd7a2@science.uva.nl> (raw)
In-Reply-To: <3c12eb8d0606191309m24dc4cd3p7c73f14229a17f09@mail.gmail.com>

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 <dominik@science.uva.nl> 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
> 		    (calendar-current-date)))
> 	    (timestamp (time-to-days
> 			(org-time-string-to-time (match-string 1)))))
> 	(<= timestamp today))
>    t))
>
>
> Piotr
>
>

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

      reply	other threads:[~2006-06-20  7:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-07 23:34 todo and deadline highlighting Piotr Zielinski
2006-06-12 21:16 ` Carsten Dominik
2006-06-19 20:09   ` Piotr Zielinski
2006-06-20  7:09     ` Carsten Dominik [this message]

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=51495e013973953fee5ddac4741cd7a2@science.uva.nl \
    --to=dominik@science.uva.nl \
    --cc=emacs-orgmode@gnu.org \
    --cc=piotr.zielinski@gmail.com \
    /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).