From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matthew Lundin Subject: Re: two custom agenda view questions Date: Thu, 24 Sep 2009 11:59:22 -0400 Message-ID: References: <21E13E24-1782-499E-99B5-E58BA38D237D@gilbert.org> <87hbutjb4l.fsf@fastmail.fm> <45063E9A-B5D0-44BC-A9F3-799B5492AECB@gilbert.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MqqjE-00063B-EU for emacs-orgmode@gnu.org; Thu, 24 Sep 2009 11:59:32 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mqqj9-00062G-4O for emacs-orgmode@gnu.org; Thu, 24 Sep 2009 11:59:31 -0400 Received: from [199.232.76.173] (port=38282 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mqqj9-00062D-0a for emacs-orgmode@gnu.org; Thu, 24 Sep 2009 11:59:27 -0400 Received: from out1.smtp.messagingengine.com ([66.111.4.25]:34931) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Mqqj8-0005Hf-IX for emacs-orgmode@gnu.org; Thu, 24 Sep 2009 11:59:26 -0400 In-Reply-To: <45063E9A-B5D0-44BC-A9F3-799B5492AECB@gilbert.org> (Michael Gilbert's message of "Thu, 24 Sep 2009 07:12:57 -0700") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Michael Gilbert Cc: Matt Lundin , Org Mode List Michael Gilbert writes: > On Sep 23,2009, at 8:05 PM, Matt Lundin wrote: > >> Michael Gilbert 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 =E2=80=93 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