astahlman / ob-async

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

Fix invalid read syntax error when result overlays are hidden #71

Open spacebat opened 3 years ago

spacebat commented 3 years ago

Prevent org-babel-hide-result-overlays from being inherited by the async process, because overlays are not readable and lead to the following error:

if: Invalid read syntax: "#"

See commit message.

f4nyc commented 3 years ago

Thanks for this pr which help me finding out the problem , "'error in process sentinel: async-handle-result: Invalid read syntax: "#"' . But I don't think hiding org-babel-hide-result-overlays is enough, because other variable may cause same phenomenon. Maybe we could wrap async-inject-variables to prevent passing buffer syntax i.e #<buffer scratch>, to closure ? Besides i wonder if it's valid to inject buffer object.

malb commented 3 years ago

Turns out setting ,(async-inject-variables "\\borg-babel.+" nil "^org-babel-jupyter") also fixes nnicandro/emacs-jupyter/issues/294

ErkiDerLoony commented 3 years ago

Great catch, I was also struggling with this and failed to find a solution until I noticed this PR.