From mboxrd@z Thu Jan 1 00:00:00 1970 From: Adam Porter Subject: Re: Possible to exclude/include tags for agenda custom commands? Date: Fri, 14 Feb 2020 16:05:24 -0600 Message-ID: <87o8u0zuxn.fsf@alphapapa.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]:40387) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j2j5Z-0006Yv-In for emacs-orgmode@gnu.org; Fri, 14 Feb 2020 17:05:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j2j5Y-0000uE-CE for emacs-orgmode@gnu.org; Fri, 14 Feb 2020 17:05:33 -0500 Received: from ciao.gmane.io ([159.69.161.202]:56820) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j2j5Y-0000sd-6H for emacs-orgmode@gnu.org; Fri, 14 Feb 2020 17:05:32 -0500 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1j2j5W-0001zo-4u for emacs-orgmode@gnu.org; Fri, 14 Feb 2020 23:05:30 +0100 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: 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. > > 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")))) > > Stig Hi Stig, Thanks for sharing that. I think this is a fairly common question among Org users, yet not always easy to find the answer to, so I've added your example here along with a couple of other solutions: https://alphapapa.github.io/org-almanac/#Exclude%20and%20include%20tags%20in%20custom%20Agenda%20commands