mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-11-23 07:18:53 +00:00
don't report valid header arguments as suspicious
* lisp/ob.el (org-babel-check-src-block): Don't report valid header arguments as suspicious.
This commit is contained in:
parent
43abeaa488
commit
978fd46069
@ -607,15 +607,17 @@ arguments and pop open the results in a preview buffer."
|
||||
;; TODO: report malformed code block
|
||||
;; TODO: report incompatible combinations of header arguments
|
||||
;; TODO: report uninitialized variables
|
||||
(let ((too-close 2)) ;; <- control closeness to report potential match
|
||||
(let ((too-close 2) ;; <- control closeness to report potential match
|
||||
(names (mapcar #'symbol-name org-babel-header-arg-names)))
|
||||
(dolist (header (mapcar (lambda (arg) (substring (symbol-name (car arg)) 1))
|
||||
(and (org-babel-where-is-src-block-head)
|
||||
(org-babel-parse-header-arguments
|
||||
(org-babel-clean-text-properties
|
||||
(match-string 4))))))
|
||||
(dolist (name (mapcar #'symbol-name org-babel-header-arg-names))
|
||||
(dolist (name names)
|
||||
(when (and (not (string= header name))
|
||||
(<= (org-babel-edit-distance header name) too-close))
|
||||
(<= (org-babel-edit-distance header name) too-close)
|
||||
(not (member header names)))
|
||||
(error "supplied header \"%S\" is suspiciously close to \"%S\""
|
||||
header name))))
|
||||
(message "No suspicious header arguments found.")))
|
||||
|
Loading…
Reference in New Issue
Block a user