From mboxrd@z Thu Jan 1 00:00:00 1970 From: Samuel Wales Subject: Checking for tags efficiently Date: Tue, 12 May 2009 15:36:39 -0700 Message-ID: <20524da70905121536p5b0ba15teae5b37afa007dd6@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M40az-0008Dm-Qi for emacs-orgmode@gnu.org; Tue, 12 May 2009 18:37:09 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M40au-0008BK-8I for emacs-orgmode@gnu.org; Tue, 12 May 2009 18:37:08 -0400 Received: from [199.232.76.173] (port=57770 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M40au-0008BG-2r for emacs-orgmode@gnu.org; Tue, 12 May 2009 18:37:04 -0400 Received: from rv-out-0708.google.com ([209.85.198.246]:65458) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1M40at-0003lj-KE for emacs-orgmode@gnu.org; Tue, 12 May 2009 18:37:03 -0400 Received: by rv-out-0708.google.com with SMTP id f25so246250rvb.6 for ; Tue, 12 May 2009 15:36:59 -0700 (PDT) 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: emacs-orgmode@gnu.org 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. 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