The function org-babel-insert-result assumes that point is on the SRC_BLOCK that we are executing. This wasn't true, in our case - we were inserting/overwriting the RESULTS block with a placeholder GUID, then searching for the GUID in our results callback and putting point on the RESULTS block. This causes problems in some corner-cases, e.g., named SRC_BLOCKS with spaces in the names (see [1]).
Instead of marking our place in the buffer with a GUID, we can simplify thing by leaving ourselves a marker. We already know the location of the current SRC_BLOCK when we start execution - we just need to keep a reference to it in our callback function.
The GUID that we insert into the results block is serving no purpose now, so we could remove it or replace it with a more informative message. I'll leave it as-is for now and revisit later.
The function
org-babel-insert-result
assumes that point is on the SRC_BLOCK that we are executing. This wasn't true, in our case - we were inserting/overwriting the RESULTS block with a placeholder GUID, then searching for the GUID in our results callback and putting point on the RESULTS block. This causes problems in some corner-cases, e.g., named SRC_BLOCKS with spaces in the names (see [1]).Instead of marking our place in the buffer with a GUID, we can simplify thing by leaving ourselves a marker. We already know the location of the current SRC_BLOCK when we start execution - we just need to keep a reference to it in our callback function.
The GUID that we insert into the results block is serving no purpose now, so we could remove it or replace it with a more informative message. I'll leave it as-is for now and revisit later.
[1] https://github.com/astahlman/ob-async/issues/46