* Org-mode and searching for multiple occurances
@ 2010-02-10 15:34 evita moreno
2010-02-10 15:46 ` Stephan Schmitt
2010-02-10 21:20 ` Matt Lundin
0 siblings, 2 replies; 6+ messages in thread
From: evita moreno @ 2010-02-10 15:34 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1.1: Type: text/plain, Size: 864 bytes --]
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.
https://signup.live.com/signup.aspx?id=60969
[-- Attachment #1.2: Type: text/html, Size: 1070 bytes --]
[-- Attachment #2: Type: text/plain, Size: 201 bytes --]
_______________________________________________
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Org-mode and searching for multiple occurances
2010-02-10 15:34 Org-mode and searching for multiple occurances evita moreno
@ 2010-02-10 15:46 ` Stephan Schmitt
2010-02-10 21:20 ` Matt Lundin
1 sibling, 0 replies; 6+ messages in thread
From: Stephan Schmitt @ 2010-02-10 15:46 UTC (permalink / raw)
To: evita moreno; +Cc: emacs-orgmode
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.
> <https://signup.live.com/signup.aspx?id=60969>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> 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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Org-mode and searching for multiple occurances
2010-02-10 15:34 Org-mode and searching for multiple occurances evita moreno
2010-02-10 15:46 ` Stephan Schmitt
@ 2010-02-10 21:20 ` Matt Lundin
2010-02-11 9:45 ` Stephan Schmitt
1 sibling, 1 reply; 6+ messages in thread
From: Matt Lundin @ 2010-02-10 21:20 UTC (permalink / raw)
To: evita moreno; +Cc: emacs-orgmode
evita moreno <evitamoreno80@live.com> 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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Re: Org-mode and searching for multiple occurances
2010-02-10 21:20 ` Matt Lundin
@ 2010-02-11 9:45 ` Stephan Schmitt
2010-02-11 10:09 ` Giovanni Ridolfi
0 siblings, 1 reply; 6+ messages in thread
From: Stephan Schmitt @ 2010-02-11 9:45 UTC (permalink / raw)
To: Matt Lundin; +Cc: emacs-orgmode, evita moreno
Also sprach Matt Lundin:
> evita moreno <evitamoreno80@live.com> 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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Re: Org-mode and searching for multiple occurances
2010-02-11 9:45 ` Stephan Schmitt
@ 2010-02-11 10:09 ` Giovanni Ridolfi
2010-02-11 12:08 ` Matthew Lundin
0 siblings, 1 reply; 6+ messages in thread
From: Giovanni Ridolfi @ 2010-02-11 10:09 UTC (permalink / raw)
To: Stephan Schmitt; +Cc: Matt Lundin, emacs-orgmode, evita moreno
Stephan Schmitt <drmabuse@cs.tu-berlin.de> writes:
Hi, Stephan,
> Also sprach Matt Lundin:
>> evita moreno <evitamoreno80@live.com> 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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Org-mode and searching for multiple occurances
2010-02-11 10:09 ` Giovanni Ridolfi
@ 2010-02-11 12:08 ` Matthew Lundin
0 siblings, 0 replies; 6+ messages in thread
From: Matthew Lundin @ 2010-02-11 12:08 UTC (permalink / raw)
To: Giovanni Ridolfi; +Cc: Matt Lundin, emacs-orgmode, evita moreno
Giovanni Ridolfi <giovanni.ridolfi@yahoo.it> writes:
> Stephan Schmitt <drmabuse@cs.tu-berlin.de> writes:
>
> Hi, Stephan,
>> Also sprach Matt Lundin:
>>> evita moreno <evitamoreno80@live.com> 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
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-02-11 12:06 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-10 15:34 Org-mode and searching for multiple occurances evita moreno
2010-02-10 15:46 ` Stephan Schmitt
2010-02-10 21:20 ` Matt Lundin
2010-02-11 9:45 ` Stephan Schmitt
2010-02-11 10:09 ` Giovanni Ridolfi
2010-02-11 12:08 ` Matthew Lundin
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.