Recently, I added to this answer to the question “How to specify a directory to tangle all code blocks into”, the following comment: “AFAICS, specifying a subdirectory in the argument of :tangle doesn't have any effect”.
At least that is what I see with the following property:
#+PROPERTY: header-args :padline no :mkdirp yes :tangle my/sub/directory/myfile.foo :exports both :noweb yes :eval always
and tangling triggered with
C-c C-v t), the file
myfile.foo is created in the current directory and not in the subdirectory
But I discovered that if the tangling is run non-interactively (in batch mode, outside of
Emacs) with the command:
emacs -Q letgut.org --batch -f org-babel-tangle --kill
then the file
myfile.foo is, as expected, created in the subdirectory
Do you understand the reason for the difference between these two ways of tangling and how to make
org-babel-tangle behave like the command above?