[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Orgmode] Re: How to do Properties search by define an agenda command
From: |
Matt Lundin |
Subject: |
[Orgmode] Re: How to do Properties search by define an agenda command |
Date: |
Thu, 11 Nov 2010 20:39:38 -0500 |
User-agent: |
Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux) |
Chao LU <address@hidden> writes:
> Dear all,
>
> I'm trying to figure out how to do Properties search by define an
> agenda command.
>
> Here is my item in org file:
>
> *** Franz Schwabl / Quantum Mechanics
> :PROPERTIES:
> :TITLE: Quantum Mechanics
> :AUTHOR: Franz Schwabl
> :CATEGORY: Quantum Mechanics
> :TAGS: Quantum Mechanics, Group Theory
> :KEYWORD: Quantum Mechanics, Perturbation, Second Quantization
> :LOCATION: iTune
> :END:
>
> And I want to define a agenda command to search this item out. I've
> tried this one, but did not work:
> ("19" "TEST" occur-tree "Title="Quantum Mechanics"")
> ("19" "TEST" tags "Title="Quantum Mechanics"")
>
> So is there anyone knows how to do this correctly?
Two things:
1. You need to escape the inner quote marks in the custom command.
2. AFAICT Properties are case sensitive. Your drawer includes a "TITLE"
property but your custom command searches for "Title".
This custom command worked for me:
(setq org-agenda-custom-commands
'(("x" "TEST" tags "TITLE=\"Quantum Mechanics\"")))
You could also just type the following:
C-a m TITLE="Quantum Mechanics"
Note: you can also use regexps in property searches. E.g.,
C-a m TITLE={quantum.*mechanics}
Best,
Matt