mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-11-21 06:55:35 +00:00
org-lint: Fix Babel header arg value checker
* lisp/org-lint.el (org-lint-wrong-header-value): Do not merge in default values for header arguments, since we are only checking those defined in the buffer.
This commit is contained in:
parent
8f39d832df
commit
19113219ba
@ -954,35 +954,22 @@ Use \"export %s\" instead"
|
||||
(and (boundp v) (symbol-value v))))
|
||||
org-babel-common-header-args-w-values))
|
||||
(datum-header-values
|
||||
(apply
|
||||
#'org-babel-merge-params
|
||||
org-babel-default-header-args
|
||||
(and language
|
||||
(let ((v (intern (concat "org-babel-default-header-args:"
|
||||
language))))
|
||||
(and (boundp v) (symbol-value v))))
|
||||
(append
|
||||
(list (and (memq type '(babel-call inline-babel-call))
|
||||
org-babel-default-lob-header-args))
|
||||
(progn (goto-char (org-element-property :begin datum))
|
||||
(org-babel-params-from-properties language))
|
||||
(list
|
||||
(org-babel-parse-header-arguments
|
||||
(org-trim
|
||||
(pcase type
|
||||
(`src-block
|
||||
(mapconcat
|
||||
#'identity
|
||||
(cons (org-element-property :parameters datum)
|
||||
(org-element-property :header datum))
|
||||
" "))
|
||||
(`inline-src-block
|
||||
(or (org-element-property :parameters datum) ""))
|
||||
(_
|
||||
(concat
|
||||
(org-element-property :inside-header datum)
|
||||
" "
|
||||
(org-element-property :end-header datum)))))))))))
|
||||
(org-babel-parse-header-arguments
|
||||
(org-trim
|
||||
(pcase type
|
||||
(`src-block
|
||||
(mapconcat
|
||||
#'identity
|
||||
(cons (org-element-property :parameters datum)
|
||||
(org-element-property :header datum))
|
||||
" "))
|
||||
(`inline-src-block
|
||||
(or (org-element-property :parameters datum) ""))
|
||||
(_
|
||||
(concat
|
||||
(org-element-property :inside-header datum)
|
||||
" "
|
||||
(org-element-property :end-header datum))))))))
|
||||
(dolist (header datum-header-values)
|
||||
(let ((allowed-values
|
||||
(cdr (assoc-string (substring (symbol-name (car header)) 1)
|
||||
|
Loading…
Reference in New Issue
Block a user