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 files, so I wouldn't expect it to affect this, unless its use has been expanded. Even if it has been expanded, if the directory exists, it should work fine, but if it doesn't exist, and :mkdirp is nil or no, then it should fail. If it is non-nil then the directory should be made I guess. Joao Cortes <joaooneillcor...@outlook.pt> writes: > 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 emacs-lisp :line yes > (default-directory > (or (and dir > (not (member mkdirp '("no" "nil" nil))) > (progn > (let ((d (file-name-as-directory > (expand-file-name dir)))) > (make-directory d 'parents) > d))) > default-directory)) > #+end_src > > This looks like a bug. If the :dir directory already > exists, the :mkdirp parameter should not stop setting the default > directory to :dir -- Professor John Kitchin Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 @johnkitchin http://kitchingroup.cheme.cmu.edu