From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Re: Switching between many contexts Date: Tue, 3 Mar 2009 14:31:14 +0100 Message-ID: References: <87ocwjzts2.fsf@CPU107.opentrends.net> <20524da70903021021m3403e57etf9b796aab7371a73@mail.gmail.com> <87vdqrrcxw.fsf@gollum.intra.norang.ca> <87zlg27snk.fsf@CPU107.opentrends.net> Mime-Version: 1.0 (Apple Message framework v930.3) Content-Type: text/plain; charset=WINDOWS-1252; format=flowed; delsp=yes Content-Transfer-Encoding: quoted-printable Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LeUiO-0001GM-0d for emacs-orgmode@gnu.org; Tue, 03 Mar 2009 08:31:20 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LeUiL-0001E9-Tg for emacs-orgmode@gnu.org; Tue, 03 Mar 2009 08:31:19 -0500 Received: from [199.232.76.173] (port=48134 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LeUiL-0001Do-KU for emacs-orgmode@gnu.org; Tue, 03 Mar 2009 08:31:17 -0500 Received: from nf-out-0910.google.com ([64.233.182.187]:11399) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LeUiL-00062l-61 for emacs-orgmode@gnu.org; Tue, 03 Mar 2009 08:31:17 -0500 Received: by nf-out-0910.google.com with SMTP id b11so330042nfh.26 for ; Tue, 03 Mar 2009 05:31:16 -0800 (PST) In-Reply-To: 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: Matthew Lundin Cc: org-mode mailing list , Bernt Hansen On Mar 3, 2009, at 2:05 PM, Matthew Lundin wrote: > > Daniel Clemente writes: > >> In fact I would like to use often the agenda view with several =20 >> tags excluded, so the ideal setup would be an agenda custom search. >> But I don't know which command to use in org-agenda-custom-=20 >> commands: I don't want tags-todo (that's a heading list), but the =20 >> real agenda (with its colors, dates, deadlines, etc.). However, the =20= >> search type called =84agenda=93 seems not to accept tags to search. >> Maybe =84agenda=93 could accept tags to search? >> Or else I can try to do a custom command which emulates the agenda >> but adds this filter; maybe with a local variable or with =84skip >> conditions=93 (org-agenda-skip-function). > > For this you would indeed you a skip function. > > E.g., > > --8<---------------cut here---------------start------------->8--- > (setq org-agenda-custom-commands > '(("A" agenda "" > ((org-agenda-skip-function '(org-agenda-skip-entry-if 'regexp =20= > ":TAG:")))))) > --8<---------------cut here---------------end--------------->8--- This is very good, and it will work if you are talking about entries that all do have that tag explicitly. But will fail if you have subtrees that inherit the tag: If the agenda scanner stops at a time stamp that is in an entry that inherits the tag, then the skipper will not see the tag. The reason why the agenda view does not have an option to exclude some tags is also because of inheritance. The tags scanner that is used by `C-c a m' is designed to treat tag inheritance fast, but the agenda directly jumps to relevant time stamps and then must work its way up the hierarchy, for each matching time stamp, to get all relevant tags. A work-around with some speed penalty will therefore be ((org-agenda-skip-function '(member "TAG" (org-get-tags-at))) Another possibility that might be useful would be to use permanent restrictions. For example, you can go to a subtree that you want to work with and press `C-c C-x <' on the headline. All future agenda commands then will only look at that subtree, until you select a new restriction or until you remove the restriction with `C-c C-x >'. You may also restrict to a file by calling `C-c C-x <' before the first headline of a file. Maybe the best solutions would be if I allowed for a default secondary filter to be applied to an agenda view.... I will look into this possibility. - Carsten > > > Best, > Matt > > > _______________________________________________ > Emacs-orgmode mailing list > Remember: use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode