[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Python source block and :dir header arg
From: |
Joao Cortes |
Subject: |
Re: [O] Python source block and :dir header arg |
Date: |
Mon, 1 Apr 2019 18:16:53 +0000 |
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