update packages
This commit is contained in:
@@ -5,7 +5,8 @@
|
||||
;; Author: Andrew Stahlman <andrewstahlman@gmail.com>
|
||||
;; Created: 10 Feb 2017
|
||||
;; Version: 0.1
|
||||
;; Package-Version: 20190916.1537
|
||||
;; Package-Version: 20210428.2052
|
||||
;; Package-Commit: 9aac486073f5c356ada20e716571be33a350a982
|
||||
|
||||
;; Keywords: tools
|
||||
;; Homepage: https://github.com/astahlman/ob-async
|
||||
@@ -49,6 +50,11 @@ functionality may be implemented separately.")
|
||||
block. You can use this hook to perform language-specific
|
||||
initialization which would normally execute in your init file.")
|
||||
|
||||
(defvar ob-async-inject-variables "\\borg-babel.+"
|
||||
"Regex of variables that should be injected into the async process.
|
||||
It's a good idea to include any variables that are prefixed with `org-babel'.
|
||||
Add additional variables like \"\\(\\borg-babel.+\\|sql-connection-alist\\)\".")
|
||||
|
||||
;;;###autoload
|
||||
(defalias 'org-babel-execute-src-block:async 'ob-async-org-babel-execute-src-block)
|
||||
|
||||
@@ -141,6 +147,8 @@ block."
|
||||
(or (and dir (file-name-as-directory (expand-file-name dir)))
|
||||
default-directory))
|
||||
(cmd (intern (concat "org-babel-execute:" lang)))
|
||||
(org-babel-async-content
|
||||
(buffer-substring-no-properties (point-min) (point-max)))
|
||||
result)
|
||||
(unless (fboundp cmd)
|
||||
(error "No org-babel-execute function for %s!" lang))
|
||||
@@ -155,12 +163,15 @@ block."
|
||||
;; Initialize the new Emacs process with org-babel functions
|
||||
(setq exec-path ',exec-path)
|
||||
(setq load-path ',load-path)
|
||||
,(async-inject-variables ob-async-inject-variables)
|
||||
(package-initialize)
|
||||
(setq ob-async-pre-execute-src-block-hook ',ob-async-pre-execute-src-block-hook)
|
||||
(run-hooks 'ob-async-pre-execute-src-block-hook)
|
||||
(org-babel-do-load-languages 'org-babel-load-languages ',org-babel-load-languages)
|
||||
(let ((default-directory ,default-directory))
|
||||
(,cmd ,body ',params)))
|
||||
(with-temp-buffer
|
||||
(insert org-babel-async-content)
|
||||
(,cmd ,body ',params))))
|
||||
`(lambda (result)
|
||||
(with-current-buffer ,(current-buffer)
|
||||
(let ((default-directory ,default-directory))
|
||||
|
||||
Reference in New Issue
Block a user