I updated to the latest org, and I am not sure if you are seeing a bug. You
might need to fix the space between : and session in your example, and name
the session something. Also, you need to make sure the directory exists.
This example works as expected for me:
#+begin_src python :results output
Joao Cortes writes:
> Consider the following python source block,
>
> #+begin_src python :results output : session :dir ./run
> import os;
> cwd = os.getcwd()
> print(cwd)
> #+end_src
>
> The dir header arg should change the directory used to run the session,
> in
Thanks for checking. Do you know what to do now, assuming It is a bug?
That looks different than what I see in org 9.2.1, if it has changed
then it might be a bug indeed.
What I see is:
(default-directory
(or (and dir (file-name-as-directory (expand-file-name dir)))
default-directory))
I think :mkdirp is only for tangling
Looking at org-babel-execute-src-block, It seems the only way to get the
the intended behavihour is adding :mkdirp "yes" or some other
value that gives a true value to the result of the =and= call in the
following snippet.
This is the relevant code at ob-core.el, starting at line 681.
#+begin_src
You might need to provide some additional information about your setup
(org-version, etc.). This works for me in org 9.1.9.
John
---
Professor John Kitchin
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268
Consider the following python source block,
#+begin_src python :results output : session :dir ./run
import os;
cwd = os.getcwd()
print(cwd)
#+end_src
The dir header arg should change the directory used to run the session,
in this case to the directory "../base/r