From mboxrd@z Thu Jan 1 00:00:00 1970 From: Manuel Hermenegildo Subject: Re: Re: Switching between many contexts Date: Tue, 3 Mar 2009 07:20:34 +0100 Message-ID: <18860.52274.876829.329373@clip.dia.fi.upm.es> References: <87ocwjzts2.fsf@CPU107.opentrends.net> <20524da70903021021m3403e57etf9b796aab7371a73@mail.gmail.com> <87vdqrrcxw.fsf@gollum.intra.norang.ca> <87zlg27snk.fsf@CPU107.opentrends.net> Reply-To: Manuel Hermenegildo Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LeWUi-0006dw-4p for emacs-orgmode@gnu.org; Tue, 03 Mar 2009 10:25:20 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LeWUg-0006d1-B9 for emacs-orgmode@gnu.org; Tue, 03 Mar 2009 10:25:19 -0500 Received: from [199.232.76.173] (port=33255 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LeWUg-0006cy-8r for emacs-orgmode@gnu.org; Tue, 03 Mar 2009 10:25:18 -0500 Received: from relay.fi.upm.es ([138.100.8.77]:39198 helo=relay4.fi.upm.es) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LeWUf-0007R8-B1 for emacs-orgmode@gnu.org; Tue, 03 Mar 2009 10:25:17 -0500 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: Carsten Dominik Cc: Bernt Hansen , org-mode mailing list > 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 > ":TAG:")))))) > --8<---------------cut here---------------end--------------->8--- This is what I use as filter, which covers the issue of inheritance and a small optimization (at least for my org files): (defun my-skip-by-tags (tag) "Skip tasks except those that contain tag (with inheritance!). " (let ((line-end (save-excursion (progn (end-of-line) (point))))) ;; return pos (if (or (member tag (org-get-local-tags)) ;; check first if only local (speed) (member tag (org-get-tags-at (point)))) ;; also inherited nil ; do not skip line-end))) ; skip, continue after that Cheers, Manuel -- ------------------------------------------------------------------------------- Manuel Hermenegildo | Prof., C.S.Dept., T.U. Madrid (UPM) Director, IMDEA-Software and CLIP Group | +34-91-336-7435 (W) -352-4819 (Fax) -------------------------------------------------------------------------------