From: John Kitchin <jkitchin@andrew.cmu.edu>
To: "Doyley, Marvin M." <mdoyley@ur.rochester.edu>
Cc: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: Minning Org-files
Date: Sat, 10 Oct 2015 08:06:44 -0400 [thread overview]
Message-ID: <m2oag7j5bf.fsf@andrew.cmu.edu> (raw)
In-Reply-To: <D60936F4-7C0D-4C43-B981-0D7E4D0D1515@ur.rochester.edu>
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
next prev parent reply other threads:[~2015-10-10 12:06 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2015-10-10 14:57 ` Doyley, Marvin M.
2015-10-10 15:27 ` Doyley, Marvin M.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2oag7j5bf.fsf@andrew.cmu.edu \
--to=jkitchin@andrew.cmu.edu \
--cc=emacs-orgmode@gnu.org \
--cc=mdoyley@ur.rochester.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.