From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Doyley, Marvin M." Subject: Re: Minning Org-files Date: Sat, 10 Oct 2015 14:57:13 +0000 Message-ID: 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]:55359) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZkvaL-0003T5-86 for emacs-orgmode@gnu.org; Sat, 10 Oct 2015 10:57:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZkvaG-0001ws-5H for emacs-orgmode@gnu.org; Sat, 10 Oct 2015 10:57:21 -0400 Received: from mail-bn1on0135.outbound.protection.outlook.com ([157.56.110.135]:12215 helo=na01-bn1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZkvaG-0001vp-0V for emacs-orgmode@gnu.org; Sat, 10 Oct 2015 10:57:16 -0400 In-Reply-To: Content-Language: en-US Content-ID: <99788075C5C09A4E91493B93C4FF7A72@namprd07.prod.outlook.com> 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" 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 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