From ae7ef51607711162e5e21f4c97e9db581a02d061 Mon Sep 17 00:00:00 2001 From: Nathaniel Nicandro Date: Sun, 6 May 2018 11:39:39 -0500 Subject: [PATCH] Run `org-babel-after-execute-hook` after async execution finishes --- ob-jupyter.el | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ob-jupyter.el b/ob-jupyter.el index 0c23ef9..3d4d836 100644 --- a/ob-jupyter.el +++ b/ob-jupyter.el @@ -490,6 +490,11 @@ PARAMS." (if (eq result-type 'output) (funcall add-result (mapconcat #'ansi-color-apply traceback "\n")) (funcall add-result (format "%s: %s" ename (ansi-color-apply evalue))))) + (when async + ;; Run the hooks here instead of in the status message to prevent + ;; any delays + (org-with-point-at block-beginning + (run-hooks 'org-babel-after-execute-hook))))) '(:display-data :execute-result) (lambda (msg) (unless (eq result-type 'output)