From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stig Brautaset Subject: Possible to exclude/include tags for agenda custom commands? Date: Wed, 12 Feb 2020 19:03:30 +0000 Message-ID: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:58092) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j1xIS-0005NP-GN for emacs-orgmode@gnu.org; Wed, 12 Feb 2020 14:03:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j1xIR-0006PF-88 for emacs-orgmode@gnu.org; Wed, 12 Feb 2020 14:03:40 -0500 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:56035) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j1xIR-0006OL-22 for emacs-orgmode@gnu.org; Wed, 12 Feb 2020 14:03:39 -0500 Received: from localhost (host109-151-153-160.range109-151.btcentralplus.com [109.151.153.160]) (Authenticated sender: stig@brautaset.org) by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id 1E2EDE000A for ; Wed, 12 Feb 2020 19:03:34 +0000 (UTC) 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 I use Org agenda to manage both work and non-work TODOs. I tend to use the tags @home, @work. When at work I don't want to distractions from @home stuff, and vice versa. In a work context I would like an agenda view that excludes anything tagged with @home, and a list of the 5 highest priority non-@home tasks. Vice versa for a home context I want to exclude @work stuff. Items with neither tag should show up in both views. 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? If it's not possible, can I skip the agenda and instead create a separate tags-todo search that shows a list of only those scheduled / timestamped / deadlined for today in a separate stanza, so they stand out from the unscheduled ones? Here's what I'm currently using. The tags-todo search works as I like, but I can't figure out how to exclude agenda items with certain tags from the agendas. (setq org-agenda-custom-commands '(("w" "Work Agenda" ((agenda "" ((org-agenda-span 'day))) (tags-todo "-@home-MAYBE/TODO" ((org-agenda-max-entries 5) (org-agenda-todo-ignore-scheduled 'all) (org-agenda-todo-ignore-deadlines 'all) (org-agenda-todo-ignore-timestamp 'all))))) ("h" "Home Agenda" ((agenda "") (tags-todo "-@work-MAYBE/TODO" ((org-agenda-max-entries 5) (org-agenda-todo-ignore-scheduled 'all) (org-agenda-todo-ignore-deadlines 'all) (org-agenda-todo-ignore-timestamp 'all))))) ("m" "Maybe" ((tags-todo "MAYBE/PROJ") (tags-todo "MAYBE-PROJ/TODO"))) ("P" "Projects" tags-todo "-MAYBE/PROJ"))) Stig