From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: A puzzle to solve: saved categories vs. tags Date: Sun, 07 Oct 2007 13:27:00 +0100 Message-ID: <87zlyv3yaz.fsf@bzg.ath.cx> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IeUHw-0002vE-FO for emacs-orgmode@gnu.org; Sun, 07 Oct 2007 07:27:12 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IeUHr-0002iM-41 for emacs-orgmode@gnu.org; Sun, 07 Oct 2007 07:27:11 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IeUHq-0002hw-UN for emacs-orgmode@gnu.org; Sun, 07 Oct 2007 07:27:06 -0400 Received: from fk-out-0910.google.com ([209.85.128.187]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IeUHq-0004NC-DJ for emacs-orgmode@gnu.org; Sun, 07 Oct 2007 07:27:06 -0400 Received: by fk-out-0910.google.com with SMTP id 19so973732fkr for ; Sun, 07 Oct 2007 04:27:05 -0700 (PDT) In-Reply-To: (John Wiegley's message of "Sun, 07 Oct 2007 05:14:02 -0400") 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 John Wiegley writes: > My desire: To hit C-u C-c \ and have it prompt me for the "entity" its > going to search for. The possible entities are TAGS, or a property > name. Then it asks for the text string, as usual. The result should > make it possible for me to see all entries that came from a specific > category or group of categories. For now C-u C-c \ does something different: ,----[ (info "(Org)Tag searches") ] | `C-c \' | Create a sparse tree with all headlines matching a tags search. | With a `C-u' prefix argument, ignore headlines that are not a TODO | line. `---- I'm not using C-u C-c \ that much, mostly because I use agenda views a lot. But your request to make the C-c \ query interactive -- whatever key it is bound to -- sounds nice. As you probable know, you can already perform complex searches like: C-c \ +Urgent-@Work+CATEGORY="code"/NEXT This will search for headlines with the tag "Urgent", without the tag "@Work", with category "code" and which TODO keyword is "NEXT". Yes, that's quite complex and I guess we sometime prefer not to care about the syntax of the query, but rather be prompted for it. If Carsten implements this, I think all the search facilities in Org will need a bit of uniformization/clarification. For now we have: | key | function | knows about | C-u | |---------+----------------------+----------------+------------------| | C-c / | org-occur | regexp | | | C-c \ | org-tags-sparse-tree | tags, and more | restrict to TODO | | C-c C-v | org-show-todo-tree | todo keywords | ask for keyword | A few ideas about this: 1. I tend to use C-c \ a lot than C-c / -- but I find the C-c / key much more convenient. I guess it's far too late to switch, but still. 2. AFAIK org-tags-sparse-tree is more powerful than org-show-todo-tree. If we add the possibility to build interactive queries, it will definitely become *the* universal search interface for Org. 3. Being able to restrict to TODO entries when searching for tags is nice, we should keep it somehow. Maybe org-show-todo-tree could do something similar by restricting the search to tags? If I sum up, here are the search capacities that we could end up with: 1. Search for a regexp 2. Search for a complex query 3. Prompt interactively for a complex query 4. Show all tagged entries 5. Prompt for a specific tag 6. Prompt for a specific tag (restricting to TODO entries) 7. Show all TODO entries 8. Prompt for a specific TODO 9. Prompt for a specific TODO (restricting to tagged entries) All this might need to be put in the search functions somehow: {0,1,2,3} would be the "universal" search functions {4,5,6} would be the tag search {7,8,9} would be the TODO search Well, sorry for such a long input, I hope it's still useful. -- Bastien