From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Doyley, Marvin M." Subject: Re: Minning Org-files Date: Sat, 10 Oct 2015 15:27:00 +0000 Message-ID: <4D36A209-AD48-4CF6-838F-2540DF876EF1@ur.rochester.edu> References: <4C0B4DC8-B1BD-4BDC-8717-A317C551E046@ur.rochester.edu> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:35052) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zkw39-0007NK-IL for emacs-orgmode@gnu.org; Sat, 10 Oct 2015 11:27:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zkw36-0004Im-8r for emacs-orgmode@gnu.org; Sat, 10 Oct 2015 11:27:07 -0400 Received: from mail-bn1bbn0108.outbound.protection.outlook.com ([157.56.111.108]:56935 helo=na01-bn1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zkw36-0004Ii-4C for emacs-orgmode@gnu.org; Sat, 10 Oct 2015 11:27:04 -0400 In-Reply-To: Content-Language: en-US Content-ID: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: John Kitchin Cc: "emacs-orgmode@gnu.org" Hi John, It works like a charm.=20 Thank you so so so much cheers, M > On Oct 10, 2015, at 8:06 AM, John Kitchin wrote= : >=20 > sure, if you make an interactive function that takes a search argument. > Something like this >=20 > (defun some-name (search-arg) > (interactive "sQuery: ") > ; insert code below and change "TODO=3D\"DONE\"" to search-arg > ) >=20 >=20 > Doyley, Marvin M. writes: >=20 >> Is there anyway of making the search term a variable ? >>=20 >>> On Oct 9, 2015, at 1:24 PM, John Kitchin wrot= e: >>>=20 >>> You can do something like this: >>>=20 >>> By TODO keyword to grab the DONE entries. >>>=20 >>> #+BEGIN_SRC emacs-lisp >>> (let ((entries (org-map-entries >>> (lambda () >>> (save-restriction >>> (org-narrow-to-subtree) >>> (buffer-string))) >>> "TODO=3D\"DONE\""))) >>> (switch-to-buffer (get-buffer-create "new")) >>> (org-mode) >>> (mapcar 'insert entries)) >>> #+END_SRC >>>=20 >>>=20 >>>=20 >>> Doyley, Marvin M. writes: >>>=20 >>>> Hi there, >>>>=20 >>>> I have a huge org-file with notes I have taken on various topics (my c= ommonplace org file). Is there an easy way to grab all the entires with a g= iven tag or keyword to a new org-file ? >>>>=20 >>>> Thanks, >>>> M >>>>=20 >>>> --- >>>> 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 >>>=20 >>> -- >>> 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=3Dhttp-3A__kitchingroup.chem= e.cmu.edu&d=3DBQIBAg&c=3Dkbmfwr1Yojg42sGEpaQh5ofMHBeTl9EI2eaqQZhHbOU&r=3DT4= 1F_5QsIVBGYhPPUkgYHUp9iPHgs2rOCjs7rfKaTMU&m=3DZjP3xZzVOvLNMInBTkxBhV_-2rP9u= P3owADCIadxXxk&s=3Dry0y4fD4NMUUCHUpPSK5djnyUZWt57fxbXHuhqUfSls&e=3D >=20 > -- > 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=3Dhttp-3A__kitchingroup.cheme.= cmu.edu&d=3DBQIBAg&c=3Dkbmfwr1Yojg42sGEpaQh5ofMHBeTl9EI2eaqQZhHbOU&r=3DT41F= _5QsIVBGYhPPUkgYHUp9iPHgs2rOCjs7rfKaTMU&m=3DhnMwDGuA_hdr-MPhQEOOEcDQ7Wd1eLg= QFHotHKPOM2Y&s=3DKAVoqsDi0jWRU6Ilqh5eq16troIjU6lPlk-AQ99ZTv8&e=3D=20