From mboxrd@z Thu Jan 1 00:00:00 1970 From: thunk2@arcor.de (Thomas Plass) Subject: Re: property matching in org-agenda-custom-commands Date: Sat, 6 Apr 2019 11:06:42 +0200 Message-ID: <23720.27682.168492.655996@AGAME7.local> References: <23719.47035.820485.461489@AGAME7.local> Reply-To: Thomas Plass Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([209.51.188.92]:54259) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hChHt-00073d-8F for emacs-orgmode@gnu.org; Sat, 06 Apr 2019 05:06:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hChHs-0002h9-CX for emacs-orgmode@gnu.org; Sat, 06 Apr 2019 05:06:57 -0400 Received: from mx009.vodafonemail.xion.oxcs.net ([153.92.174.39]:21625) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hChHs-0002g0-3y for emacs-orgmode@gnu.org; Sat, 06 Apr 2019 05:06:56 -0400 In-Reply-To: Your message of Friday, April 5 2019 21:26:53 (ID: ). List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Matt Price Cc: Org Mode , Thomas Plass Matt, Matt Price wrote at 21:26 on April 5, 2019: : Is it possible to specify "current buffer only" in the definition of a shortcut, but still : produce an agenda, rather than a sparse tree? Agenda matching will always use 'org-agend-files, sparse tree matching doesn't. So, you'd need to force "current buffer" (really: current file) by fiddling und unfiddling 'org-agend-files. Kludgy. : +GRADE={"0"|"Fail"} The thing is that the tags matcher, used here to match PROPERTYs, translates the "=" in the string above to Lisp `string='. You're on the right track to use "{|}" but then it the contents of the {} has to be a properly escaped regexp. This works for me: ("F" "Failing Students in Current Buffer Only" tags "+GRADE={0\\|Fail}") Overkill: ("F" "Failing Students in Current Buffer Only" tags "+GRADE={^\\(0\\|Fail\\)$}") Thomas