Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use marker to keep track of src_block #48

Merged
merged 6 commits into from
Jan 22, 2019

Conversation

astahlman
Copy link
Owner

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] #46

@astahlman astahlman merged commit a6dd575 into master Jan 22, 2019
@astahlman astahlman deleted the use-marker-to-find-src-block branch January 22, 2019 00:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant