From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Lundin Subject: Re: How to do Properties search by define an agenda command Date: Thu, 11 Nov 2010 20:51:58 -0500 Message-ID: <8762w3z4u9.fsf@fastmail.fm> References: <87mxphuj4d.wl%dmaus@ictsoc.de> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from [140.186.70.92] (port=43709 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PGio9-0003Nz-Mo for emacs-orgmode@gnu.org; Thu, 11 Nov 2010 20:52:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PGio4-0006A8-Sc for emacs-orgmode@gnu.org; Thu, 11 Nov 2010 20:52:05 -0500 Received: from out3.smtp.messagingengine.com ([66.111.4.27]:50123) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PGio4-00069x-PA for emacs-orgmode@gnu.org; Thu, 11 Nov 2010 20:52:00 -0500 In-Reply-To: <87mxphuj4d.wl%dmaus@ictsoc.de> (David Maus's message of "Wed, 10 Nov 2010 19:30:10 +0100") 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: David Maus Cc: Chao LU , emacs-orgmode@gnu.org David Maus writes: > At Wed, 10 Nov 2010 02:59:58 -0500, > Chao LU wrote: >> 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: > > IIRC the space character of a property value must be escaped (%20) > because Org uses the plain space character to separate multiple values > in a property. So the drawer should look like: > > :PROPERTIES: > :TITLE: Quantum%20Mechanics > :AUTHOR: Franz%20Schwabl > :CATEGORY: Quantum%20Mechanics > :TAGS: Quantum%20Mechanics Group%20Theory > :KEYWORD: Quantum%20Mechanics Perturbation Second%20Quantization > :LOCATION: iTune > :END: > > But now, sadly, that's all we've got. The search engine can only > search for equal strings (e.g. TITLE="Quantum%20Mechanics") or regular > expression and it does not handle multivalue properties. I don't believe this is the case. The following search works fine for me with the OP's properties drawer: C-c a m TITLE="Quantum Mechanics" > Looks like to use the intended functionality someone has to patch Org > mode's tag search to handle multivalue properties. I don't believe the space in property values is meant to indicate multiple values (i.e., in the same way that ":" separates tags). Here's an example from the manual: --8<---------------cut here---------------start------------->8--- * CD collection ** Classic *** Goldberg Variations :PROPERTIES: :Title: Goldberg Variations :Composer: J.S. Bach :Artist: Glen Gould :Publisher: Deutsche Grammophon :NDisks: 1 :END: --8<---------------cut here---------------end--------------->8--- That said, one can create ad hoc multivalue properties by using regexps in property searches. Best, Matt