From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rainer M Krug Subject: Re: :session question Date: Wed, 27 Mar 2013 13:22:29 +0100 Message-ID: <5152E485.4080707@gmail.com> 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> <10996.1364384905@alphaville> <5152E38A.4050602@easy-emacs.de> Reply-To: Rainer@krugs.de Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([208.118.235.92]:46680) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UKpNU-0000pD-Fg for emacs-orgmode@gnu.org; Wed, 27 Mar 2013 08:22:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UKpNO-0002ur-BT for emacs-orgmode@gnu.org; Wed, 27 Mar 2013 08:22:52 -0400 Received: from mail-wi0-x22d.google.com ([2a00:1450:400c:c05::22d]:44616) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UKpNO-0002uY-2c for emacs-orgmode@gnu.org; Wed, 27 Mar 2013 08:22:46 -0400 Received: by mail-wi0-f173.google.com with SMTP id ez12so2208165wid.12 for ; Wed, 27 Mar 2013 05:22:45 -0700 (PDT) In-Reply-To: <5152E38A.4050602@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: =?UTF-8?B?QW5kcmVhcyBSw7ZobGVy?= , nicholas.dokos@hp.com Cc: emacs-orgmode@gnu.org -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 27/03/13 13:18, Andreas Röhler wrote: > Am 27.03.2013 12:48, schrieb Nick Dokos: >> Andreas Röhler wrote: >> >>> Am 27.03.2013 10:27, schrieb Andreas Leha: >>>> Andreas Röhler 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 >>>> >>>> >>>> >>>> >>> >>> >>> Okay, that's the expected usage. How do you read the example displayed? >>> >>> Looks like a named (:session . "org-R") affects global R namespace. >>> >>> What did "org-R" say here, what might be the purpose? >>> >>> Assume it should switch it on. Then "org-R" represents a boolean here? >>> >> >> "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 >> >> > > Okay, so the :session argument must not be repeated? > > i.e. doesn't look like a session, resp. not a named session > >>>>>> #+begin_src R x <- 1 x #+end_src > > > Once a named session "org-R" is started all non-sessioned source goes there? Looks like a > broken namespace. Isn't it the same with all header arguments? when they are set file wide, they are used for the source block unless specified otherwise. Rainer > > > - -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Centre of Excellence for Invasion Biology Stellenbosch University South Africa Tel : +33 - (0)9 53 10 27 44 Cell: +33 - (0)6 85 62 59 98 Fax : +33 - (0)9 58 10 27 44 Fax (D): +49 - (0)3 21 21 25 22 44 email: Rainer@krugs.de Skype: RMkrug -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBAgAGBQJRUuSDAAoJENvXNx4PUvmC2gEH/1t3vVle7zsa6tVYCMru5QEa uKr1o8+COJ8H92U28kn0++g4Qvtpu9cA8SRG8pH4bDw1Cv3kpg32CkQraJ6k7lIT gFTc1pcw33znfNwYJ4eHVz3uff5pXZOYBgJVtiYdmOEXMh1Kvg5UmHAB9mjoZC6L McZDRGCEGgjIkiGnrsZigCx3PEpYDTTMJ+qMDyaBA7csHxDXW96p3zUbFvLfWsaw 6egmMkvLca/WfJ1xjM4nbdp2VsPl/GofLWa/65hpGv5iMmOf/ixInhT2cQDsCmcB HukzR7Mu6BK4tHy6VGBOzRJARpo2fGGcMPv5BKRw6QRb3FhK/uBTLR6THt6FzFo= =z/jU -----END PGP SIGNATURE-----