[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Orgmode] Re: two custom agenda view questions
From: |
Matthew Lundin |
Subject: |
[Orgmode] Re: two custom agenda view questions |
Date: |
Thu, 24 Sep 2009 11:59:22 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1 (darwin) |
Michael Gilbert <address@hidden> writes:
> On Sep 23,2009, at 8:05 PM, Matt Lundin wrote:
>
>> Michael Gilbert <address@hidden> 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