astahlman / ob-async

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

Calls to second emacs process seems to fail #56

Open hh opened 4 years ago

hh commented 4 years ago

Checklist

Expected Behavior

Async returns successfully and placeholder text is replaced with output.

Actual Behavior

Async calles emacs which either doesn't load or fails, placeholder text never get's updated.

Steps to Reproduce

I think this may be related to async--transmit-sexp, the version of org, emacs, or some other package collision:

I either get this during the above:

#+BEGIN_EXAMPLE
async--transmit-sexp: Process emacs not running
#+END_EXAMPLE

Or the following during shell blocks:

#+BEGIN_EXAMPLE
executing Shell code block...
"emacs" #<buffer *emacs*<2>> "/usr/local/bin/emacs-26.2" "-Q -l /usr/local/share/emacs/site-lisp/quelpa/melpa/recipes/async -batch -f async-batch-invoke <none>"
async--transmit-sexp: process emacs no longer connected to pipe; closed it
#+END_EXAMPLE

Troubleshooting Artifacts

https://gist.githubusercontent.com/hh/67c72f2d83284146a1d3c88e42bc02fd/raw/a3de70b0a36cb740eff2c5ff0fe31b11ae0bddeb/troubleshooting.org

TheAntimist commented 4 years ago

I have the same issue but with ob-restclient . Not sure what is causing the issue though

hh commented 4 years ago

It seems on closer inspection, that the spawned emacs process itself, doesn't have the same config as the emacs process that spawned it. I'm using spacemacs, which uses the ~/.emacs.d/init.el to load quite a few things. The spawned emacs appears to bypass ~/.emacs.d/init.el... or something similar.

TheAntimist commented 4 years ago

Ah I see your issue is probably different from mine. I just get the #+BEGIN_EXAMPLE along with a nested #+BEGIN_SRC. I'll probably figure it out or create a ticket later.

You can close out this ticket if you like

astahlman commented 3 years ago

Sorry for the late response. If you're still facing issues, I'd check whether you are able to run an async function without org and/or ob-async. I've just updated troubleshooting.org to add this to the debugging checklist in https://github.com/astahlman/ob-async/pull/68