Skip to content

Instantly share code, notes, and snippets.

@ht-hieu
Created February 18, 2018 16:12
Show Gist options
  • Save ht-hieu/913edd4c66662117029440209ca219f1 to your computer and use it in GitHub Desktop.
Save ht-hieu/913edd4c66662117029440209ca219f1 to your computer and use it in GitHub Desktop.
ob-async issue

Issue Reporting Checklist

This checklist will help you diagnose problems with your ob-async setup.

Instructions

Execute the src blocks one at a time with ctrl-c ctrl-c to ensure that ob-async-org-babel-execute-src-block is used for files with the :async header-arg. If by the end of this file your issue isn’t solved, open an issue on Github with the contents of this file.

First, make sure you can execute emacs-lisp src blocks without the async header argument. Otherwise you’ve got bigger problems, and none of this is going to work.

(message "Yes, I can synchronously execute emacs-lisp from an org-babel src block.")

Checklist

Have you installed the ctrl-c ctrl-c hook as described in the README? If so, you should see ob-async-org-babel-execute-src-block in this list.

(message "%s" org-ctrl-c-ctrl-c-hook)

From where are you loading ob-async?

(symbol-file 'ob-async-org-babel-execute-src-block)
(message "PID: %s\nEmacs version: %s\norg version: %s\nPath to org: %s" (emacs-pid) (emacs-version) (org-version) (symbol-file 'org-version))

Execution of the :async block occurs in an Emacs subprocess. Are you using a consistent version of emacs and org-mode across both processes? Compare the output of this block the output of the previous block.

(message "PID: %s\nEmacs version: %s\norg version: %s\nPath to org: %s" (emacs-pid) (emacs-version) (org-version) (symbol-file 'org-version))

If you’re using a consistent version and still facing problems, turn on async debugging.

(setq async-debug t)

If possible, replace the following block with a block that reproduces your problem, then execute it.

(+ 1 1)

This is the elisp that was sent to the Emacs subprocess. If there’s still nothing obviously wrong, file an issue on GitHub and include the contents of this file as a Gist.

(switch-to-buffer "*Messages*")
(goto-char (point-max))
(re-search-backward "Transmitting sexp {{{\\([^}]+\\)}}}")
(match-string 1)

Bug Description

If your issue still hasn’t been resolved, describe it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment