summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIhor Radchenko <yantar92@posteo.net>2023-12-15 13:52:59 +0100
committerIhor Radchenko <yantar92@posteo.net>2023-12-15 13:52:59 +0100
commit63ef7b92426b5636f912b4f53ab4503d106f6c50 (patch)
tree54ffde2e4a5ad49d955ed0943e3942c6f0868ccc
parentcb71bde7cb04551bc60e61b7782692ce93f0a416 (diff)
downloadorg-mode-63ef7b924.tar.gz
org-lint-wrong-include-link-parameter: Ignore narrowing when verifying
It is implied that we ignore narrowing when searching for included part . But `org-link-search' does not. Widen the included before around its call.
-rw-r--r--lisp/org-lint.el15
1 files changed, 8 insertions, 7 deletions
diff --git a/lisp/org-lint.el b/lisp/org-lint.el
index 3f49ca7..37a3dae 100644
--- a/lisp/org-lint.el
+++ b/lisp/org-lint.el
@@ -738,13 +738,14 @@ in description"
(org-link-search-must-match-exact-headline t))
(unwind-protect
(with-current-buffer buffer
- (when (and search
- (not (ignore-errors
- (org-link-search search nil t))))
- (list (org-element-post-affiliated k)
- (format
- "Invalid search part \"%s\" in INCLUDE keyword"
- search))))
+ (org-with-wide-buffer
+ (when (and search
+ (not (ignore-errors
+ (org-link-search search nil t))))
+ (list (org-element-post-affiliated k)
+ (format
+ "Invalid search part \"%s\" in INCLUDE keyword"
+ search)))))
(unless visiting (kill-buffer buffer)))))))))))))
(defun org-lint-obsolete-include-markup (ast)