emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Bastien <bzg@altern.org>
To: emacs-orgmode@gnu.org
Subject: Re: A puzzle to solve: saved categories vs. tags
Date: Sun, 07 Oct 2007 13:27:00 +0100	[thread overview]
Message-ID: <87zlyv3yaz.fsf@bzg.ath.cx> (raw)
In-Reply-To: <m2641je17p.fsf@newartisans.com> (John Wiegley's message of "Sun, 07 Oct 2007 05:14:02 -0400")

John Wiegley <johnw@newartisans.com> 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

  reply	other threads:[~2007-10-07 11:27 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-07  9:14 A puzzle to solve: saved categories vs. tags John Wiegley
2007-10-07 12:27 ` Bastien [this message]
2007-10-07 20:27   ` John Wiegley
2007-10-08  9:43     ` Bastien
2007-10-08  7:06   ` Carsten Dominik
2007-10-08 18:09   ` Carsten Dominik
2007-10-08  7:48 ` Carsten Dominik
2007-10-08 10:54   ` Bastien
2007-10-08 10:50     ` Carsten Dominik
     [not found]       ` <87tzp14w7h.fsf@bzg.ath.cx>
2007-10-08 11:48         ` Carsten Dominik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87zlyv3yaz.fsf@bzg.ath.cx \
    --to=bzg@altern.org \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).