From mboxrd@z Thu Jan 1 00:00:00 1970 From: Markus Heller Subject: Re: Accessing CATEGORY for custom agenda command Date: Mon, 21 Mar 2011 13:32:35 -0700 Message-ID: <0vaago2p0c.fsf@gmail.com> References: <0vtygacs6z.fsf@gmail.com> <8762rggh3b.fsf@fastmail.fm> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from [140.186.70.92] (port=48854 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q1lmh-00080J-8z for emacs-orgmode@gnu.org; Mon, 21 Mar 2011 16:33:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q1lmd-0007CJ-EG for emacs-orgmode@gnu.org; Mon, 21 Mar 2011 16:33:03 -0400 Received: from lo.gmane.org ([80.91.229.12]:54664) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q1lmd-0007Bq-7r for emacs-orgmode@gnu.org; Mon, 21 Mar 2011 16:32:59 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1Q1lmZ-0004Vy-GK for emacs-orgmode@gnu.org; Mon, 21 Mar 2011 21:32:55 +0100 Received: from mail.cdrd.ca ([142.103.191.98]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 21 Mar 2011 21:32:55 +0100 Received: from hellerm2 by mail.cdrd.ca with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 21 Mar 2011 21:32:55 +0100 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: emacs-orgmode@gnu.org Matt Lundin writes: > 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: > > (org-add-agenda-custom-command > '("X" tags "TASK+CATEGORY=\"Admin\"" > ((org-agenda-overriding-header " Test")))) Hi Matt, thanks for the reply. Looks good to me, will play around with it. Now if I could only figure out how to use CATEGORY in my clock report ... Cheers Markus