From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mueen Nawaz Subject: Question about searches (ultimately for agenda) Date: Tue, 15 Dec 2009 19:57:25 -0600 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NKj9u-00059B-Uj for emacs-orgmode@gnu.org; Tue, 15 Dec 2009 20:58:34 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NKj9q-00057E-PV for emacs-orgmode@gnu.org; Tue, 15 Dec 2009 20:58:34 -0500 Received: from [199.232.76.173] (port=41611 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NKj9q-00056m-G1 for emacs-orgmode@gnu.org; Tue, 15 Dec 2009 20:58:30 -0500 Received: from lo.gmane.org ([80.91.229.12]:54858) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NKj9p-0007Au-WB for emacs-orgmode@gnu.org; Tue, 15 Dec 2009 20:58:30 -0500 Received: from list by lo.gmane.org with local (Exim 4.50) id 1NKj9m-0007ql-B5 for emacs-orgmode@gnu.org; Wed, 16 Dec 2009 02:58:26 +0100 Received: from c-98-228-137-161.hsd1.il.comcast.net ([98.228.137.161]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 16 Dec 2009 02:58:26 +0100 Received: from mueen by c-98-228-137-161.hsd1.il.comcast.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 16 Dec 2009 02:58:26 +0100 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 Hi, In the docs (10.3.3 Matching tags and properties), I see ways to do tag searches that can also search TODO states. Can I also search TODO levels? For example, in one file covered by the agenda, I use the usual DONE to denote done. In another, which is focused on simply stuff that I have borrowed/lent, I have RETURNED as my "DONE" state. I occasionally apply tags to headings with the name of the person involved. So let's say that I've put :Jack: on some headings of items that have been lent and returned. But I also have :Jack: in my other .org files that are not about lending/borrowing. I want to search for all headlines that have :Jack: in them, but exclude anything that is a "DONE" state - so exclude both DONE and RETURNED. I know I can just do: Jack-TODO="DONE"-TODO="RETURNED" But I don't want to keep editing it as I change my DONE states or add more DONE states. Is this possible? Thanks.