Skip to content

Commit

Permalink
ob-async: update function signature of ob-async-org-babel-execute-src…
Browse files Browse the repository at this point in the history
…-block

Since 0625651e (Update to Org 9.6-3-ga4d38e) ob-async has been broken
on the emacs-29 branch. Fix this by expanding the function to include
the extra parameters.

This works but I'm unsure what effect it will have on older emacsen.

Fixes: astahlman#92
Signed-off-by: Alex Bennée <[email protected]>
  • Loading branch information
stsquad committed Dec 20, 2022
1 parent 9aac486 commit 4970462
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ob-async.el
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ Add additional variables like \"\\(\\borg-babel.+\\|sql-connection-alist\\)\".")
(defalias 'org-babel-execute-src-block:async 'ob-async-org-babel-execute-src-block)

;;;###autoload
(defun ob-async-org-babel-execute-src-block (&optional orig-fun arg info params)
(defun ob-async-org-babel-execute-src-block (&optional orig-fun arg info params executor-type)
"Like org-babel-execute-src-block, but run asynchronously.
Original docstring for org-babel-execute-src-block:
Expand All @@ -84,12 +84,12 @@ block."
nil)
;; If there is no :async parameter, call the original function
((not (assoc :async (nth 2 (or info (org-babel-get-src-block-info)))))
(funcall orig-fun arg info params))
(funcall orig-fun arg info params executor-type))
;; If the src block language is in the list of languages async is not to be
;; used for, call the original function
((member (nth 0 (or info (org-babel-get-src-block-info)))
ob-async-no-async-languages-alist)
(funcall orig-fun arg info params))
(funcall orig-fun arg info params executor-type))
;; Otherwise, perform asynchronous execution
(t
(let ((placeholder (ob-async--generate-uuid)))
Expand Down

0 comments on commit 4970462

Please sign in to comment.