The setup shown in SDS Project Configuration 2 involved opening the org file and running the my/sds... functions. The order mattered. I frequently found myself defaulting to the wrong environment. Also operating from a different folder was causing issues.

It is demanding to remember that there exists a function outside that needs to be run for the notebook to work properly. With this update, I have eliminated the need to invoke those functions. This has added some extra lines in the org file itself, but all these are in the relevant notebook files. So while this is extra work during writing, there is less to remember while executing the notebooks.

Python

For Python, in the “PROPERTY” header, add a “:python” variable pointing to the correct source.

#+TITLE: Exploratory Data Analysis - Python
#+PROPERTY: header-args:python :python /home/boomerang/Documents/Projects/SDS/Python/.venv/bin/python :session *eda1p* :results output

R

For R, in the “PROPERTY” header, add a “:dir” variable stating the folder containing the renv folder.

#+TITLE: Exploratory Data Analysis - R
#+PROPERTY: header-args:R :session *eda1r* :dir /home/boomerang/Documents/Projects/SDS/R

Julia

For Julia, there is no simple variable to set in the header. Just include the session information there.

#+TITLE: Exploratory Data Analysis - Julia
#+PROPERTY: header-args:julia :session *eda1j*  

The variable needs to be set as a local variable at the bottom of the org file. Set julia-vterm-repl-program to refer to the location of the project and manifest files.

# Local Variables:
# julia-vterm-repl-program: "julia --project=/home/boomerang/Documents/Projects/SDS/Julia"
# End:

The reason it must remain at the bottom is that Emacs checks for local variables only for around 3000 characters from the end. Opening such a file will result in a security warning. You have to manually say yes to the variable loading process.