[Orgmode] Re: Is it possible to show an agenda item only if it's due?

2009-09-23 Thread J. David Boyd
PT  writes:

> Matt Lundin  imapmail.org> writes:
>> 
>> Ah I see. Another idea: write an agenda skip function that converts the
>> timestamp to universal time and ignores the entry if it is greater than
>> (current-time). Such as,
>> 
>
> Wow, I didn't you can write your own agenda skip function. The depths of 
> Org are infinite. :)
>
> Thanks. I'll try your solution.
>

Once you get it working, please share!




___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Is it possible to show an agenda item only if it's due?

2009-09-22 Thread PT
Matt Lundin  imapmail.org> writes:
> 
> Ah I see. Another idea: write an agenda skip function that converts the
> timestamp to universal time and ignores the entry if it is greater than
> (current-time). Such as,
> 

Wow, I didn't you can write your own agenda skip function. The depths of 
Org are infinite. :)

Thanks. I'll try your solution.




___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Is it possible to show an agenda item only if it's due?

2009-09-22 Thread Matt Lundin
PT  writes:

> Matt Lundin  imapmail.org> writes:
>
>> One recommendation:
>> 
>> Create an ":EVENING:" tag and filter it out in the agenda. Or,
>> optionally, create custom agenda commands for day and evening agendas
>> that pull up different results based on tags.
>> 
>
> This wouldn't work, because I have lots of different such times during
> the day which cannot be grouped into 2-3 main categories.
>
> 4pm was only an example. It can be any other time during the day and I only
> want those items to appear when their time is due.

Ah I see. Another idea: write an agenda skip function that converts the
timestamp to universal time and ignores the entry if it is greater than
(current-time). Such as,

--8<---cut here---start->8---
(defun my-skip-if-later ()
  "Skip entries that are later than the current time."
  (let ((time (or (org-entry-get nil "TIMESTAMP")
  (org-entry-get nil "SCHEDULED"
(when time
  (if (time-less-p (org-time-string-to-time time) (current-time))
  nil  ;; less than current time --> include it
(outline-next-heading) ;; otherwise move on

(setq org-agenda-custom-commands
  '(("A" "Without later items" agenda "" 
 ((org-agenda-ndays 1)
 (org-agenda-skip-function '(my-skip-if-later))
--8<---cut here---end--->8---

Note: this is just a quick example. I haven't tested it and am not sure
whether it breaks something. Also, it would become considerably more
complex if you also wanted to consider time-of-day information in the
heading.

- Matt


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Is it possible to show an agenda item only if it's due?

2009-09-22 Thread PT
Matt Lundin  imapmail.org> writes:

> One recommendation:
> 
> Create an ":EVENING:" tag and filter it out in the agenda. Or,
> optionally, create custom agenda commands for day and evening agendas
> that pull up different results based on tags.
> 

This wouldn't work, because I have lots of different such times during the day
which cannot be grouped into 2-3 main categories.

4pm was only an example. It can be any other time during the day and I only
want those items to appear when their time is due.

It would be nice if org handled a category or something which I could add
to the task and it would affect its display on the agenda.



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Is it possible to show an agenda item only if it's due?

2009-09-22 Thread Matt Lundin
PT  writes:

> I have several items on my agenda which have a time
> specification (e.g. 4pm), but it only means I should work on it
> sometime after 4pm. It can even be 8pm when I actually deal with
> the item.
>
> So there is no need for me to see the item constantly on the
> daily agenda, I'd like this item to appear only if I display the
> agenda after 4pm. I don't want to see it before the given time,
> because I can't work on it then, so it only clutters the view.
>
> Is it possible to do this with org?

One recommendation:

Create an ":EVENING:" tag and filter it out in the agenda. Or,
optionally, create custom agenda commands for day and evening agendas
that pull up different results based on tags.

- Matt


___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode