From: Matt Lundin <mdl@imapmail.org>
To: Chao LU <loochao@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: How to do Properties search by define an agenda command
Date: Thu, 11 Nov 2010 20:39:38 -0500 [thread overview]
Message-ID: <87aalfz5et.fsf@fastmail.fm> (raw)
In-Reply-To: <AANLkTim=o6xifX+BkvzorPBwUqMvp9PHWAVx7sU5OTyE@mail.gmail.com> (Chao LU's message of "Wed, 10 Nov 2010 02:59:58 -0500")
Chao LU <loochao@gmail.com> 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
prev parent reply other threads:[~2010-11-12 1:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-10 7:59 How to do Properties search by define an agenda command Chao LU
2010-11-10 18:30 ` David Maus
2010-11-12 1:51 ` Matt Lundin
2010-11-13 6:09 ` David Maus
2010-11-13 15:31 ` Matt Lundin
2010-11-12 1:39 ` Matt Lundin [this message]
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87aalfz5et.fsf@fastmail.fm \
--to=mdl@imapmail.org \
--cc=emacs-orgmode@gnu.org \
--cc=loochao@gmail.com \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.