From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Lundin Subject: Re: Is it possible to show an agenda item only if it's due? Date: Tue, 22 Sep 2009 12:42:59 -0400 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mq8SP-0000AX-T7 for emacs-orgmode@gnu.org; Tue, 22 Sep 2009 12:43:13 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mq8SL-000091-30 for emacs-orgmode@gnu.org; Tue, 22 Sep 2009 12:43:13 -0400 Received: from [199.232.76.173] (port=52475 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mq8SK-00008r-V1 for emacs-orgmode@gnu.org; Tue, 22 Sep 2009 12:43:08 -0400 Received: from mx20.gnu.org ([199.232.41.8]:21124) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Mq8SK-0003aw-Bp for emacs-orgmode@gnu.org; Tue, 22 Sep 2009 12:43:08 -0400 Received: from out1.smtp.messagingengine.com ([66.111.4.25]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Mq8SG-0003mj-A4 for emacs-orgmode@gnu.org; Tue, 22 Sep 2009 12:43:04 -0400 In-Reply-To: (PT's message of "Tue, 22 Sep 2009 15:50:51 +0000 (UTC)") 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: PT Cc: emacs-orgmode@gnu.org 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