>>> >>> The question is now why is this function org-babel-mark-file-as-tangled >>> receives NULL as a buffer-file-name? >> >> I'm not sure, but perhaps you could wrap the body of buffer-file-name in >> a (when (buffer-file-name) ...) form to protect against null files. > > Sounds reasonable and I'll put it in to have properly tangled files when > this happens - but then the file-local-variables would not be added if > the file name is null. Is there any way that I could find out why this > is happening (or under which conditions)? >
I'm not sure why this is happening. You could use edebug to step through the tangling process by edebugging the `org-babel-tangle' function with (C-u C-M-x) i.e., (eval-defun 'edebug-it). Cheers, -- Eric Schulte https://cs.unm.edu/~eschulte PGP: 0x614CA05D