Christopher M. Miles writes: > I hope `:mkdirp` header argument can also work for other related header > arguments like `:dir`, `:file` etc not just `:tangle`. Like following > example. > > #+begin_src sh :mkdirp yes :dir "data/code/mkdirp/dir" :file "test" :results file link > echo "hello" > #+end_src > > Do you have any idea about this? I figured out previous question now, it's because ~expand-file-name~ on ~nil~. #+begin_example Debugger entered--Lisp error: (wrong-type-argument stringp nil) expand-file-name(nil) (file-name-as-directory (expand-file-name dir)) (let ((mkdirp (cdr (assq :mkdirp params))) (fnd (file-name-as-directory (expand-file-name dir)))) (if (and (string= mkdirp "yes") fnd) (make-directory fnd 'parents)) (or (and dir (file-name-as-directory (expand-file-name dir))) default-directory))' #+end_example After fix, the patch works fine and passed all tests include my write corresponding test.