From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Lundin Subject: Re: Accessing CATEGORY for custom agenda command Date: Fri, 18 Mar 2011 19:10:48 -0400 Message-ID: <8762rggh3b.fsf@fastmail.fm> References: <0vtygacs6z.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from [140.186.70.92] (port=46200 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q0iom-0003HQ-Jy for emacs-orgmode@gnu.org; Fri, 18 Mar 2011 19:10:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q0iok-0002UT-UH for emacs-orgmode@gnu.org; Fri, 18 Mar 2011 19:10:52 -0400 Received: from out3.smtp.messagingengine.com ([66.111.4.27]:39452) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q0iok-0002UK-PD for emacs-orgmode@gnu.org; Fri, 18 Mar 2011 19:10:50 -0400 In-Reply-To: <0vtygacs6z.fsf@gmail.com> (Markus Heller's message of "Fri, 11 Feb 2011 11:00:20 -0800") 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: Markus Heller Cc: emacs-orgmode@gnu.org Markus Heller writes: > I'm trying to get the following to work: > > (org-add-agenda-custom-command > '("X" tags "Task" > ((org-agenda-skip-function '(org-agenda-skip-entry-if > 'notregexp "Admin")) > (org-agenda-overriding-header " Test")))) > > > I want all entries that have the tag "TASK" and that have the category > "Admin" shown in the agenda. Sorry for the late reply, but a simple way to do this is to change the query. This will pick up categories regardless of whether they are defined in the subtree or at the top of the file: --8<---------------cut here---------------start------------->8--- (org-add-agenda-custom-command '("X" tags "TASK+CATEGORY=\"Admin\"" ((org-agenda-overriding-header " Test")))) --8<---------------cut here---------------end--------------->8--- Best, Matt