emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] :session question


From: Andreas Röhler
Subject: Re: [O] :session question
Date: Wed, 27 Mar 2013 13:47:40 +0100
User-agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130307 Thunderbird/17.0.4

Am 27.03.2013 13:22, schrieb Rainer M Krug:
-----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 <address@hidden> wrote:

Am 27.03.2013 10:27, schrieb Andreas Leha:
Andreas Röhler <address@hidden> writes:

Am 26.03.2013 16:31, schrieb Eric Schulte:
Achim Gratz <address@hidden> 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



[ ... ]


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


Hmm, may you point me to the file-wide setting?

Form at stake

(setq org-babel-default-header-args:R '((:session . "org-R")))

seems to put all remaining R-evaluations into a named session "org-R"

Don't see any restriction onto a file resp. buffer. Maybe that's thought 
implicit?

Thanks,

Andreas



reply via email to

[Prev in Thread] Current Thread [Next in Thread]