Adam Sneller <a...@earth2adam.com> writes: > For some reason, I am unable to make changes to my working directory persist, > from one emacs-lisp SRC block to the next. > > For example, consider the following: > > * Literate programming in a single session > :PROPERTIES: > :header-args: :var DIR="/Users/adam/Desktop/test" > :END: > > #+BEGIN_SRC emacs-lisp :session *elisp* > (cd DIR) > #+END_SRC > > #+RESULTS: > : /Users/adam/Desktop/test/ > > > #+BEGIN_SRC emacs-lisp :session *elisp* > (cd ".") > #+END_SRC > > #+RESULTS: > : /Users/adam/org/
Confirmed. This is because `org-babel-execute-src-block' let-binds `default-directory'. So, your changes to it are only affecting lexical scope. Fixes welcome! -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at <https://orgmode.org/>. Support Org development at <https://liberapay.com/org-mode>, or support my work at <https://liberapay.com/yantar92>