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 04:04:28 +0200 Message-ID: References: <4e2db626.1451640a.13da.fffff268@mx.google.com> <87tya94z39.fsf@norang.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Return-path: Received: from eggs.gnu.org ([140.186.70.92]:46718) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QlX0s-0001WC-UH for emacs-orgmode@gnu.org; Mon, 25 Jul 2011 22:04:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QlX0r-0004dd-LK for emacs-orgmode@gnu.org; Mon, 25 Jul 2011 22:04:50 -0400 Received: from mail-ew0-f41.google.com ([209.85.215.41]:58477) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QlX0r-0004dF-Do for emacs-orgmode@gnu.org; Mon, 25 Jul 2011 22:04:49 -0400 Received: by ewy9 with SMTP id 9so3445465ewy.0 for ; Mon, 25 Jul 2011 19:04:48 -0700 (PDT) In-Reply-To: <87tya94z39.fsf@norang.ca> 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: Bernt Hansen Cc: org-mode mailing list Hi Bernt, On Tue, Jul 26, 2011 at 3:20 AM, Bernt Hansen wrote: >>> You can set the org-agenda-files and >>> org-agenda-text-search-extra-files to point to the old project for >>> some custom search. >>> > > You can also restrict agenda to a single file with C-u C-c C-x <. > Subsequent agenda commands and searches will only use the current file > until you remove the restriction with C-c C-x > > My problem was I wanted to search a whole slew of files in a directory tree. Also I was misreading some of the the org-agenda documentation. After reading the article on custom agenda commands on Worg, many of my misconceptions were resolved. Now I have written a function to find org files recursively from a directory tree and I use this list to selectively search project directories. e.g.: (setq org-agenda-custom-commands '(("W" "Search tutorials on Worg" search "" ((org-agenda-files nil) (org-agenda-text-search-extra-files (find-org-file-recursively "~/org/Worg/org-tutorials")))))) > -Bernt -- Suvayu Open source is the future. It sets us free.