From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Checking for tags efficiently Date: Wed, 13 May 2009 14:14:02 +0200 Message-ID: <296F0607-BD4E-4257-A20C-F4C993D881E1@gmail.com> References: <20524da70905121536p5b0ba15teae5b37afa007dd6@mail.gmail.com> Mime-Version: 1.0 (Apple Message framework v930.3) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M4Gsl-0006Fs-Ck for emacs-orgmode@gnu.org; Wed, 13 May 2009 12:00:35 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M4Gsg-0006En-3O for emacs-orgmode@gnu.org; Wed, 13 May 2009 12:00:34 -0400 Received: from [199.232.76.173] (port=58661 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M4Gsf-0006Eh-Qx for emacs-orgmode@gnu.org; Wed, 13 May 2009 12:00:29 -0400 Received: from mail-ew0-f162.google.com ([209.85.219.162]:49019) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1M4Gsf-0005tJ-9j for emacs-orgmode@gnu.org; Wed, 13 May 2009 12:00:29 -0400 Received: by mail-ew0-f162.google.com with SMTP id 6so931297ewy.42 for ; Wed, 13 May 2009 09:00:29 -0700 (PDT) In-Reply-To: <20524da70905121536p5b0ba15teae5b37afa007dd6@mail.gmail.com> 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: Samuel Wales Cc: emacs-orgmode@gnu.org On May 13, 2009, at 12:36 AM, Samuel Wales wrote: > Using org-map-entries, I check for expired done tasks and > then archive them. I would like to skip archiving any > subtree that has the tags[1] :data: or :repurpose:.[2] > > Is there a function for checking for the presence of tags > efficiently (order 1) and robustly? Is org-entry-properties > the right thing to use? > > I'm trying to avoid future debugging. Hi John, when using org-map-entries, the second parameter is a string that is a tags/property search. There you can add -data and -repurpose, like (org-map-entries 'my-archive-function "-data-repurpose/!DONE" ... or something like this. HTH - Carsten > > Thanks! > > [1] Immediate or inherited. I recall seeing in the code > somewhere a reference to a way to speed up the latter. > > [2] In case you are curious, my plan is to use these > tags to indicate that while the tasks are done, they have > data that should be refiled or they have content that should > be repurposed. The advantage of this over DATA and > REPURPOSE todo kw is that they can be applied orthogonally > to any todo states. It's not ideal, because done should > mean done, but I have not found a better arrangement yet. > > --- > Today is awareness day. > > Myalgic encephalomyelitis denialism is causing death and severe > suffering > worse than MS. Conflicts of interest are destroying research. / > You/ can > get the disease at any time permanently. Do science and justice > matter to > you? > > Posters: http://www.mefreeforall.org/fileadmin/PDFs/ME_Awareness_Posters_2009.pdf > > Overview: http://www.meactionuk.org.uk/What_Is_ME_What_Is_CFS.htm > > > _______________________________________________ > 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