From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matthew Lundin Subject: Re: Org-mode and searching for multiple occurances Date: Thu, 11 Feb 2010 07:08:53 -0500 Message-ID: <87fx586kkq.fsf@fastmail.fm> References: <87iqa4kct0.fsf@fastmail.fm> <4B73D19F.5010006@cs.tu-berlin.de> <83sk98f5ik.fsf@yahoo.it> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NfXoL-0001Na-Oz for emacs-orgmode@gnu.org; Thu, 11 Feb 2010 07:06:21 -0500 Received: from [199.232.76.173] (port=45681 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NfXoL-0001N5-AD for emacs-orgmode@gnu.org; Thu, 11 Feb 2010 07:06:21 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NfXoI-0005ez-Qz for emacs-orgmode@gnu.org; Thu, 11 Feb 2010 07:06:20 -0500 Received: from out2.smtp.messagingengine.com ([66.111.4.26]:36035) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NfXoI-0005en-II for emacs-orgmode@gnu.org; Thu, 11 Feb 2010 07:06:18 -0500 In-Reply-To: <83sk98f5ik.fsf@yahoo.it> (Giovanni Ridolfi's message of "Thu, 11 Feb 2010 11:09:23 +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: Giovanni Ridolfi Cc: Matt Lundin , emacs-orgmode@gnu.org, evita moreno Giovanni Ridolfi writes: > Stephan Schmitt writes: > > Hi, Stephan, >> Also sprach Matt Lundin: >>> evita moreno writes: >>> >>>> * jones2000 >>>> blah blah blah keyword1 keyword2 >>>> *jones2007 >>>> blah blah keyword2 >>>> >>>> and so on. I was wondering whether there is a way where one can search >>>> for a keyword in the database (more than 350 papers up to now) and can >>>> get in an automatic fashion in which of the jones' entries these >>>> keywords occur >>> You can use org-search-view (C-c a s). >> Just a remark: >> If the file is not in org-agenda-files it is "C-c a < s" >> > well I don't think that using *Agenda* is what Evita is looking for, > or at least I was not able to obtain a satisfactory view > of the authors with keyword2 occurrence in my test.org file. > > I think that your first solution: > > M-x org-occur > > is the best *org-option* I'm not sure I follow you here. The function org-search-view (C-c a s) searches all org-agenda files for a regexp and/or word (or as Stephan pointed out searches the current file with a restriction) and returns a list of entry headings that contains that keyword. AFAICT, this is the behavior the OP was looking for: --8<---------------cut here---------------start------------->8--- Search words: keyword2 Press `[', `]' to add/sub word, `{', `}' to add/sub regexp, `C-u r' to edit test: jones2000 test: jones2007 --8<---------------cut here---------------end--------------->8--- One more consideration: If the OP wants genuine tag functionality, perhaps it would be better to add the keywords as tags. E.g., --8<---------------cut here---------------start------------->8--- ** jones2000 :keyword1:keyword2: blah blah ** jones2007 :keyword2: blah blah --8<---------------cut here---------------end--------------->8--- Best, Matt