From mboxrd@z Thu Jan 1 00:00:00 1970 From: evita moreno Subject: Org-mode and searching for multiple occurances Date: Wed, 10 Feb 2010 15:34:36 +0000 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0143403687==" Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NfEap-00081H-R1 for emacs-orgmode@gnu.org; Wed, 10 Feb 2010 10:35:07 -0500 Received: from [199.232.76.173] (port=43772 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NfEap-000816-FN for emacs-orgmode@gnu.org; Wed, 10 Feb 2010 10:35:07 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NfEan-00032v-FI for emacs-orgmode@gnu.org; Wed, 10 Feb 2010 10:35:07 -0500 Received: from snt0-omc1-s11.snt0.hotmail.com ([65.55.90.22]:62126) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NfEaj-00030l-Sg for emacs-orgmode@gnu.org; Wed, 10 Feb 2010 10:35:05 -0500 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: emacs-orgmode@gnu.org --===============0143403687== Content-Type: multipart/alternative; boundary="_5dd64155-71c7-4e27-b415-4031d5015167_" --_5dd64155-71c7-4e27-b415-4031d5015167_ Content-Type: text/plain; charset="iso-8859-7" Content-Transfer-Encoding: quoted-printable Hello to everyone! I am a teacher trying to teach young people how to use org-mode for writing= . We have created a database with notes on literature review outlined in or= g-mode in the following format: * 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 a= n automatic fashion in which of the jones' entries these keywords occur (pr= etty much like using MS Access and running a query). Is this possible? Mayb= e what I am asking for is outright crazy/impossible but I thought I should = give it a go! Evita =20 _________________________________________________________________ Hotmail: Free=2C trusted and rich email service. https://signup.live.com/signup.aspx?id=3D60969= --_5dd64155-71c7-4e27-b415-4031d5015167_ Content-Type: text/html; charset="iso-8859-7" Content-Transfer-Encoding: quoted-printable Hello to everyone!

I am a teacher trying to teach young people how t= o use org-mode for writing. We have created a database with notes on litera= ture review outlined in org-mode in the following format:

* jones200= 0
blah blah blah keyword1 keyword2
*jones2007
blah blah keyword2
and so on. I was wondering whether there is a way where one can searc= h for a keyword in the database (more than 350 papers up to now) and can ge= t in an automatic fashion in which of the jones' entries these keywords occ= ur (pretty much like using MS Access and running a query). Is this possible= ? Maybe what I am asking for is outright crazy/impossible but I thought I s= hould give it a go!

Evita



Hotmail: Fr= ee=2C trusted and rich email service. Get it now. = --_5dd64155-71c7-4e27-b415-4031d5015167_-- --===============0143403687== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Please use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --===============0143403687==-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephan Schmitt Subject: Re: Org-mode and searching for multiple occurances Date: Wed, 10 Feb 2010 16:46:28 +0100 Message-ID: <4B72D4D4.6050202@cs.tu-berlin.de> References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-7; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NfExG-0000ro-JT for emacs-orgmode@gnu.org; Wed, 10 Feb 2010 10:58:18 -0500 Received: from [199.232.76.173] (port=44435 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NfExF-0000rY-GL for emacs-orgmode@gnu.org; Wed, 10 Feb 2010 10:58:17 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NfEx6-0006vO-CI for emacs-orgmode@gnu.org; Wed, 10 Feb 2010 10:58:15 -0500 Received: from mail.cs.tu-berlin.de ([130.149.17.13]:51353) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NfEx3-0006uX-Dq for emacs-orgmode@gnu.org; Wed, 10 Feb 2010 10:58:06 -0500 Received: from localhost (localhost [127.0.0.1]) by localhost-12225.cs.tu-berlin.de (Postfix) with ESMTP id 9E1AA3230A for ; Wed, 10 Feb 2010 16:58:01 +0100 (MET) In-Reply-To: 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: evita moreno Cc: emacs-orgmode@gnu.org Hello Evita, you may want to try M-x org-occur: > org-occur is an interactive compiled Lisp function in `org.el'. > > (org-occur regexp &optional keep-previous callback) > > Make a compact tree which shows all matches of regexp. > The tree will show the lines where the regexp matches, and all higher > headlines above the match. It will also show the heading after the match, > to make sure editing the matching entry is easy. > If keep-previous is non-nil, highlighting and exposing done by a previous > call to `org-occur' will be kept, to allow stacking of calls to this > command. > If callback is non-nil, it is a function which is called to confirm > that the match should indeed be shown. But this only shows the matching entries, it doesn't generate a list of the entries (like running a query on a database). Hth, Stephan Also sprach evita moreno: > Hello to everyone! > > I am a teacher trying to teach young people how to use org-mode for > writing. We have created a database with notes on literature review > outlined in org-mode in the following format: > > * 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 (pretty much like using MS Access and running a query). > Is this possible? Maybe what I am asking for is outright > crazy/impossible but I thought I should give it a go! > > Evita > > > ------------------------------------------------------------------------ > Hotmail: Free, trusted and rich email service. Get it now. > > > > ------------------------------------------------------------------------ > > _______________________________________________ > Emacs-orgmode mailing list > Please use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Lundin Subject: Re: Org-mode and searching for multiple occurances Date: Wed, 10 Feb 2010 16:20:43 -0500 Message-ID: <87iqa4kct0.fsf@fastmail.fm> References: 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 1NfJy9-0004Ho-2Z for emacs-orgmode@gnu.org; Wed, 10 Feb 2010 16:19:33 -0500 Received: from [140.186.70.92] (port=35918 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NfJy7-0004HY-Ik for emacs-orgmode@gnu.org; Wed, 10 Feb 2010 16:19:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NfJy4-0006u1-1M for emacs-orgmode@gnu.org; Wed, 10 Feb 2010 16:19:28 -0500 Received: from out2.smtp.messagingengine.com ([66.111.4.26]:39441) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NfJy3-0006sP-VK for emacs-orgmode@gnu.org; Wed, 10 Feb 2010 16:19:28 -0500 In-Reply-To: (evita moreno's message of "Wed, 10 Feb 2010 15:34:36 +0000") 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: evita moreno Cc: emacs-orgmode@gnu.org evita moreno writes: > I am a teacher trying to teach young people how to use org-mode for > writing. We have created a database with notes on literature review > outlined in org-mode in the following format: > > * 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 (pretty much like using MS Access and running a query). > Is this possible? Maybe what I am asking for is outright crazy/ > impossible but I thought I should give it a go! You can use org-search-view (C-c a s). Best, Matt From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephan Schmitt Subject: Re: Re: Org-mode and searching for multiple occurances Date: Thu, 11 Feb 2010 10:45:03 +0100 Message-ID: <4B73D19F.5010006@cs.tu-berlin.de> References: <87iqa4kct0.fsf@fastmail.fm> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NfVcU-0006xV-C8 for emacs-orgmode@gnu.org; Thu, 11 Feb 2010 04:45:58 -0500 Received: from [199.232.76.173] (port=58965 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NfVcS-0006vX-To for emacs-orgmode@gnu.org; Thu, 11 Feb 2010 04:45:56 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NfVcR-0001IC-Bb for emacs-orgmode@gnu.org; Thu, 11 Feb 2010 04:45:56 -0500 Received: from mail.cs.tu-berlin.de ([130.149.17.13]:64741) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NfVcR-0001Gu-0V for emacs-orgmode@gnu.org; Thu, 11 Feb 2010 04:45:55 -0500 Received: from localhost (localhost [127.0.0.1]) by localhost-12225.cs.tu-berlin.de (Postfix) with ESMTP id 69E723221A for ; Thu, 11 Feb 2010 10:45:53 +0100 (MET) In-Reply-To: <87iqa4kct0.fsf@fastmail.fm> 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: Matt Lundin Cc: emacs-orgmode@gnu.org, evita moreno Also sprach Matt Lundin: > evita moreno writes: > >> I am a teacher trying to teach young people how to use org-mode for >> writing. We have created a database with notes on literature review >> outlined in org-mode in the following format: >> >> * 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 (pretty much like using MS Access and running a query). >> Is this possible? Maybe what I am asking for is outright crazy/ >> impossible but I thought I should give it a go! > > You can use org-search-view (C-c a s). > > Best, > Matt > Just a remark: If the file is not in org-agenda-files it is "C-c a < s" Greetings, Stephan From mboxrd@z Thu Jan 1 00:00:00 1970 From: Giovanni Ridolfi Subject: Re: Re: Org-mode and searching for multiple occurances Date: Thu, 11 Feb 2010 11:09:23 +0100 Message-ID: <83sk98f5ik.fsf@yahoo.it> References: <87iqa4kct0.fsf@fastmail.fm> <4B73D19F.5010006@cs.tu-berlin.de> 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 1NfVzC-000141-Cd for emacs-orgmode@gnu.org; Thu, 11 Feb 2010 05:09:26 -0500 Received: from [199.232.76.173] (port=33509 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NfVzB-000130-BC for emacs-orgmode@gnu.org; Thu, 11 Feb 2010 05:09:25 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NfVz9-00038H-Qf for emacs-orgmode@gnu.org; Thu, 11 Feb 2010 05:09:25 -0500 Received: from slim-2a.inet.it ([213.92.5.122]:42510) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NfVz9-00037h-8Y for emacs-orgmode@gnu.org; Thu, 11 Feb 2010 05:09:23 -0500 In-Reply-To: <4B73D19F.5010006@cs.tu-berlin.de> (Stephan Schmitt's message of "Thu, 11 Feb 2010 10:45:03 +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: Stephan Schmitt Cc: Matt Lundin , emacs-orgmode@gnu.org, evita moreno 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* (Isn't better using bibtex and bibtex tools?) cheers, Giovanni 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