now including language specific header arg values in insertion options
* lisp/ob.el (org-babel-insert-header-arg): Now including language specific header arg values in insertion options.
This commit is contained in:
parent
d7d0230bf4
commit
3e86300d6d
14
lisp/ob.el
14
lisp/ob.el
|
@ -601,14 +601,20 @@ arguments and pop open the results in a preview buffer."
|
||||||
(defun org-babel-insert-header-arg ()
|
(defun org-babel-insert-header-arg ()
|
||||||
"Insert a header argument selecting from lists of common args and values."
|
"Insert a header argument selecting from lists of common args and values."
|
||||||
(interactive)
|
(interactive)
|
||||||
(let ((arg (org-icompleting-read
|
(let* ((lang (car (org-babel-get-src-block-info 'light)))
|
||||||
|
(lang-headers (intern (concat "org-babel-header-arg-names:" lang)))
|
||||||
|
(headers (append (if (boundp lang-headers)
|
||||||
|
(mapcar (lambda (h) (cons h :any))
|
||||||
|
(eval lang-headers))
|
||||||
|
nil)
|
||||||
|
org-babel-common-header-args-w-values))
|
||||||
|
(arg (org-icompleting-read
|
||||||
"Header Arg: "
|
"Header Arg: "
|
||||||
(mapcar
|
(mapcar
|
||||||
(lambda (header-spec) (symbol-name (car header-spec)))
|
(lambda (header-spec) (symbol-name (car header-spec)))
|
||||||
org-babel-common-header-args-w-values))))
|
headers))))
|
||||||
(insert ":" arg)
|
(insert ":" arg)
|
||||||
(let ((vals (cdr (assoc (intern arg)
|
(let ((vals (cdr (assoc (intern arg) headers))))
|
||||||
org-babel-common-header-args-w-values))))
|
|
||||||
(when vals
|
(when vals
|
||||||
(insert
|
(insert
|
||||||
" "
|
" "
|
||||||
|
|
Loading…
Reference in New Issue