From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bernt Hansen Subject: Re: Custom agenda view by TODO state and tag Date: Tue, 26 Apr 2011 07:46:57 -0400 Message-ID: <8762q1ck0e.fsf@norang.ca> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([140.186.70.92]:44248) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QEgjV-0004TL-7g for emacs-orgmode@gnu.org; Tue, 26 Apr 2011 07:47:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QEgjU-0004v8-BU for emacs-orgmode@gnu.org; Tue, 26 Apr 2011 07:47:09 -0400 Received: from mho-03-ewr.mailhop.org ([204.13.248.66]:17393 helo=mho-01-ewr.mailhop.org) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QEgjU-0004sb-9a for emacs-orgmode@gnu.org; Tue, 26 Apr 2011 07:47:08 -0400 In-Reply-To: (Laurynas Biveinis's message of "Tue, 26 Apr 2011 06:42:47 +0300") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Laurynas Biveinis Cc: emacs-orgmode@gnu.org Laurynas Biveinis writes: > Hi everybody - > > I want to create a custom agenda view that filters by both TODO state > and tags, i.e. a combination of todo and tags-todo search types. I > have tried creating custom search action > ((org-agenda-todo "TODO") (org-agenda-filter "tag1|tag2")) but failed. > > Any pointers? Hi Laurynas, Just use a tags-todo filter and list both. ("n" "Next and Started tasks" tags-todo "-WAITING-CANCELLED/!NEXT|STARTED" ((org-agenda-overriding-header "Next Tasks"))) This looks for all todo tasks that do not have a WAITING or CANCELLED tag and have a todo keyword matching NEXT or STARTED. You probably want something like this C-c a M tag1|tag2/!TODO ("x" "Todo tasks for tag1 or tag2" tags-todo "tag1|tag2/!TODO") ((org-agenda-overriding-header "Todo tasks for tag1 or tag2"))) HTH, Bernt