astahlman / ob-async

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

Can't exec ob-async due to `error in process sentinel: async-handle-result: Invalid read syntax: "#"` #75

Closed adamist521 closed 3 years ago

adamist521 commented 3 years ago

Checklist

Expected Behavior

#+RESULTS in buffer should change to actual result.

Actual Behavior

#+RESULTS in buffer changes to token but does not change to actual result after that. ex.

#+RESULTS:
: 2d182a9f90d63cded606c28e8182894c

Steps to Reproduce

All :async is not working now...

Troubleshooting Artifacts

troubleshooting.org gist

adamist521 commented 3 years ago

It should be same as following link but made it to new issue since it seems to be different issue https://github.com/astahlman/ob-async/issues/73#issuecomment-760647359

adamist521 commented 3 years ago

listing issue that could be related

(I thought it was issue on async but async worked on troubleshooting.org so I judged it was issue on ob-sync ) https://github.com/jwiegley/emacs-async/issues/52 https://github.com/jwiegley/emacs-async/issues/22

adamist521 commented 3 years ago

updated ob-sync to latest (github master) and solved issue.

following is doom-emacs setting

(package! ob-async
  :recipe (:host github :repo "astahlman/ob-async"))
(add-hook 'ob-async-pre-execute-src-block-hook
          '(lambda ()
             (setq org-plantuml-jar-path "~/plantuml.jar")))
moritzptm commented 2 years ago

I had the same error here. When enabling the debugging in the async package, found that it was an error in setq in the code sent to the background emacs process. In my case, the following code fails:

(setq org-babel-hide-result-overlays (#<overlay from 79 to 79>))

Is happens when the #+RESULTS drawer is collapsed. I didn't dig deep in the code, but worked around just setting the value to nil when calling the execute.

(defun no-hide-overlays (orig-fun &rest args)
  (setq org-babel-hide-result-overlays nil))

(advice-add 'ob-async-org-babel-execute-src-block :before #'no-hide-overlays)