From: Matthew Lundin <mdl@imapmail.org>
To: Michael Gilbert <mcg@gilbert.org>
Cc: Matt Lundin <mdl@imapmail.org>, Org Mode List <emacs-orgmode@gnu.org>
Subject: Re: two custom agenda view questions
Date: Thu, 24 Sep 2009 11:59:22 -0400 [thread overview]
Message-ID: <m2ocp0ibad.fsf@fastmail.fm> (raw)
In-Reply-To: <45063E9A-B5D0-44BC-A9F3-799B5492AECB@gilbert.org> (Michael Gilbert's message of "Thu, 24 Sep 2009 07:12:57 -0700")
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
prev parent reply other threads:[~2009-09-24 15:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [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=m2ocp0ibad.fsf@fastmail.fm \
--to=mdl@imapmail.org \
--cc=emacs-orgmode@gnu.org \
--cc=mcg@gilbert.org \
/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).