From mboxrd@z Thu Jan 1 00:00:00 1970 From: suvayu ali Subject: Re: Question about org-search-view and org-occur-in-agenda-files Date: Tue, 26 Jul 2011 11:50:23 +0200 Message-ID: References: <4e2db626.1451640a.13da.fffff268@mx.google.com> <871uxdg2kx.fsf@fastmail.fm> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([140.186.70.92]:58565) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QleHl-0007K2-Iz for emacs-orgmode@gnu.org; Tue, 26 Jul 2011 05:50:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QleHk-0006Kk-GP for emacs-orgmode@gnu.org; Tue, 26 Jul 2011 05:50:45 -0400 Received: from mail-ew0-f41.google.com ([209.85.215.41]:38171) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QleHk-0006KV-9B for emacs-orgmode@gnu.org; Tue, 26 Jul 2011 05:50:44 -0400 Received: by ewy9 with SMTP id 9so317618ewy.0 for ; Tue, 26 Jul 2011 02:50:43 -0700 (PDT) In-Reply-To: <871uxdg2kx.fsf@fastmail.fm> 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Matt Lundin Cc: org-mode mailing list Hi Matt, On Tue, Jul 26, 2011 at 5:09 AM, Matt Lundin wrote: >> Custom agenda commands do not support prompting for search phrases. > > The following custom agenda command offers a prompt: > > --8<---------------cut here---------------start------------->8--- > (org-add-agenda-custom-command > =A0'("x" "Search special files" search "" > =A0 ((org-agenda-files '("~/special/"))))) > --8<---------------cut here---------------end--------------->8--- > Yes, that was one of my misconceptions from my reading of the org-agenda-custom-commands docs. The docs say: [...] match What to search for: - a single keyword for TODO keyword searches - a tags match expression for tags searches - a word search expression for text searches. - a regular expression for occur searches For all other commands, this should be the empty string. And the following example is given, (search "match" settings files) I erroneously assumed the string cannot be an empty string until I read the article on Worg. I also realised I can use let to set any variable to whatever I need and wrap around any of the search functions. I can then have prompts for any kind of search with these. Thanks everyone for pointing me in the right direction. :) > Best, > Matt Thanks, --=20 Suvayu Open source is the future. It sets us free.