emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH] Add next-error support to org-lint report buffer
@ 2024-12-14  7:25 Malcolm Purvis
  2024-12-24 11:02 ` Ihor Radchenko
  0 siblings, 1 reply; 7+ messages in thread
From: Malcolm Purvis @ 2024-12-14  7:25 UTC (permalink / raw)
  To: emacs-orgmode

Years of muscle memory have made me expect that the output of 
linter tools can be processed with `next-error' (C-x `).  This 
isn't the case with org-lint.  This patch hooks the org linter 
report into the next-error infrastructure.

I should have my copyright assignment on file with the FSF.

Malcolm

 
* doc/org-manual.org (Org Syntax): Add next-error keybinding  * 
etc/ORG-NEWS:  * lisp/org-lint.el: Register org-lint report buffer 
with next-error infra.  Add callback function to display error. 
--- 
 doc/org-manual.org | 12 ++++++------ etc/ORG-NEWS       |  5 
 +++++ lisp/org-lint.el   | 35 +++++++++++++++++++++++++++++++++++ 
 3 files changed, 46 insertions(+), 6 deletions(-) 
 
diff --git a/doc/org-manual.org b/doc/org-manual.org index 
d95a9350e..7f6683428 100644 --- a/doc/org-manual.org +++ 
b/doc/org-manual.org @@ -20874,12 +20874,12 @@ a "trust level", 
since false-positive are possible.  From there, you 
 can operate on the reports with the following keys: 
 #+attr_texinfo: :columns 0.22 0.78 
-| {{{kbd(C-j)}}}, {{{kbd(TAB)}}} | Display the offending line 
-| | {{{kbd(RET)}}}                 | Move point to the offending 
-| line            | {{{kbd(g)}}}                   | Check the 
-| document again                    | {{{kbd(h)}}} 
-| | Hide all reports from the same checker      | {{{kbd(i)}}} 
-| | Also remove them from all subsequent checks | {{{kbd(S)}}} 
-| | Sort reports by the column at point         | +| 
-| {{{kbd(C-j)}}}, {{{kbd(TAB)}}} | Display the offending line 
-| | +| {{{kbd(RET)}}}                 | Move point to the 
-| offending line                       | +| {{{kbd(C-x `)}}} 
-| | Move to the next report and display the offending line | +| 
-| {{{kbd(g)}}}                   | Check the document again 
-| | +| {{{kbd(h)}}}                   | Hide all reports from the 
-| same checker                 | +| {{{kbd(i)}}} 
-| | Also remove them from all subsequent checks            | 
  
 ** Context Dependent Documentation :PROPERTIES: 
diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS index 
08857962b..a38b761ad 100644 --- a/etc/ORG-NEWS +++ b/etc/ORG-NEWS 
@@ -355,6 +355,11 @@ The Texinfo exporter no longer removes links 
from headings.  This 
 applies to all headings, below and above the =H= and =toc= export 
 =#+OPTIONS:=.  
+*** next-error supports =org-lint= reports + +The command 
=next-error= can now be used to jump to the next +=org-lint= 
error.  + 
 * Version 9.7  ** Important announcements and breaking changes 
diff --git a/lisp/org-lint.el b/lisp/org-lint.el index 
c85d839bc..040934235 100644 --- a/lisp/org-lint.el +++ 
b/lisp/org-lint.el @@ -172,6 +172,35 @@ are additional check 
identifiers to be removed." 
 \f ;;; Reports UI  
+;; next-error support +(defvar org-lint--next-error-top-of-buffer 
t +  "Is the next error the one at the first line of the buffer? 
+ +Unlike compilation and grep buffers the first line of the org 
lint +report refers to an error.  This needs special handling.") 
+ +(defun org-lint--next-error-function (n &optional reset) + 
"Find and display the next line error in the report.  +N is an 
integer specifying by how many errors to move.  +RESET is a 
boolean which, if non-nil, says to go back to the beginning +of 
the errors before moving.  + +This function is the local support 
for the next-error machinery."  +  (when reset +    (setq 
org-lint--next-error-top-of-buffer t) +    (goto-char 
(point-min))) +  (when org-lint--next-error-top-of-buffer + 
(setq +     org-lint--next-error-top-of-buffer nil +     n (1- 
n))) ; In compilation buffers, point starts before the + 
; first error, so stepping forward one brings you to + 
; the first error.  Here the first error is on the + 
; first line so adjust the count accordingly.  +  (forward-line n) 
+  (org-lint--show-source)) + +;; Report mode + 
 (defvar org-lint--report-mode-map 
   (let ((map (make-sparse-keymap))) 
     (set-keymap-parent map tabulated-list-mode-map) 
@@ -186,6 +215,12 @@ are additional check identifiers to be 
removed." 
 (define-derived-mode org-lint--report-mode tabulated-list-mode 
 "OrgLint" 
   "Major mode used to display reports emitted during linting. 
 \\{org-lint--report-mode-map}" 
+  ;; next-error support.  +  (make-local-variable 
'org-lint--next-error-top-of-buffer) +  (setq + 
next-error-function 'org-lint--next-error-function + 
next-error-last-buffer (current-buffer)) + 
   (setf tabulated-list-format 
 	`[("Line" 6 (lambda (a b) 
--  2.47.1 
 

-- 
          Malcolm Purvis <malcolm@purvis.id.au>


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] Add next-error support to org-lint report buffer
  2024-12-14  7:25 [PATCH] Add next-error support to org-lint report buffer Malcolm Purvis
@ 2024-12-24 11:02 ` Ihor Radchenko
  2024-12-27 23:42   ` Malcolm Purvis
  0 siblings, 1 reply; 7+ messages in thread
From: Ihor Radchenko @ 2024-12-24 11:02 UTC (permalink / raw)
  To: Malcolm Purvis; +Cc: emacs-orgmode

Malcolm Purvis <malcolm@purvis.id.au> writes:

> Years of muscle memory have made me expect that the output of 
> linter tools can be processed with `next-error' (C-x `).  This 
> isn't the case with org-lint.  This patch hooks the org linter 
> report into the next-error infrastructure.

Thanks for the patch!
Unfortunately, the patch seems to be malformed (something inserted line
breaks in inappropriate places).
May you please re-send the patch as an attachment, to make sure that
your MUA does not break things?

-- 
Ihor Radchenko // yantar92,
Org mode maintainer,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] Add next-error support to org-lint report buffer
  2024-12-24 11:02 ` Ihor Radchenko
@ 2024-12-27 23:42   ` Malcolm Purvis
  2024-12-28 15:12     ` Ihor Radchenko
  0 siblings, 1 reply; 7+ messages in thread
From: Malcolm Purvis @ 2024-12-27 23:42 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 371 bytes --]

 
> Thanks for the patch!  Unfortunately, the patch seems to be 
> malformed (something inserted line breaks in inappropriate 
> places).  May you please re-send the patch as an attachment, to 
> make sure that your MUA does not break things? 

Apologies for the malformed patch.  Here it is as an attachment.

Malcolm
-- 
          Malcolm Purvis <malcolm@purvis.id.au>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Add-next-error-support-to-org-lint-report-buffer.patch --]
[-- Type: text/x-patch, Size: 4498 bytes --]

From 72a4e81238a78af1a58c49c1418cffb4032f3bfd Mon Sep 17 00:00:00 2001
From: Malcolm Purvis <malcolm@purvis.id.au>
Date: Sat, 14 Dec 2024 17:18:09 +1100
Subject: [PATCH] Add next-error support to org-lint report buffer

* doc/org-manual.org (Org Syntax): Add next-error keybinding

* etc/ORG-NEWS:

* lisp/org-lint.el: Register org-lint report buffer with next-error
infra.  Add callback function to display error.
---
 doc/org-manual.org | 12 ++++++------
 etc/ORG-NEWS       |  5 +++++
 lisp/org-lint.el   | 35 +++++++++++++++++++++++++++++++++++
 3 files changed, 46 insertions(+), 6 deletions(-)

diff --git a/doc/org-manual.org b/doc/org-manual.org
index d95a9350e..7f6683428 100644
--- a/doc/org-manual.org
+++ b/doc/org-manual.org
@@ -20874,12 +20874,12 @@ a "trust level", since false-positive are possible.  From there, you
 can operate on the reports with the following keys:
 
 #+attr_texinfo: :columns 0.22 0.78
-| {{{kbd(C-j)}}}, {{{kbd(TAB)}}} | Display the offending line                  |
-| {{{kbd(RET)}}}                 | Move point to the offending line            |
-| {{{kbd(g)}}}                   | Check the document again                    |
-| {{{kbd(h)}}}                   | Hide all reports from the same checker      |
-| {{{kbd(i)}}}                   | Also remove them from all subsequent checks |
-| {{{kbd(S)}}}                   | Sort reports by the column at point         |
+| {{{kbd(C-j)}}}, {{{kbd(TAB)}}} | Display the offending line                             |
+| {{{kbd(RET)}}}                 | Move point to the offending line                       |
+| {{{kbd(C-x `)}}}               | Move to the next report and display the offending line |
+| {{{kbd(g)}}}                   | Check the document again                               |
+| {{{kbd(h)}}}                   | Hide all reports from the same checker                 |
+| {{{kbd(i)}}}                   | Also remove them from all subsequent checks            |
 
 ** Context Dependent Documentation
 :PROPERTIES:
diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS
index 08857962b..a38b761ad 100644
--- a/etc/ORG-NEWS
+++ b/etc/ORG-NEWS
@@ -355,6 +355,11 @@ The Texinfo exporter no longer removes links from headings.  This
 applies to all headings, below and above the =H= and =toc= export
 =#+OPTIONS:=.
 
+*** next-error supports =org-lint= reports
+
+The command =next-error= can now be used to jump to the next
+=org-lint= error.
+
 * Version 9.7
 
 ** Important announcements and breaking changes
diff --git a/lisp/org-lint.el b/lisp/org-lint.el
index c85d839bc..040934235 100644
--- a/lisp/org-lint.el
+++ b/lisp/org-lint.el
@@ -172,6 +172,35 @@ are additional check identifiers to be removed."
 \f
 ;;; Reports UI
 
+;; next-error support
+(defvar org-lint--next-error-top-of-buffer t
+  "Is the next error the one at the first line of the buffer?
+
+Unlike compilation and grep buffers the first line of the org lint
+report refers to an error.  This needs special handling.")
+
+(defun org-lint--next-error-function (n &optional reset)
+  "Find and display the next line error in the report.
+N is an integer specifying by how many errors to move.
+RESET is a boolean which, if non-nil, says to go back to the beginning
+of the errors before moving.
+
+This function is the local support for the next-error machinery."
+  (when reset
+    (setq org-lint--next-error-top-of-buffer t)
+    (goto-char (point-min)))
+  (when org-lint--next-error-top-of-buffer
+    (setq
+     org-lint--next-error-top-of-buffer nil
+     n (1- n))) ; In compilation buffers, point starts before the
+                ; first error, so stepping forward one brings you to
+                ; the first error.  Here the first error is on the
+                ; first line so adjust the count accordingly.
+  (forward-line n)
+  (org-lint--show-source))
+
+;; Report mode
+
 (defvar org-lint--report-mode-map
   (let ((map (make-sparse-keymap)))
     (set-keymap-parent map tabulated-list-mode-map)
@@ -186,6 +215,12 @@ are additional check identifiers to be removed."
 (define-derived-mode org-lint--report-mode tabulated-list-mode "OrgLint"
   "Major mode used to display reports emitted during linting.
 \\{org-lint--report-mode-map}"
+  ;; next-error support.
+  (make-local-variable 'org-lint--next-error-top-of-buffer)
+  (setq
+   next-error-function 'org-lint--next-error-function
+   next-error-last-buffer (current-buffer))
+
   (setf tabulated-list-format
 	`[("Line" 6
 	   (lambda (a b)
-- 
2.47.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] Add next-error support to org-lint report buffer
  2024-12-27 23:42   ` Malcolm Purvis
@ 2024-12-28 15:12     ` Ihor Radchenko
  2025-01-02 11:03       ` Malcolm Purvis
  0 siblings, 1 reply; 7+ messages in thread
From: Ihor Radchenko @ 2024-12-28 15:12 UTC (permalink / raw)
  To: Malcolm Purvis; +Cc: emacs-orgmode

Malcolm Purvis <malcolm@purvis.id.au> writes:

> Apologies for the malformed patch.  Here it is as an attachment.

Thanks!

> -| {{{kbd(S)}}}                   | Sort reports by the column at point         |

Looks like you deleted this line by accident.

> +*** next-error supports =org-lint= reports
> +
> +The command =next-error= can now be used to jump to the next
> +=org-lint= error.

I just tried your patch on an Org file with 2 warnings and tried to
press C-x ` repeatedly. Upon moving to the last line in *Org lint*
buffer, I got

Debugger entered--Lisp error: (wrong-type-argument arrayp nil)
  aref(nil 0)
  (get-text-property 0 'org-lint-marker (aref (tabulated-list-get-entry) 0))
  org-lint--current-marker()
  (let ((mk (org-lint--current-marker))) (switch-to-buffer-other-window org-lint--source-buffer) (if (<= (point-min) mk (point-max)) nil (widen)) (goto-char mk) (org-fold-show-set-visibility 'local) (recenter))
  org-lint--jump-to-source()
  (let ((buffer (current-buffer))) (org-lint--jump-to-source) (switch-to-buffer-other-window buffer))
  org-lint--show-source()
  org-lint--next-error-function(1 nil)
  next-error(nil)
  funcall-interactively(next-error nil)
  command-execute(next-error)


-- 
Ihor Radchenko // yantar92,
Org mode maintainer,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] Add next-error support to org-lint report buffer
  2024-12-28 15:12     ` Ihor Radchenko
@ 2025-01-02 11:03       ` Malcolm Purvis
  2025-01-02 19:09         ` Ihor Radchenko
  0 siblings, 1 reply; 7+ messages in thread
From: Malcolm Purvis @ 2025-01-02 11:03 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 705 bytes --]

Thanks for the review and happy new year..
 
>> -| {{{kbd(S)}}} | Sort reports by the column at point | 
> Looks like you deleted this line by accident. 

I've restored this in the patch below.
 
> I just tried your patch on an Org file with 2 warnings and tried 
> to press C-x ` repeatedly. Upon moving to the last line in *Org 
> lint* buffer, I got 
 
This is a bug in the original org-lint code, where this error was 
raised it you pressed <RET> on the line after the list in the 
report.  The next error code just did the same thing.

I've included a fix for that to ignore requests to just to the 
source when not in the list of errors.

Malcolm
-- 
          Malcolm Purvis <malcolm@purvis.id.au>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Add-next-error-support-to-org-lint-report-buffer.patch --]
[-- Type: text/x-patch, Size: 4502 bytes --]

From 72a4e81238a78af1a58c49c1418cffb4032f3bfd Mon Sep 17 00:00:00 2001
From: Malcolm Purvis <malcolm@purvis.id.au>
Date: Sat, 14 Dec 2024 17:18:09 +1100
Subject: [PATCH 1/3] Add next-error support to org-lint report buffer

* doc/org-manual.org (Org Syntax): Add next-error keybinding

* etc/ORG-NEWS:

* lisp/org-lint.el: Register org-lint report buffer with next-error
infra.  Add callback function to display error.
---
 doc/org-manual.org | 12 ++++++------
 etc/ORG-NEWS       |  5 +++++
 lisp/org-lint.el   | 35 +++++++++++++++++++++++++++++++++++
 3 files changed, 46 insertions(+), 6 deletions(-)

diff --git a/doc/org-manual.org b/doc/org-manual.org
index d95a9350e..7f6683428 100644
--- a/doc/org-manual.org
+++ b/doc/org-manual.org
@@ -20874,12 +20874,12 @@ a "trust level", since false-positive are possible.  From there, you
 can operate on the reports with the following keys:
 
 #+attr_texinfo: :columns 0.22 0.78
-| {{{kbd(C-j)}}}, {{{kbd(TAB)}}} | Display the offending line                  |
-| {{{kbd(RET)}}}                 | Move point to the offending line            |
-| {{{kbd(g)}}}                   | Check the document again                    |
-| {{{kbd(h)}}}                   | Hide all reports from the same checker      |
-| {{{kbd(i)}}}                   | Also remove them from all subsequent checks |
-| {{{kbd(S)}}}                   | Sort reports by the column at point         |
+| {{{kbd(C-j)}}}, {{{kbd(TAB)}}} | Display the offending line                             |
+| {{{kbd(RET)}}}                 | Move point to the offending line                       |
+| {{{kbd(C-x `)}}}               | Move to the next report and display the offending line |
+| {{{kbd(g)}}}                   | Check the document again                               |
+| {{{kbd(h)}}}                   | Hide all reports from the same checker                 |
+| {{{kbd(i)}}}                   | Also remove them from all subsequent checks            |
 
 ** Context Dependent Documentation
 :PROPERTIES:
diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS
index 08857962b..a38b761ad 100644
--- a/etc/ORG-NEWS
+++ b/etc/ORG-NEWS
@@ -355,6 +355,11 @@ The Texinfo exporter no longer removes links from headings.  This
 applies to all headings, below and above the =H= and =toc= export
 =#+OPTIONS:=.
 
+*** next-error supports =org-lint= reports
+
+The command =next-error= can now be used to jump to the next
+=org-lint= error.
+
 * Version 9.7
 
 ** Important announcements and breaking changes
diff --git a/lisp/org-lint.el b/lisp/org-lint.el
index c85d839bc..040934235 100644
--- a/lisp/org-lint.el
+++ b/lisp/org-lint.el
@@ -172,6 +172,35 @@ are additional check identifiers to be removed."
 \f
 ;;; Reports UI
 
+;; next-error support
+(defvar org-lint--next-error-top-of-buffer t
+  "Is the next error the one at the first line of the buffer?
+
+Unlike compilation and grep buffers the first line of the org lint
+report refers to an error.  This needs special handling.")
+
+(defun org-lint--next-error-function (n &optional reset)
+  "Find and display the next line error in the report.
+N is an integer specifying by how many errors to move.
+RESET is a boolean which, if non-nil, says to go back to the beginning
+of the errors before moving.
+
+This function is the local support for the next-error machinery."
+  (when reset
+    (setq org-lint--next-error-top-of-buffer t)
+    (goto-char (point-min)))
+  (when org-lint--next-error-top-of-buffer
+    (setq
+     org-lint--next-error-top-of-buffer nil
+     n (1- n))) ; In compilation buffers, point starts before the
+                ; first error, so stepping forward one brings you to
+                ; the first error.  Here the first error is on the
+                ; first line so adjust the count accordingly.
+  (forward-line n)
+  (org-lint--show-source))
+
+;; Report mode
+
 (defvar org-lint--report-mode-map
   (let ((map (make-sparse-keymap)))
     (set-keymap-parent map tabulated-list-mode-map)
@@ -186,6 +215,12 @@ are additional check identifiers to be removed."
 (define-derived-mode org-lint--report-mode tabulated-list-mode "OrgLint"
   "Major mode used to display reports emitted during linting.
 \\{org-lint--report-mode-map}"
+  ;; next-error support.
+  (make-local-variable 'org-lint--next-error-top-of-buffer)
+  (setq
+   next-error-function 'org-lint--next-error-function
+   next-error-last-buffer (current-buffer))
+
   (setf tabulated-list-format
 	`[("Line" 6
 	   (lambda (a b)
-- 
2.47.1


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: 0002-Restore-missing-keybinding-documentation.patch --]
[-- Type: text/x-patch, Size: 927 bytes --]

From 863afe940e5778ef813f34629caf3d5a4449959f Mon Sep 17 00:00:00 2001
From: Malcolm Purvis <malcolm@purvis.id.au>
Date: Thu, 2 Jan 2025 21:35:36 +1100
Subject: [PATCH 2/3] Restore missing keybinding documentation

---
 doc/org-manual.org | 1 +
 1 file changed, 1 insertion(+)

diff --git a/doc/org-manual.org b/doc/org-manual.org
index 7f6683428..89ce86a46 100644
--- a/doc/org-manual.org
+++ b/doc/org-manual.org
@@ -20880,6 +20880,7 @@ can operate on the reports with the following keys:
 | {{{kbd(g)}}}                   | Check the document again                               |
 | {{{kbd(h)}}}                   | Hide all reports from the same checker                 |
 | {{{kbd(i)}}}                   | Also remove them from all subsequent checks            |
+| {{{kbd(S)}}}                   | Sort reports by the column at point                    |
 
 ** Context Dependent Documentation
 :PROPERTIES:
-- 
2.47.1


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #4: 0003-Ignore-attempts-to-jump-to-an-error-off-the-end-of-t.patch --]
[-- Type: text/x-patch, Size: 1273 bytes --]

From 5e8a0df5de4bcfa1fd07f21960b7771a2389c5e4 Mon Sep 17 00:00:00 2001
From: Malcolm Purvis <malcolm@purvis.id.au>
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


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] Add next-error support to org-lint report buffer
  2025-01-02 11:03       ` Malcolm Purvis
@ 2025-01-02 19:09         ` Ihor Radchenko
  2025-01-04 10:48           ` Malcolm Purvis
  0 siblings, 1 reply; 7+ messages in thread
From: Ihor Radchenko @ 2025-01-02 19:09 UTC (permalink / raw)
  To: Malcolm Purvis; +Cc: emacs-orgmode

Malcolm Purvis <malcolm@purvis.id.au> writes:

> Thanks for the review and happy new year..
>  
>>> -| {{{kbd(S)}}} | Sort reports by the column at point | 
>> Looks like you deleted this line by accident. 
>
> I've restored this in the patch below.

I think you can simply squash the fix with the original patch.
  
>> I just tried your patch on an Org file with 2 warnings and tried 
>> to press C-x ` repeatedly. Upon moving to the last line in *Org 
>> lint* buffer, I got 
>  
> This is a bug in the original org-lint code, where this error was 
> raised it you pressed <RET> on the line after the list in the 
> report.  The next error code just did the same thing.
>
> I've included a fix for that to ignore requests to just to the 
> source when not in the list of errors.

Thanks!
This indeed fixed the problem I described.

There is another problem though.
Consider:
1. M-x org-lint
2. Switch back to the original .org buffer
3. M-g M-n
4. Observe link report and .org window swapped and point moving back to
   the lint report. It is not what usually happens with error navigation
   (e.g. during compile or grep navigation)

> +| {{{kbd(C-x `)}}}               | Move to the next report and display the offending line |

May as well mention M-g M-n and maybe `previous-error' (M-g M-p)

-- 
Ihor Radchenko // yantar92,
Org mode maintainer,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] Add next-error support to org-lint report buffer
  2025-01-02 19:09         ` Ihor Radchenko
@ 2025-01-04 10:48           ` Malcolm Purvis
  0 siblings, 0 replies; 7+ messages in thread
From: Malcolm Purvis @ 2025-01-04 10:48 UTC (permalink / raw)
  To: emacs-orgmode

 
> There is another problem though.  Consider: 1. M-x org-lint 
> 2. Switch back to the original .org buffer 3. M-g M-n 4. Observe 
> link report and .org window swapped and point moving back 
>    to the lint report. It is not what usually happens with error 
>    navigation (e.g. during compile or grep navigation)

Thanks.  It appears that org-lint handles the window switching 
differently to compile and grep.  It will take me a little while 
to work out the right approach.

Malcolm
-- 
          Malcolm Purvis <malcolm@purvis.id.au>


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2025-01-04 10:49 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-14  7:25 [PATCH] Add next-error support to org-lint report buffer Malcolm Purvis
2024-12-24 11:02 ` Ihor Radchenko
2024-12-27 23:42   ` Malcolm Purvis
2024-12-28 15:12     ` Ihor Radchenko
2025-01-02 11:03       ` Malcolm Purvis
2025-01-02 19:09         ` Ihor Radchenko
2025-01-04 10:48           ` Malcolm Purvis

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).