From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Abrahamsen Subject: Re: Possible to exclude/include tags for agenda custom commands? Date: Thu, 20 Feb 2020 08:50:59 -0800 Message-ID: <874kvl8aoc.fsf@ericabrahamsen.net> References: <8736bfxwu0.fsf@bzg.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:34017) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j4p2W-0005ad-B4 for emacs-orgmode@gnu.org; Thu, 20 Feb 2020 11:51:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j4p2V-00029I-A7 for emacs-orgmode@gnu.org; Thu, 20 Feb 2020 11:51:04 -0500 In-Reply-To: (Stig Brautaset's message of "Thu, 13 Feb 2020 19:39:50 +0000") 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-mx.org@gnu.org Sender: "Emacs-orgmode" To: Stig Brautaset Cc: Bastien , emacs-orgmode@gnu.org Stig Brautaset writes: > Hi Bastien, > > Bastien writes: >>> I can easily do this in the list of TODOs, with a tag search. However, I >>> haven't figured out how to do this for the agenda. Is it possible? If >>> so, how? >> >> From what I understand, check `org-agenda-tag-filter' to see how to >> use it within an agenda custom command. > > Thank you! That did indeed do it. Coincidentally, I was just trying to figure this problem out, so this snippet is helpful. It's weird, because I'm almost certain I've done this before, but couldn't remember how. > FWIW my stanza looks like this now: > > (setq org-agenda-custom-commands > '(("w" "Work Agenda" > ((agenda "" ((org-agenda-span 'day))) > (todo "TODO" > ((org-agenda-max-entries 5) > (org-agenda-todo-ignore-scheduled 'all) > (org-agenda-todo-ignore-deadlines 'all) > (org-agenda-todo-ignore-timestamp 'all)))) > ((org-agenda-tag-filter '("-@home" "-MAYBE")))) > ("h" "Home Agenda" > ((agenda "") > (todo "TODO" > ((org-agenda-max-entries 5) > (org-agenda-todo-ignore-scheduled 'all) > (org-agenda-todo-ignore-deadlines 'all) > (org-agenda-todo-ignore-timestamp 'all)))) > ((org-agenda-tag-filter '("-@work" "-MAYBE")))) > ("m" "Maybe" > ((todo "PROJ") > (tags-todo "-PROJ/TODO")) > ((org-agenda-tag-filter '("MAYBE")))) > ("P" "Projects" tags-todo "-MAYBE/PROJ")))) In my current Org, version 9.3.6-elpaplus, I need a "+" in front of a select tag, ie the "MAYBE" above needs to be "+MAYBE", otherwise nothing is selected at all. If this is how it's meant to be, maybe we could amend this example? Thanks! Eric