astahlman / ob-async

Asynchronous src_block execution for org-babel
343 stars 32 forks source link

Ensure default-directory is set in results callback #45

Closed astahlman closed 5 years ago

astahlman commented 5 years ago

default-directory was bound when we evaluated the src-block, but not in the results callback.

One situation where this caused problems was when both :dir and :file are set in the headers. We should resolve :file relative to :dir, but we were actually resolving :file relative to the buffer-local value of default-directory.

The new unit test covers this scenario (reported in [1])

[1] https://github.com/astahlman/ob-async/issues/44