From mboxrd@z Thu Jan 1 00:00:00 1970 From: Karl Voit Subject: Re: Exclude tag from custom agenda Date: Sun, 9 Dec 2012 22:02:37 +0100 Message-ID: <2012-12-09T21-55-20@devnull.Karl-Voit.at> References: <2012-12-07T18-18-52@devnull.Karl-Voit.at> <871uezql9d.fsf@mean.albasani.net> Reply-To: news1142@Karl-Voit.at Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([208.118.235.92]:35541) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tho1V-0003pz-SW for emacs-orgmode@gnu.org; Sun, 09 Dec 2012 16:02:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tho1U-0005dl-Ms for emacs-orgmode@gnu.org; Sun, 09 Dec 2012 16:02:53 -0500 Received: from plane.gmane.org ([80.91.229.3]:47670) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tho1U-0005de-Gj for emacs-orgmode@gnu.org; Sun, 09 Dec 2012 16:02:52 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Tho1e-0007CQ-P3 for emacs-orgmode@gnu.org; Sun, 09 Dec 2012 22:03:02 +0100 Received: from mail.michael-prokop.at ([88.198.6.110]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 09 Dec 2012 22:03:02 +0100 Received: from news1142 by mail.michael-prokop.at with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 09 Dec 2012 22:03:02 +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.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org * Memnon Anon wrote: > > I'm in a hurry, but lets see if I can give you something in 5 minutes. :-) Following works: ,----[ section within org-agenda-custom-commands ] | ("b" "borrowed stuff" tags "+borrowed" ( | (org-agenda-overriding-header "stuff that I borrowed") | (org-agenda-skip-function 'tag-without-done-or-canceled) | )) `---- ,----[ you function ] | (defun tag-without-done-or-canceled () | "Show items with tag \"borrowed\" that are neither in \"DONE\" or \"CANCELED \" state." | (let ((state (org-entry-get (point) "TODO"))) | (if (and (member "borrowed" (org-get-tags-at (point))) | (not (string= state "DONE")) | (not (string= state "CANCELED"))) | nil ; do not skip | (line-end-position)))) ; skip `---- Thanks very much! Very handy to me! One little thing: there are not items listed that inherit the «borrowed» tag from any higher level heading. But I guess this is something that could not be done easily in this case. Right? -- Karl Voit