emacs-orgmode
[Top][All Lists]
Advanced

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

[O] Can a code block be evaluated in multiple sessions


From: Jack Li
Subject: [O] Can a code block be evaluated in multiple sessions
Date: Thu, 5 Jan 2017 15:48:33 +0800

Hi,

Can anyone tell me if a code block can be evaluated in multiple sessions? In this toy example I provide, function "f1" is defined in the first block,  and I want to use "f1" in both the second block (session a)  and the third block (session b). 

#+BEGIN_SRC R 
  f1 <- function(x,y,z) x+y+z
#+END_SRC

#+BEGIN_SRC R :session a
f1(1,2,3)
#+END_SRC

#+BEGIN_SRC R  :session b
f1(2,4,6)
#+END_SRC

PS: the three blocks should be in one .org file, and, when exporting, "session a" and "session b" will be run simultaneously and independently.

Thanks,
Jack

reply via email to

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