emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Minning Org-files
@ 2015-10-09 13:48 Doyley, Marvin M.
  2015-10-09 17:24 ` John Kitchin
  0 siblings, 1 reply; 6+ messages in thread
From: Doyley, Marvin M. @ 2015-10-09 13:48 UTC (permalink / raw)
  To: emacs-orgmode@gnu.org

[-- Attachment #1: Type: text/plain, Size: 441 bytes --]

Hi there,

I have a huge org-file with notes I have taken on various topics (my commonplace org file). Is there an easy way to grab all the entires with a given tag or keyword to a new org-file ?

Thanks,
M

---
Marvin Doyley Ph.D.
University of Rochester
Associate Professor of Electrical and Computer Engineering
Associate Professor of Biomedical Engineering
333 Hopeman Engineering Building
Rochester NY 14627








[-- Attachment #2: Type: text/html, Size: 3292 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Minning Org-files
  2015-10-09 13:48 Minning Org-files Doyley, Marvin M.
@ 2015-10-09 17:24 ` John Kitchin
  2015-10-09 21:43   ` Doyley, Marvin M.
  0 siblings, 1 reply; 6+ messages in thread
From: John Kitchin @ 2015-10-09 17:24 UTC (permalink / raw)
  To: Doyley, Marvin M.; +Cc: emacs-orgmode@gnu.org

You can do something like this:

By TODO keyword to grab the DONE entries.

#+BEGIN_SRC emacs-lisp
(let ((entries (org-map-entries
                (lambda ()
                  (save-restriction
                    (org-narrow-to-subtree)
                    (buffer-string)))
                "TODO=\"DONE\"")))
  (switch-to-buffer (get-buffer-create "new"))
  (org-mode)
  (mapcar 'insert entries))
#+END_SRC



Doyley, Marvin M. writes:

> Hi there,
>
> I have a huge org-file with notes I have taken on various topics (my commonplace org file). Is there an easy way to grab all the entires with a given tag or keyword to a new org-file ?
>
> Thanks,
> M
>
> ---
> Marvin Doyley Ph.D.
> University of Rochester
> Associate Professor of Electrical and Computer Engineering
> Associate Professor of Biomedical Engineering
> 333 Hopeman Engineering Building
> Rochester NY 14627

--
Professor John Kitchin
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Minning Org-files
  2015-10-09 17:24 ` John Kitchin
@ 2015-10-09 21:43   ` Doyley, Marvin M.
  2015-10-10 12:06     ` John Kitchin
  0 siblings, 1 reply; 6+ messages in thread
From: Doyley, Marvin M. @ 2015-10-09 21:43 UTC (permalink / raw)
  To: John Kitchin; +Cc: emacs-orgmode@gnu.org

Is there anyway of making the search term a variable ?

> On Oct 9, 2015, at 1:24 PM, John Kitchin <jkitchin@andrew.cmu.edu> wrote:
> 
> You can do something like this:
> 
> By TODO keyword to grab the DONE entries.
> 
> #+BEGIN_SRC emacs-lisp
> (let ((entries (org-map-entries
>                (lambda ()
>                  (save-restriction
>                    (org-narrow-to-subtree)
>                    (buffer-string)))
>                "TODO=\"DONE\"")))
>  (switch-to-buffer (get-buffer-create "new"))
>  (org-mode)
>  (mapcar 'insert entries))
> #+END_SRC
> 
> 
> 
> Doyley, Marvin M. writes:
> 
>> Hi there,
>> 
>> I have a huge org-file with notes I have taken on various topics (my commonplace org file). Is there an easy way to grab all the entires with a given tag or keyword to a new org-file ?
>> 
>> Thanks,
>> M
>> 
>> ---
>> Marvin Doyley Ph.D.
>> University of Rochester
>> Associate Professor of Electrical and Computer Engineering
>> Associate Professor of Biomedical Engineering
>> 333 Hopeman Engineering Building
>> Rochester NY 14627
> 
> --
> Professor John Kitchin
> Doherty Hall A207F
> Department of Chemical Engineering
> Carnegie Mellon University
> Pittsburgh, PA 15213
> 412-268-7803
> @johnkitchin
> https://urldefense.proofpoint.com/v2/url?u=http-3A__kitchingroup.cheme.cmu.edu&d=BQIBAg&c=kbmfwr1Yojg42sGEpaQh5ofMHBeTl9EI2eaqQZhHbOU&r=T41F_5QsIVBGYhPPUkgYHUp9iPHgs2rOCjs7rfKaTMU&m=ZjP3xZzVOvLNMInBTkxBhV_-2rP9uP3owADCIadxXxk&s=ry0y4fD4NMUUCHUpPSK5djnyUZWt57fxbXHuhqUfSls&e= 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Minning Org-files
  2015-10-09 21:43   ` Doyley, Marvin M.
@ 2015-10-10 12:06     ` John Kitchin
  2015-10-10 14:57       ` Doyley, Marvin M.
  2015-10-10 15:27       ` Doyley, Marvin M.
  0 siblings, 2 replies; 6+ messages in thread
From: John Kitchin @ 2015-10-10 12:06 UTC (permalink / raw)
  To: Doyley, Marvin M.; +Cc: emacs-orgmode@gnu.org

sure, if you make an interactive function that takes a search argument.
Something like this

(defun some-name (search-arg)
 (interactive "sQuery: ")
 ; insert code below and change "TODO=\"DONE\"" to search-arg
 )


Doyley, Marvin M. writes:

> Is there anyway of making the search term a variable ?
>
>> On Oct 9, 2015, at 1:24 PM, John Kitchin <jkitchin@andrew.cmu.edu> wrote:
>>
>> You can do something like this:
>>
>> By TODO keyword to grab the DONE entries.
>>
>> #+BEGIN_SRC emacs-lisp
>> (let ((entries (org-map-entries
>>                (lambda ()
>>                  (save-restriction
>>                    (org-narrow-to-subtree)
>>                    (buffer-string)))
>>                "TODO=\"DONE\"")))
>>  (switch-to-buffer (get-buffer-create "new"))
>>  (org-mode)
>>  (mapcar 'insert entries))
>> #+END_SRC
>>
>>
>>
>> Doyley, Marvin M. writes:
>>
>>> Hi there,
>>>
>>> I have a huge org-file with notes I have taken on various topics (my commonplace org file). Is there an easy way to grab all the entires with a given tag or keyword to a new org-file ?
>>>
>>> Thanks,
>>> M
>>>
>>> ---
>>> Marvin Doyley Ph.D.
>>> University of Rochester
>>> Associate Professor of Electrical and Computer Engineering
>>> Associate Professor of Biomedical Engineering
>>> 333 Hopeman Engineering Building
>>> Rochester NY 14627
>>
>> --
>> Professor John Kitchin
>> Doherty Hall A207F
>> Department of Chemical Engineering
>> Carnegie Mellon University
>> Pittsburgh, PA 15213
>> 412-268-7803
>> @johnkitchin
>> https://urldefense.proofpoint.com/v2/url?u=http-3A__kitchingroup.cheme.cmu.edu&d=BQIBAg&c=kbmfwr1Yojg42sGEpaQh5ofMHBeTl9EI2eaqQZhHbOU&r=T41F_5QsIVBGYhPPUkgYHUp9iPHgs2rOCjs7rfKaTMU&m=ZjP3xZzVOvLNMInBTkxBhV_-2rP9uP3owADCIadxXxk&s=ry0y4fD4NMUUCHUpPSK5djnyUZWt57fxbXHuhqUfSls&e=

--
Professor John Kitchin
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Minning Org-files
  2015-10-10 12:06     ` John Kitchin
@ 2015-10-10 14:57       ` Doyley, Marvin M.
  2015-10-10 15:27       ` Doyley, Marvin M.
  1 sibling, 0 replies; 6+ messages in thread
From: Doyley, Marvin M. @ 2015-10-10 14:57 UTC (permalink / raw)
  To: John Kitchin; +Cc: emacs-orgmode@gnu.org

Awesome,

I really appreciate this. I must teach myself how to code in lisp :)
cheers,
M
> On Oct 10, 2015, at 8:06 AM, John Kitchin <jkitchin@andrew.cmu.edu> wrote:
> 
> sure, if you make an interactive function that takes a search argument.
> Something like this
> 
> (defun some-name (search-arg)
> (interactive "sQuery: ")
> ; insert code below and change "TODO=\"DONE\"" to search-arg
> )
> 
> 
> Doyley, Marvin M. writes:
> 
>> Is there anyway of making the search term a variable ?
>> 
>>> On Oct 9, 2015, at 1:24 PM, John Kitchin <jkitchin@andrew.cmu.edu> wrote:
>>> 
>>> You can do something like this:
>>> 
>>> By TODO keyword to grab the DONE entries.
>>> 
>>> #+BEGIN_SRC emacs-lisp
>>> (let ((entries (org-map-entries
>>>               (lambda ()
>>>                 (save-restriction
>>>                   (org-narrow-to-subtree)
>>>                   (buffer-string)))
>>>               "TODO=\"DONE\"")))
>>> (switch-to-buffer (get-buffer-create "new"))
>>> (org-mode)
>>> (mapcar 'insert entries))
>>> #+END_SRC
>>> 
>>> 
>>> 
>>> Doyley, Marvin M. writes:
>>> 
>>>> Hi there,
>>>> 
>>>> I have a huge org-file with notes I have taken on various topics (my commonplace org file). Is there an easy way to grab all the entires with a given tag or keyword to a new org-file ?
>>>> 
>>>> Thanks,
>>>> M
>>>> 
>>>> ---
>>>> Marvin Doyley Ph.D.
>>>> University of Rochester
>>>> Associate Professor of Electrical and Computer Engineering
>>>> Associate Professor of Biomedical Engineering
>>>> 333 Hopeman Engineering Building
>>>> Rochester NY 14627
>>> 
>>> --
>>> Professor John Kitchin
>>> Doherty Hall A207F
>>> Department of Chemical Engineering
>>> Carnegie Mellon University
>>> Pittsburgh, PA 15213
>>> 412-268-7803
>>> @johnkitchin
>>> https://urldefense.proofpoint.com/v2/url?u=http-3A__kitchingroup.cheme.cmu.edu&d=BQIBAg&c=kbmfwr1Yojg42sGEpaQh5ofMHBeTl9EI2eaqQZhHbOU&r=T41F_5QsIVBGYhPPUkgYHUp9iPHgs2rOCjs7rfKaTMU&m=ZjP3xZzVOvLNMInBTkxBhV_-2rP9uP3owADCIadxXxk&s=ry0y4fD4NMUUCHUpPSK5djnyUZWt57fxbXHuhqUfSls&e=
> 
> --
> Professor John Kitchin
> Doherty Hall A207F
> Department of Chemical Engineering
> Carnegie Mellon University
> Pittsburgh, PA 15213
> 412-268-7803
> @johnkitchin
> https://urldefense.proofpoint.com/v2/url?u=http-3A__kitchingroup.cheme.cmu.edu&d=BQIBAg&c=kbmfwr1Yojg42sGEpaQh5ofMHBeTl9EI2eaqQZhHbOU&r=T41F_5QsIVBGYhPPUkgYHUp9iPHgs2rOCjs7rfKaTMU&m=hnMwDGuA_hdr-MPhQEOOEcDQ7Wd1eLgQFHotHKPOM2Y&s=KAVoqsDi0jWRU6Ilqh5eq16troIjU6lPlk-AQ99ZTv8&e= 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Minning Org-files
  2015-10-10 12:06     ` John Kitchin
  2015-10-10 14:57       ` Doyley, Marvin M.
@ 2015-10-10 15:27       ` Doyley, Marvin M.
  1 sibling, 0 replies; 6+ messages in thread
From: Doyley, Marvin M. @ 2015-10-10 15:27 UTC (permalink / raw)
  To: John Kitchin; +Cc: emacs-orgmode@gnu.org

Hi John,

It works like a charm. 

Thank you so so so much
cheers,
M
> On Oct 10, 2015, at 8:06 AM, John Kitchin <jkitchin@andrew.cmu.edu> wrote:
> 
> sure, if you make an interactive function that takes a search argument.
> Something like this
> 
> (defun some-name (search-arg)
> (interactive "sQuery: ")
> ; insert code below and change "TODO=\"DONE\"" to search-arg
> )
> 
> 
> Doyley, Marvin M. writes:
> 
>> Is there anyway of making the search term a variable ?
>> 
>>> On Oct 9, 2015, at 1:24 PM, John Kitchin <jkitchin@andrew.cmu.edu> wrote:
>>> 
>>> You can do something like this:
>>> 
>>> By TODO keyword to grab the DONE entries.
>>> 
>>> #+BEGIN_SRC emacs-lisp
>>> (let ((entries (org-map-entries
>>>               (lambda ()
>>>                 (save-restriction
>>>                   (org-narrow-to-subtree)
>>>                   (buffer-string)))
>>>               "TODO=\"DONE\"")))
>>> (switch-to-buffer (get-buffer-create "new"))
>>> (org-mode)
>>> (mapcar 'insert entries))
>>> #+END_SRC
>>> 
>>> 
>>> 
>>> Doyley, Marvin M. writes:
>>> 
>>>> Hi there,
>>>> 
>>>> I have a huge org-file with notes I have taken on various topics (my commonplace org file). Is there an easy way to grab all the entires with a given tag or keyword to a new org-file ?
>>>> 
>>>> Thanks,
>>>> M
>>>> 
>>>> ---
>>>> Marvin Doyley Ph.D.
>>>> University of Rochester
>>>> Associate Professor of Electrical and Computer Engineering
>>>> Associate Professor of Biomedical Engineering
>>>> 333 Hopeman Engineering Building
>>>> Rochester NY 14627
>>> 
>>> --
>>> Professor John Kitchin
>>> Doherty Hall A207F
>>> Department of Chemical Engineering
>>> Carnegie Mellon University
>>> Pittsburgh, PA 15213
>>> 412-268-7803
>>> @johnkitchin
>>> https://urldefense.proofpoint.com/v2/url?u=http-3A__kitchingroup.cheme.cmu.edu&d=BQIBAg&c=kbmfwr1Yojg42sGEpaQh5ofMHBeTl9EI2eaqQZhHbOU&r=T41F_5QsIVBGYhPPUkgYHUp9iPHgs2rOCjs7rfKaTMU&m=ZjP3xZzVOvLNMInBTkxBhV_-2rP9uP3owADCIadxXxk&s=ry0y4fD4NMUUCHUpPSK5djnyUZWt57fxbXHuhqUfSls&e=
> 
> --
> Professor John Kitchin
> Doherty Hall A207F
> Department of Chemical Engineering
> Carnegie Mellon University
> Pittsburgh, PA 15213
> 412-268-7803
> @johnkitchin
> https://urldefense.proofpoint.com/v2/url?u=http-3A__kitchingroup.cheme.cmu.edu&d=BQIBAg&c=kbmfwr1Yojg42sGEpaQh5ofMHBeTl9EI2eaqQZhHbOU&r=T41F_5QsIVBGYhPPUkgYHUp9iPHgs2rOCjs7rfKaTMU&m=hnMwDGuA_hdr-MPhQEOOEcDQ7Wd1eLgQFHotHKPOM2Y&s=KAVoqsDi0jWRU6Ilqh5eq16troIjU6lPlk-AQ99ZTv8&e= 

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-10-10 15:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-09 13:48 Minning Org-files Doyley, Marvin M.
2015-10-09 17:24 ` John Kitchin
2015-10-09 21:43   ` Doyley, Marvin M.
2015-10-10 12:06     ` John Kitchin
2015-10-10 14:57       ` Doyley, Marvin M.
2015-10-10 15:27       ` Doyley, Marvin M.

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).