* two custom agenda view questions
@ 2009-09-23 23:14 Michael Gilbert
2009-09-24 3:05 ` Matt Lundin
0 siblings, 1 reply; 3+ messages in thread
From: Michael Gilbert @ 2009-09-23 23:14 UTC (permalink / raw)
To: org-mode Mailinglist
Hi --
Still too much of a newbie to figure this out on my own. I get lost in
the Lisp still.
(1) I want to define a custom agenda view that displays only those
tasks that have today as a deadline or are past-due. Since many of my
tasks also have scheduled timestamps, sometimes these end up being the
same day. It looks to me as if they will be left out if I skip
scheduled items, even if they also have a current deadline. How can I
finesse this?
(2) Eventually, I want to create a DONE log of copies of items as they
get finished, with contextual data retained. But for right now, all I
want is to be able to switch to an agenda view of tasks that were
complete today. I've tried a few ideas that seemed like low-hanging
fruit here, but no luck.
Anyone willing to help out with these? Thank you so much!
-- Michael
Michael C. Gilbert -- mcg@gilbert.org
The Gilbert Center -- http://gilbert.org
Nonprofit Online News -- http://nonprofitnews.org
"There can be no joy of life without joy of work." -- Aquinas
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: two custom agenda view questions
2009-09-23 23:14 two custom agenda view questions Michael Gilbert
@ 2009-09-24 3:05 ` Matt Lundin
[not found] ` <45063E9A-B5D0-44BC-A9F3-799B5492AECB@gilbert.org>
0 siblings, 1 reply; 3+ messages in thread
From: Matt Lundin @ 2009-09-24 3:05 UTC (permalink / raw)
To: Michael Gilbert; +Cc: org-mode Mailinglist
Michael Gilbert <mcg@gilbert.org> writes:
> Still too much of a newbie to figure this out on my own. I get lost in
> the Lisp still.
>
> (1) I want to define a custom agenda view that displays only those
> tasks that have today as a deadline or are past-due. Since many of my
> tasks also have scheduled timestamps, sometimes these end up being the
> same day. It looks to me as if they will be left out if I skip
> scheduled items, even if they also have a current deadline. How can I
> finesse this?
--8<---------------cut here---------------start------------->8---
(setq org-agenda-custom-commands
'(("d" "Due today" agenda ""
((org-deadline-warning-days 1)
(org-agenda-skip-scheduled-if-deadline-is-shown t)
(org-agenda-skip-function '(org-agenda-skip-entry-if 'notdeadline))))))
--8<---------------cut here---------------end--------------->8---
> (2) Eventually, I want to create a DONE log of copies of items as they
> get finished, with contextual data retained. But for right now, all I
> want is to be able to switch to an agenda view of tasks that were
> complete today. I've tried a few ideas that seemed like low-hanging
> fruit here, but no luck.
Type "l" in the agenda for log mode.
- Matt
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: two custom agenda view questions
[not found] ` <45063E9A-B5D0-44BC-A9F3-799B5492AECB@gilbert.org>
@ 2009-09-24 15:59 ` Matthew Lundin
0 siblings, 0 replies; 3+ messages in thread
From: Matthew Lundin @ 2009-09-24 15:59 UTC (permalink / raw)
To: Michael Gilbert; +Cc: Matt Lundin, Org Mode List
Michael Gilbert <mcg@gilbert.org> writes:
> On Sep 23,2009, at 8:05 PM, Matt Lundin wrote:
>
>> Michael Gilbert <mcg@gilbert.org> writes:
>>>
>>> (1) I want to define a custom agenda view that displays only those
>>> tasks that have today as a deadline or are past-due. Since many of my
>>> tasks also have scheduled timestamps, sometimes these end up being
>>> the
>>> same day. It looks to me as if they will be left out if I skip
>>> scheduled items, even if they also have a current deadline. How can I
>>> finesse this?
>>
>> --8<---------------cut here---------------start------------->8---
>> (setq org-agenda-custom-commands
>> '(("d" "Due today" agenda ""
>> ((org-deadline-warning-days 1)
>> (org-agenda-skip-scheduled-if-deadline-is-shown t)
>> (org-agenda-skip-function '(org-agenda-skip-entry-if
>> notdeadline))))))
>> --8<---------------cut here---------------end--------------->8---
>
> Thank you! This was the element I wasn't able to discover: org-agenda-
> skip-scheduled-if-deadline-is-shown. Alas, when I test this, it still
> displays scheduled entries that are not deadlines. I don't think I'm
> overriding it elsewhere – I don't have a lot of agenda settings. Does
> this work for you?
There was one mistake in the command above. The local variable
org-deadline-warning-days should be set to 0 (otherwise you'll get items
due tomorrow).
--8<---------------cut here---------------start------------->8---
(setq org-agenda-custom-commands
'(("d" "Due today" agenda ""
((org-deadline-warning-days 0)
(org-agenda-skip-scheduled-if-deadline-is-shown t)
(org-agenda-skip-function '(org-agenda-skip-entry-if 'notdeadline))))))
--8<---------------cut here---------------end--------------->8---
Here's a sample file:
--8<---------------cut here---------------start------------->8---
* TODO Scheduled today
SCHEDULED: <2009-09-24 Thu>
* TODO Scheduled yesterday
SCHEDULED: <2009-09-23 Wed>
* TODO Deadline and scheduled today
SCHEDULED: <2009-09-24 Thu> DEADLINE: <2009-09-24 Thu>
* TODO Deadline past due
DEADLINE: <2009-09-22 Tue>
* TODO Deadline tomorrow
DEADLINE: <2009-09-25 Fri>
--8<---------------cut here---------------end--------------->8---
When I call the custom agenda command (with org-deadline-warning-days
set to 0) on this file, I get the following:
--8<---------------cut here---------------start------------->8---
Day-agenda (W39):
Thursday 24 September 2009
test: In -2 d.: TODO Deadline past due
test: Deadline: TODO Deadline and scheduled today
--8<---------------cut here---------------end--------------->8---
Perhaps you could test this on your setup to see if you get the same
results.
Best,
Matt
>
>>> (2) Eventually, I want to create a DONE log of copies of items as
>>> they
>>> get finished, with contextual data retained. But for right now, all I
>>> want is to be able to switch to an agenda view of tasks that were
>>> complete today. I've tried a few ideas that seemed like low-hanging
>>> fruit here, but no luck.
>>
>> Type "l" in the agenda for log mode.
>
> Interesting. I did explore that a bit. Wasn't able to configure it to
> my liking, but I'll return to it.
>
> Thank you so much, Matt.
>
> -- Michael
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-09-24 15:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-23 23:14 two custom agenda view questions Michael Gilbert
2009-09-24 3:05 ` Matt Lundin
[not found] ` <45063E9A-B5D0-44BC-A9F3-799B5492AECB@gilbert.org>
2009-09-24 15:59 ` Matthew 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).