From mboxrd@z Thu Jan 1 00:00:00 1970 From: Barton Subject: Re: Custom agenda view - filter by priority AND scheduled date Date: Wed, 28 Apr 2010 20:30:10 +0300 Message-ID: <8A1E5519-5AC6-422B-B2E6-00F7B97CBCBB@gmail.com> References: <1AF02DE7-68B8-4CD2-A17A-66F8D762910E@gmail.com> <878w871olt.fsf@fastmail.fm> Mime-Version: 1.0 (Apple Message framework v1078) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O7B5Y-0003HC-Ge for emacs-orgmode@gnu.org; Wed, 28 Apr 2010 13:30:20 -0400 Received: from [140.186.70.92] (port=54424 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O7B5X-0003Gd-9v for emacs-orgmode@gnu.org; Wed, 28 Apr 2010 13:30:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O7B5V-000329-Mg for emacs-orgmode@gnu.org; Wed, 28 Apr 2010 13:30:19 -0400 Received: from fg-out-1718.google.com ([72.14.220.154]:59310) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O7B5V-00031t-Gg for emacs-orgmode@gnu.org; Wed, 28 Apr 2010 13:30:17 -0400 Received: by fg-out-1718.google.com with SMTP id e21so3292298fga.12 for ; Wed, 28 Apr 2010 10:30:16 -0700 (PDT) In-Reply-To: <878w871olt.fsf@fastmail.fm> 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: Matt Lundin Cc: emacs-orgmode@gnu.org Thanks Matt, works like a charm!=20 The final version of my org-agenda-custom-commands: (setq org-agenda-custom-commands '(("c" . "Priority views") ("ca" "#A" agenda "" ((org-agenda-entry-types '(:scheduled)) (org-agenda-skip-function '(org-agenda-skip-entry-if = 'notregexp "\\[#A\\]")))) ("cb" "#B" agenda "" ((org-agenda-entry-types '(:scheduled)) (org-agenda-skip-function '(org-agenda-skip-entry-if = 'notregexp "\\[#B\\]")))) ("cc" "#C" agenda "" ((org-agenda-entry-types '(:scheduled)) (org-agenda-skip-function '(org-agenda-skip-entry-if = 'notregexp "\\[#C\\]")))) ;; ...other commands here )) The org-mode love affair goes on. =3D) Barton On Apr 28, 2010, at 20:19 , Matt Lundin wrote: > Barton writes: >=20 >> 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) ). >>=20 >> My feeble attempt here: >>=20 >> (setq org-agenda-custom-commands >> '(("c" "Custom" >> ((agenda "" ((org-agenda-ndays 1)))=20 >> (tags-todo "+PRIORITY=3D\"A\""))) >> ;; ...other commands here >> )) >>=20 >> ... displays a usual daily agenda and following it, _all_ the #A = tasks >> that I have. Clearly not what has been intended. >=20 > Here's one way to do it: >=20 > --8<---------------cut here---------------start------------->8--- > (setq org-agenda-custom-commands > '(("c" "Custom" tags-todo = "+SCHEDULED<=3D\"\"+PRIORITY=3D\"A\"") > ;; ...other commands here > )) > --8<---------------cut here---------------end--------------->8--- >=20 > Another approach is to use the daily agenda view and a skip function. > This is a bit faster than the first example: >=20 > --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--- >=20 > HTH, > Matt