From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: :session question Date: Wed, 27 Mar 2013 07:48:25 -0400 Message-ID: <10996.1364384905@alphaville> References: <51501AF2.1070405@easy-emacs.de> <8738vjugwd.fsf@gmail.com> <51516699.6090604@gmail.com> <87ip4ezf93.fsf@med.uni-goettingen.de> <87fvzi72ve.fsf@gmail.com> <87ip4e5gai.fsf@gmail.com> <5152B34E.4020004@easy-emacs.de> <87fvzhmbul.fsf@med.uni-goettingen.de> <5152D9F8.3040404@easy-emacs.de> Reply-To: nicholas.dokos@hp.com Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:36002) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UKoqI-0002Mx-9p for emacs-orgmode@gnu.org; Wed, 27 Mar 2013 07:48:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UKoqB-0007aH-Vp for emacs-orgmode@gnu.org; Wed, 27 Mar 2013 07:48:34 -0400 Received: from g1t0026.austin.hp.com ([15.216.28.33]:1159) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UKoqB-0007a5-Ot for emacs-orgmode@gnu.org; Wed, 27 Mar 2013 07:48:27 -0400 In-Reply-To: Message from =?us-ascii?Q?=3D=3FUTF-8=3FB=3FQW5kcmVhcyBSw7Zob?= =?us-ascii?Q?GVy=3F=3D?= of "Wed\, 27 Mar 2013 12\:37\:28 BST." <5152D9F8.3040404@easy-emacs.de> 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: =?us-ascii?Q?=3D=3FUTF-8=3FB=3FQW5kcmVhcyBSw7ZobGVy=3F=3D?= Cc: emacs-orgmode@gnu.org Andreas R=C3=B6hler wrote: > Am 27.03.2013 10:27, schrieb Andreas Leha: > > Andreas R=C3=B6hler writes: > > > >> Am 26.03.2013 16:31, schrieb Eric Schulte: > >>> Achim Gratz writes: > >>> > >>>> Am 26.03.2013 13:37, schrieb Eric Schulte: > >>>>> This can be done system wide by setting the language-specific header > >>>>> arguments. > >>>> > >>>> I've yet to see an example on how to do this. > >>>> > >>> > >>> #+begin_src emacs-lisp > >>> (setq org-babel-default-header-args:R > >>> '((:session . "org-R"))) > >>> #+end_src > >>> > >>> #+RESULTS: > >>> | (:session . org-R) | > >>> > >>> #+begin_src R > >>> x <- 1 > >>> x > >>> #+end_src > >>> > >>> #+RESULTS: > >>> : 1 > >>> > >>> #+begin_src R > >>> x > >>> #+end_src > >>> > >>> #+RESULTS: > >>> : 1 > >>> > >>>> > >> > >> Hi, > >> > >> this looks very confusing for me. > >> > >> So, what is the purpose of a named session? > >> Understood it being a name-space, whose values don't affect the other = ones. > >> What's in python-mode a dedicated shell. > > > > I can't speak for python, but in R, every differently named session will > > run within its own R process. > > > > The cool thing is, that I can work on file_foo.org and file_bar.org > > simultaneously, when file_foo.org uses R-session *foo* and file_bar.org > > uses R-session *bar*. > > > > [...] > > > > Regards, > > Andreas > > > > > > > > >=20 >=20 > Okay, that's the expected usage. > How do you read the example displayed? >=20 > Looks like a named (:session . "org-R") affects global R namespace. >=20 > What did "org-R" say here, what might be the purpose? >=20 > Assume it should switch it on. Then "org-R" represents a boolean here? >=20 "org-R" is the name of the session. The code blocks illustrate that the value of x (set in the first code block) is preserved and can be used in the second (and subsequent) code blocks. Nick