From 5e8a0df5de4bcfa1fd07f21960b7771a2389c5e4 Mon Sep 17 00:00:00 2001 From: Malcolm Purvis Date: Thu, 2 Jan 2025 21:36:18 +1100 Subject: [PATCH 3/3] Ignore attempts to jump to an error off the end of the org-lint report. --- lisp/org-lint.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lisp/org-lint.el b/lisp/org-lint.el index 040934235..8d5dce401 100644 --- a/lisp/org-lint.el +++ b/lisp/org-lint.el @@ -295,7 +295,8 @@ for `tabulated-list-printer'." (defun org-lint--current-marker () "Return current report marker." - (get-text-property 0 'org-lint-marker (aref (tabulated-list-get-entry) 0))) + (when-let* ((entry (tabulated-list-get-entry))) + (get-text-property 0 'org-lint-marker (aref entry 0)))) (defun org-lint--current-checker (&optional entry) "Return current report checker. @@ -318,7 +319,7 @@ CHECKERS is the list of checkers used." (defun org-lint--jump-to-source () "Move to source line that generated the report at point." (interactive) - (let ((mk (org-lint--current-marker))) + (when-let* ((mk (org-lint--current-marker))) (switch-to-buffer-other-window org-lint--source-buffer) (unless (<= (point-min) mk (point-max)) (widen)) (goto-char mk) -- 2.47.1