From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Lundin Subject: Re: Custom agenda view - filter by priority AND scheduled date Date: Wed, 28 Apr 2010 13:19:42 -0400 Message-ID: <878w871olt.fsf@fastmail.fm> References: <1AF02DE7-68B8-4CD2-A17A-66F8D762910E@gmail.com> 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 1O7Ao1-0006KR-Ug for emacs-orgmode@gnu.org; Wed, 28 Apr 2010 13:12:14 -0400 Received: from [140.186.70.92] (port=37906 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O7Anz-0006Iy-OO for emacs-orgmode@gnu.org; Wed, 28 Apr 2010 13:12:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O7Any-0008UK-BI for emacs-orgmode@gnu.org; Wed, 28 Apr 2010 13:12:11 -0400 Received: from out3.smtp.messagingengine.com ([66.111.4.27]:57916) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O7Any-0008UD-6A for emacs-orgmode@gnu.org; Wed, 28 Apr 2010 13:12:10 -0400 In-Reply-To: <1AF02DE7-68B8-4CD2-A17A-66F8D762910E@gmail.com> (Barton's message of "Wed, 28 Apr 2010 16:36:16 +0300") 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: Barton Cc: emacs-orgmode@gnu.org Barton writes: > In my workflow, I move by priorities and scheduled dates for the tasks. > My goal with this issue is to have a view that would show me only the > tasks with certain priority(-ies) that are scheduled for today (or are > overdue, as in (org-agenda-repeating-timestamp-show-all t) ). > > My feeble attempt here: > > (setq org-agenda-custom-commands > '(("c" "Custom" > ((agenda "" ((org-agenda-ndays 1))) > (tags-todo "+PRIORITY=\"A\""))) > ;; ...other commands here > )) > > ... displays a usual daily agenda and following it, _all_ the #A tasks > that I have. Clearly not what has been intended. Here's one way to do it: --8<---------------cut here---------------start------------->8--- (setq org-agenda-custom-commands '(("c" "Custom" tags-todo "+SCHEDULED<=\"\"+PRIORITY=\"A\"") ;; ...other commands here )) --8<---------------cut here---------------end--------------->8--- Another approach is to use the daily agenda view and a skip function. This is a bit faster than the first example: --8<---------------cut here---------------start------------->8--- (setq org-agenda-custom-commands '(("c" "Custom" agenda "" ((org-agenda-entry-types '(:scheduled)) (org-agenda-skip-function '(org-agenda-skip-entry-if 'notregexp "\\[#A\\]")))) ;; ...other commands here )) --8<---------------cut here---------------end--------------->8--- HTH, Matt