Ihor Radchenko writes: >> I agree it's a problem -- if there are multiple blocks with the same >> session but different ":dir" arguments, then a ":file" result of the >> second block will be relative to the wrong :dir. >> >> This seems like a longstanding problem, and affects both async and >> non-async session blocks. > > Maybe something like the attached? Nice, that seems like the right way to do it. I updated the patch for `org-babel-comint-async-filter' to follow the same approach, setting default-directory based on the session buffer's value rather than the :dir header arg.