Am 27.03.2013 12:48, schrieb Nick Dokos:
Andreas Röhler <andreas.roeh...@easy-emacs.de> wrote:
Am 27.03.2013 10:27, schrieb Andreas Leha:
Andreas Röhler <andreas.roeh...@easy-emacs.de> writes:
Am 26.03.2013 16:31, schrieb Eric Schulte:
Achim Gratz <strom...@nexgo.de> 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.