org-lint: Remove checker for #+name with colon
* lisp/org-lint.el (org-lint-colon-in-name):
(colon-in-name): Remove the checker. It is no longer a problem after
b5cfc311d
that allows referring to named elements with name containing
colon.
* testing/lisp/test-org-lint.el (test-org-lint/colon-in-name): Remove
test.
This commit is contained in:
parent
de9f1169d2
commit
bf1d45f9ba
|
@ -958,21 +958,6 @@ Use \"export %s\" instead"
|
|||
(format "No reference for footnote definition [%s]"
|
||||
label))))))))
|
||||
|
||||
(defun org-lint-colon-in-name (ast)
|
||||
(org-element-map ast org-element-all-elements
|
||||
(lambda (e)
|
||||
(let ((name (org-element-property :name e)))
|
||||
(and name
|
||||
(string-match-p ":" name)
|
||||
(list (progn
|
||||
(goto-char (org-element-begin e))
|
||||
(re-search-forward
|
||||
(format "^[ \t]*#\\+\\w+: +%s *$" (regexp-quote name)))
|
||||
(match-beginning 0))
|
||||
(format
|
||||
"Name \"%s\" contains a colon; Babel cannot use it as input"
|
||||
name)))))))
|
||||
|
||||
(defun org-lint-mismatched-planning-repeaters (ast)
|
||||
(org-element-map ast 'planning
|
||||
(lambda (e)
|
||||
|
@ -1528,11 +1513,6 @@ AST is the buffer parse tree."
|
|||
#'org-lint-invalid-babel-call-block
|
||||
:categories '(babel))
|
||||
|
||||
(org-lint-add-checker 'colon-in-name
|
||||
"Report NAME values with a colon"
|
||||
#'org-lint-colon-in-name
|
||||
:categories '(babel))
|
||||
|
||||
(org-lint-add-checker 'wrong-header-argument
|
||||
"Report wrong babel headers"
|
||||
#'org-lint-wrong-header-argument
|
||||
|
|
|
@ -397,15 +397,6 @@ This is not a node property
|
|||
(org-test-with-temp-text "Text[fn:1]\n[fn:1] Definition"
|
||||
(org-lint '(unreferenced-footnote-definition)))))
|
||||
|
||||
(ert-deftest test-org-lint/colon-in-name ()
|
||||
"Test `org-lint-colon-in-name' checker."
|
||||
(should
|
||||
(org-test-with-temp-text "#+name: tab:name\n| a |"
|
||||
(org-lint '(colon-in-name))))
|
||||
(should-not
|
||||
(org-test-with-temp-text "#+name: name\n| a |"
|
||||
(org-lint '(colon-in-name)))))
|
||||
|
||||
(ert-deftest test-org-lint/mismatched-planning-repeaters ()
|
||||
"Test `org-lint-mismatched-planning-repeaters' checker."
|
||||
(should
|
||||
|
|
Loading…
Reference in New Issue