From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Thomas S. Dye" Subject: [babel] Uses for :session buffers Date: Wed, 4 Nov 2009 09:24:19 -1000 Message-ID: Mime-Version: 1.0 (Apple Message framework v936) Content-Type: multipart/mixed; boundary="===============0846095995==" Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N5lT4-0007TX-RI for emacs-orgmode@gnu.org; Wed, 04 Nov 2009 14:24:30 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N5lSz-0007Rs-9T for emacs-orgmode@gnu.org; Wed, 04 Nov 2009 14:24:29 -0500 Received: from [199.232.76.173] (port=51519 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N5lSz-0007Rp-4X for emacs-orgmode@gnu.org; Wed, 04 Nov 2009 14:24:25 -0500 Received: from outbound-mail-147.bluehost.com ([67.222.38.37]:52118) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1N5lSy-00073D-KQ for emacs-orgmode@gnu.org; Wed, 04 Nov 2009 14:24:24 -0500 Received: from [72.253.144.27] (helo=potofo-ou.westell.com) by box472.bluehost.com with esmtpa (Exim 4.69) (envelope-from ) id 1N5lSu-00057N-8E for emacs-orgmode@gnu.org; Wed, 04 Nov 2009 12:24:20 -0700 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --===============0846095995== Content-Type: multipart/alternative; boundary=Apple-Mail-51--117414886 --Apple-Mail-51--117414886 Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Aloha all, I'm trying to comprehend the possibilities created by org-babel, and would like to draw on the experience of others if I could. I recently discovered the buffer created by :session. In my case, this is an R session that I am building to track the data collection phase of a research project. I was delighted to find that it appears to have recorded everything my org file had done in that session. I have a vague idea that it might be useful to save this as a log to prove that all the little source blocks in my org file indeed were called and executed successfully. I'm wondering: do other org-babelers use the :session buffer? How? For what purpose? Any tips or advice will be appreciated. All the best, Tom Thomas S. Dye, Ph.D. T. S. Dye & Colleagues, Archaeologists, Inc. Phone: (808) 529-0866 Fax: (808) 529-0884 http://www.tsdye.com --Apple-Mail-51--117414886 Content-Type: text/html; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Aloha = all,

I'm trying to comprehend the possibilities = created by org-babel, and would like to draw on the experience of others = if I could.

I recently discovered the buffer = created by :session.  In my case, this is an R session that I am = building to track the data collection phase of a research project. =  I was delighted to find that it appears to have recorded = everything my org file had done in that session.  I have a vague = idea that it might be useful to save this as a log to prove that all the = little source blocks in my org file indeed were called and executed = successfully. 

I'm wondering: do other = org-babelers use the :session buffer?  How?  For what = purpose?

Any tips or advice will be = appreciated.

All the = best,
Tom

Thomas S. Dye, Ph.D.

T. S. Dye & Colleagues, = Archaeologists, Inc.

Phone: (808) 529-0866 Fax: (808) 529-0884

=

= --Apple-Mail-51--117414886-- --===============0846095995== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode --===============0846095995==-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephan Schmitt Subject: Re: [babel] Uses for :session buffers Date: Wed, 04 Nov 2009 21:44:03 +0100 Message-ID: <4AF1E793.2080205@cs.tu-berlin.de> References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N5mhV-0004NQ-Fw for emacs-orgmode@gnu.org; Wed, 04 Nov 2009 15:43:29 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N5mhQ-0004Jt-P6 for emacs-orgmode@gnu.org; Wed, 04 Nov 2009 15:43:29 -0500 Received: from [199.232.76.173] (port=49972 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N5mhQ-0004Jn-M6 for emacs-orgmode@gnu.org; Wed, 04 Nov 2009 15:43:24 -0500 Received: from mail.cs.tu-berlin.de ([130.149.17.13]:43877) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1N5mhQ-00045S-8v for emacs-orgmode@gnu.org; Wed, 04 Nov 2009 15:43:24 -0500 Received: from localhost (localhost [127.0.0.1]) by localhost-12225.cs.tu-berlin.de (Postfix) with ESMTP id 9741E334CB for ; Wed, 4 Nov 2009 21:43:21 +0100 (MET) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: "Thomas S. Dye" Cc: Org Mode Mailing List Thomas S. Dye wrote: > Aloha all, > > I'm trying to comprehend the possibilities created by org-babel, and > would like to draw on the experience of others if I could. > > I recently discovered the buffer created by :session. In my case, this > is an R session that I am building to track the data collection phase of > a research project. I was delighted to find that it appears to have > recorded everything my org file had done in that session. I have a > vague idea that it might be useful to save this as a log to prove that > all the little source blocks in my org file indeed were called and > executed successfully. > > I'm wondering: do other org-babelers use the :session buffer? How? For > what purpose? > Another advantage: you can set a variable in one source block and access it in the next one. Greetings, Stephan > Any tips or advice will be appreciated. > > All the best, > Tom > > Thomas S. Dye, Ph.D. From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Thomas S. Dye" Subject: Re: [babel] Uses for :session buffers Date: Wed, 4 Nov 2009 11:26:25 -1000 Message-ID: <585097C7-6165-400F-A209-D478284C796C@tsdye.com> References: <4AF1E793.2080205@cs.tu-berlin.de> Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N5nNE-0008MR-P0 for emacs-orgmode@gnu.org; Wed, 04 Nov 2009 16:26:36 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N5nNA-0008KN-Cy for emacs-orgmode@gnu.org; Wed, 04 Nov 2009 16:26:36 -0500 Received: from [199.232.76.173] (port=59851 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N5nN9-0008KB-Ph for emacs-orgmode@gnu.org; Wed, 04 Nov 2009 16:26:31 -0500 Received: from outbound-mail-137.bluehost.com ([67.222.39.27]:46458) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1N5nN9-0001mX-An for emacs-orgmode@gnu.org; Wed, 04 Nov 2009 16:26:31 -0500 Received: from [72.253.144.27] (helo=potofo-ou.westell.com) by box472.bluehost.com with esmtpa (Exim 4.69) (envelope-from ) id 1N5nN4-0005kt-RK for emacs-orgmode@gnu.org; Wed, 04 Nov 2009 14:26:27 -0700 In-Reply-To: <4AF1E793.2080205@cs.tu-berlin.de> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Org Mode Mailing List On Nov 4, 2009, at 10:44 AM, Stephan Schmitt wrote: > > Thomas S. Dye wrote: >> Aloha all, >> I'm trying to comprehend the possibilities created by org-babel, >> and would like to draw on the experience of others if I could. >> I recently discovered the buffer created by :session. In my case, >> this is an R session that I am building to track the data >> collection phase of a research project. I was delighted to find >> that it appears to have recorded everything my org file had done in >> that session. I have a vague idea that it might be useful to save >> this as a log to prove that all the little source blocks in my org >> file indeed were called and executed successfully. I'm wondering: >> do other org-babelers use the :session buffer? How? For what >> purpose? > > Another advantage: you can set a variable in one source block > and access it in the next one. > > Greetings, > Stephan > Aloha Stephan, Yes, this is a tremendous advantage. I'm using my org file as a laboratory notebook. The R source code blocks track data entry progress (among other things), so I need to re- establish sessions whenever I come back to the project. I have an R source block that I run each time I open the org file. It looks like something like this: #+src_name r-adze-session #+begin_src R :session adze :noweb :results output library(ggplot2) library(xtable) <> <> objects() #+end_src where <> connects R to our database server and <> is a query of the database that populates a data frame in the R session. The call to objects() lets me know wether or not the session is populated with the objects I'm expecting to be there. I'm particularly interested in the emacs buffer that is established for the session (in this case "adze"), which looks like this when I run r-adze-session: tdye> library(ggplot2) tdye> library(xtable) tdye> library(RMySQL) ... I'm wondering if there is a standard (or intended) use for this file, perhaps as a log, or if other org-babelers typically discard it, as I've been doing? All the best, Tom > >> Any tips or advice will be appreciated. >> All the best, >> Tom >> Thomas S. Dye, Ph.D. From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dan Davison Subject: Re: [babel] Uses for :session buffers Date: Wed, 04 Nov 2009 17:02:56 -0500 Message-ID: <87vdhqlzhr.fsf@stats.ox.ac.uk> References: <4AF1E793.2080205@cs.tu-berlin.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N5nwb-0007Um-Ql for emacs-orgmode@gnu.org; Wed, 04 Nov 2009 17:03:09 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N5nwX-0007S4-SD for emacs-orgmode@gnu.org; Wed, 04 Nov 2009 17:03:09 -0500 Received: from [199.232.76.173] (port=38142 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N5nwX-0007Rl-MK for emacs-orgmode@gnu.org; Wed, 04 Nov 2009 17:03:05 -0500 Received: from markov.stats.ox.ac.uk ([163.1.210.1]:54873) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1N5nwX-0006nU-08 for emacs-orgmode@gnu.org; Wed, 04 Nov 2009 17:03:05 -0500 In-Reply-To: <4AF1E793.2080205@cs.tu-berlin.de> (Stephan Schmitt's message of "Wed, 04 Nov 2009 21:44:03 +0100") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Stephan Schmitt Cc: Org Mode Mailing List Stephan Schmitt writes: > Thomas S. Dye wrote: >> Aloha all, >> >> I'm trying to comprehend the possibilities created by org-babel, and >> would like to draw on the experience of others if I could. >> >> I recently discovered the buffer created by :session. In my case, >> this is an R session that I am building to track the data collection >> phase of a research project. I was delighted to find that it >> appears to have recorded everything my org file had done in that >> session. I have a vague idea that it might be useful to save this >> as a log to prove that all the little source blocks in my org file >> indeed were called and executed successfully. >> >> I'm wondering: do other org-babelers use the :session buffer? How? >> For what purpose? Hi Tom, For R users, org-babel is intended to be used in conjunction with ESS[1] and personally I continue to use the inferior-ESS mode *R* buffer (aka R session buffer) in a similar way to when I was using ESS alone. So for example 1. In an ess-mode (R) edit buffer, I use the ess-eval-* family of functions to evaluate lines, regions, etc. In particular, to debug a code block I switch to an R edit buffer with C-c ', then evaluate line-by-line using C-c C-n (ess-eval-line-and-step).[2] 2. In an ess-mode (R) edit buffer, I use C-z (ess-switch-to-end-of-ESS) to switch to the R session buffer (inferior-ESS mode) 3. In the R session buffer, I try out evaluation of expressions, query data structure contents with str(), list objects in the environment, etc. 4. There are many other nice facilities provided by ESS when working in an R edit buffer with an associated active R session, such as object name completion, displaying formal arguments to functions while you type, etc. I believe that to some extent you can work in a similar way with interactive python and ruby sessions but personally I don't have much experience with that yet. It was always a key aim of org-babel (made easy by org-mode's C-c ') that it should not get in the way of whatever other emacs facilities exist for working with interactive emacs sessions in a particular language. Incidentally, maintaining this sort of automatic compatibility with language-specific software like ESS is one reason why I am slightly skeptical about the value of using org-babel in a "dual major-mode" fashion as was suggested in a separate thread today. Dan Footnotes: [1] http://ess.r-project.org/ >> > > Another advantage: you can set a variable in one source block > and access it in the next one. > > Greetings, > Stephan > >> Any tips or advice will be appreciated. >> >> All the best, >> Tom >> >> Thomas S. Dye, Ph.D. > > > _______________________________________________ > Emacs-orgmode mailing list > Remember: use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Thomas S. Dye" Subject: Re: [babel] Uses for :session buffers Date: Wed, 4 Nov 2009 13:00:36 -1000 Message-ID: <973A6E58-572B-4D09-9CB2-C36C86D31C60@tsdye.com> References: <4AF1E793.2080205@cs.tu-berlin.de> <87vdhqlzhr.fsf@stats.ox.ac.uk> Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N5oqM-0007cz-Nw for emacs-orgmode@gnu.org; Wed, 04 Nov 2009 18:00:46 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N5oqI-0007bm-1F for emacs-orgmode@gnu.org; Wed, 04 Nov 2009 18:00:46 -0500 Received: from [199.232.76.173] (port=35649 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N5oqH-0007be-MG for emacs-orgmode@gnu.org; Wed, 04 Nov 2009 18:00:41 -0500 Received: from outbound-mail-138.bluehost.com ([67.222.39.28]:41438) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1N5oqH-0006wf-1U for emacs-orgmode@gnu.org; Wed, 04 Nov 2009 18:00:41 -0500 In-Reply-To: <87vdhqlzhr.fsf@stats.ox.ac.uk> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Dan Davison Cc: Org Mode Mailing List On Nov 4, 2009, at 12:02 PM, Dan Davison wrote: > Stephan Schmitt writes: > >> Thomas S. Dye wrote: >>> Aloha all, >>> >>> I'm trying to comprehend the possibilities created by org-babel, and >>> would like to draw on the experience of others if I could. >>> >>> I recently discovered the buffer created by :session. In my case, >>> this is an R session that I am building to track the data collection >>> phase of a research project. I was delighted to find that it >>> appears to have recorded everything my org file had done in that >>> session. I have a vague idea that it might be useful to save this >>> as a log to prove that all the little source blocks in my org file >>> indeed were called and executed successfully. >>> >>> I'm wondering: do other org-babelers use the :session buffer? How? >>> For what purpose? > > Hi Tom, > > For R users, org-babel is intended to be used in conjunction with > ESS[1] > and personally I continue to use the inferior-ESS mode *R* buffer > (aka R > session buffer) in a similar way to when I was using ESS alone. So for > example > > 1. In an ess-mode (R) edit buffer, I use the ess-eval-* family of > functions to evaluate lines, regions, etc. In particular, to debug a > code block I switch to an R edit buffer with C-c ', then evaluate > line-by-line using C-c C-n (ess-eval-line-and-step).[2] > 2. In an ess-mode (R) edit buffer, I use C-z (ess-switch-to-end-of- > ESS) > to switch to the R session buffer (inferior-ESS mode) > 3. In the R session buffer, I try out evaluation of expressions, query > data structure contents with str(), list objects in the environment, > etc. > 4. There are many other nice facilities provided by ESS when working > in > an R edit buffer with an associated active R session, such as object > name completion, displaying formal arguments to functions while you > type, etc. > > I believe that to some extent you can work in a similar way with > interactive python and ruby sessions but personally I don't have much > experience with that yet. It was always a key aim of org-babel (made > easy by org-mode's C-c ') that it should not get in the way of > whatever > other emacs facilities exist for working with interactive emacs > sessions > in a particular language. Incidentally, maintaining this sort of > automatic compatibility with language-specific software like ESS is > one > reason why I am slightly skeptical about the value of using org- > babel in > a "dual major-mode" fashion as was suggested in a separate thread > today. > > Dan > > Footnotes: > > [1] http://ess.r-project.org/ Aloha Dan, Thank you. This is extremely helpful, much more convenient than the path I was following. I think I'm beginning to understand what Eric meant when he wrote about emacs taking over his OS and org-mode taking over his emacs. It's astonishing to me how quickly and easily org-mode + org-babel took over my research project. The transition from idea to implementation seems almost frictionless now, and I'm just getting started. All the best, Tom > >>> >> >> Another advantage: you can set a variable in one source block >> and access it in the next one. >> >> Greetings, >> Stephan >> >>> Any tips or advice will be appreciated. >>> >>> All the best, >>> Tom >>> >>> Thomas S. Dye, Ph.D. >> >> >> _______________________________________________ >> Emacs-orgmode mailing list >> Remember: use `Reply All' to send replies to the list. >> Emacs-orgmode@gnu.org >> http://lists.gnu.org/mailman/listinfo/emacs-orgmode > > >