org-babel: Declare :async header argument in the backends that support it

* lisp/ob-R.el (org-babel-header-args:R):
* lisp/ob-python.el (org-babel-header-args:python): Declare async
header argument.
* lisp/ob-shell.el (org-babel-header-args:shell): Add variable.
(org-babel-shell-initialize): Propagate base
`org-babel-header-args:shell' to `org-babel-header-args:<shell-name>'.

Without declaration, org-lint would not recognize :async argument.
This commit is contained in:
Ihor Radchenko 2024-02-01 16:14:43 +01:00
parent 14acf626fe
commit 40d1352b29
No known key found for this signature in database
GPG Key ID: 6470762A7DA11D8B
3 changed files with 11 additions and 1 deletions

View File

@ -64,6 +64,7 @@
(colormodel . :any)
(useDingbats . :any)
(horizontal . :any)
(async . ((yes no)))
(results . ((file list vector table scalar verbatim)
(raw html latex org code pp drawer)
(replace silent none append prepend)

View File

@ -43,7 +43,8 @@
(defconst org-babel-header-args:python
'((return . :any)
(python . :any))
(python . :any)
(async . ((yes no))))
"Python-specific header arguments.")
(defcustom org-babel-python-command 'auto

View File

@ -45,6 +45,11 @@
(declare-function orgtbl-to-generic "org-table" (table params))
(defvar org-babel-default-header-args:shell '())
(defconst org-babel-header-args:shell
'((async . ((yes no))))
"Shell-specific header arguments.")
(defvar org-babel-shell-names)
(defconst org-babel-shell-set-prompt-commands
@ -86,6 +91,9 @@ variables."
name))
(funcall (if (fboundp 'defvar-1) #'defvar-1 #'set) ;Emacs-29
(intern (concat "org-babel-default-header-args:" name))
nil)
(funcall (if (fboundp 'defvar-1) #'defvar-1 #'set) ;Emacs-29
(intern (concat "org-babel-header-args:" name))
nil)))
(defcustom org-babel-shell-names