Re: [Orgmode] A puzzle to solve: saved categories vs. tags

2007-10-08 Thread Carsten Dominik


On Oct 7, 2007, at 11:14, John Wiegley wrote:

Ok, I have 147k of archived todos and notes now.  Some are tagged, 
some are
not.  Most have an ARCHIVE_CATEGORY property (ever since Carsten so 
kindly

implemented it).

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.


If I understand correctly, this will be just for typing
convenience?  So that you do not have to fully type the
property name?

Because you can of course do this search as Bastien described.

Also, should this result in a sparse tree, or in an agenda buffer?
I guess you mean a sparse tree since you refer to `C-c \'.


Here is a first attempt at such a function, comments are welcome!
Maybe we should bind this function to `C-c /', instead of org-occur?

- Carsten



org-sparse-tree-interactive.el
Description: Binary data



--
Carsten Dominik
Sterrenkundig Instituut Anton Pannekoek
Universiteit van Amsterdam
Kruislaan 403
NL-1098SJ Amsterdam
phone: +31 20 525 7477___
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


Re: [Orgmode] A puzzle to solve: saved categories vs. tags

2007-10-08 Thread Carsten Dominik


On Oct 7, 2007, at 14:27, Bastien wrote:


If Carsten implements this, I think all the search facilities in Org
will need a bit of uniformization/clarification.


Admittedly the search functions are one of the areas that
demonstrate most clearly how Org-mode has grown and evolved, adding
little things.  Could use a complete re-write, but there is no
time for this.


  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.


I guess you use a French keyboard?  On mine both are equally easily 
accessed.



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.


That is true, but newbies will start with simple things, and it
is good to have simple commands to start off.

Thanks for the list of search options, a good start.

- Carsten



___
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


Re: [Orgmode] A puzzle to solve: saved categories vs. tags

2007-10-08 Thread Bastien
John Wiegley [EMAIL PROTECTED] writes:

 Bastien [EMAIL PROTECTED] writes:

 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)

 I didn't see Prompt for a specific property and value in your list. 

This would be the interactive (maybe prefix) version of search for a
complex query.

 Is this already possible using a complex query?

Re-quoting myself:

,
| As you probable know, you can already perform complex searches like:
| 
|   C-c \ [EMAIL PROTECTED]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.
`

Then to search for a specific pair of property-value:

C-c \ PROPERTY=value

As for now value should be the exact string, not a regexp.

-- 
Bastien


___
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


Re: [Orgmode] A puzzle to solve: saved categories vs. tags

2007-10-08 Thread Bastien
Carsten Dominik [EMAIL PROTECTED] writes:

 Here is a first attempt at such a function, comments are welcome!
 Maybe we should bind this function to `C-c /', instead of org-occur?

Yes, this binding would be okay, unless there are lots of people using
org-occur out there.

And `org-sparse-tree' should match both John request and what I called
(in such a bombastic manner) a universal search interface.

There is a problem with (org-buffer-property-keys t t). Here is the
backtrace:

,
| Debugger entered--Lisp error: (wrong-type-argument symbolp (TODO TAGS 
ALLTAGS DEADLINE SCHEDULED CLOCK PRIORITY Release 
Incompatible_ALL Elapsed_time Location LOCATION_ALL People_ALL 
COLUMNS LOCATION CATEGORY ARCHIVE))
|   add-to-list((TODO TAGS ALLTAGS DEADLINE SCHEDULED CLOCK 
PRIORITY Release Incompatible_ALL Elapsed_time Location 
LOCATION_ALL People_ALL COLUMNS LOCATION CATEGORY ARCHIVE) 
CATEGORY)
|   org-buffer-property-keys(t t)
|   eval((org-buffer-property-keys t t))
|   eval-expression((org-buffer-property-keys t t) nil)
|   call-interactively(eval-expression)
`

-- 
Bastien


___
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


Re: [Orgmode] A puzzle to solve: saved categories vs. tags

2007-10-08 Thread Carsten Dominik


On Oct 8, 2007, at 14:39, Bastien wrote:


Carsten Dominik [EMAIL PROTECTED] writes:


Arrrgh!

make that (org-buffer-property-keys t) for now, bug fix in next
release.


This patch is also needed:


Indeed, thanks a lot.  So to make this simpler, here is
the modified version that should work out of the box.
Sorry once again for the mess and the bandwidth waste.

- Carsten


org-sparse-tree-interactive.el
Description: Binary data
___
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


Re: [Orgmode] A puzzle to solve: saved categories vs. tags

2007-10-08 Thread Carsten Dominik


On Oct 7, 2007, at 14:27, Bastien wrote:


If Carsten implements this, I think all the search facilities in Org
will need a bit of uniformization/clarification.


Admittedly the search functions are one of the areas that
demonstrate most clearly how Org-mode has grown and evolved,
adding little things.


  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.


I guess you use a French keyboard?  On mine both are equally easily 
accessed.



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.


That is true, but newbies will start with simple things, and it
is good to have simple commands to start off.

Thanks for the list of search options, a good start.

- Carsten



--
Carsten Dominik
Sterrenkundig Instituut Anton Pannekoek
Universiteit van Amsterdam
Kruislaan 403
NL-1098SJ Amsterdam
phone: +31 20 525 7477



___
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


Re: [Orgmode] A puzzle to solve: saved categories vs. tags

2007-10-07 Thread John Wiegley
Bastien [EMAIL PROTECTED] writes:

 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)

I didn't see Prompt for a specific property and value in your list.  Is this
already possible using a complex query?

John


___
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