Re: [FR] Present list of errors in separate buffer when running org-export, similar to what org-lint does (was: [Syntax discussion] Should we treat src blocks without LANG as paragraphs?)

2022-12-27 Thread Tim Cross


Ihor Radchenko  writes:

> As Max proposed, it may be a good idea to extend the concept of org-lint
> to export.
>
> We may unify the LaTeX errors, some errors/warnings potentially signalled
> by export backend, and maybe some warnings from org-lint during the
> export process. These errors can ideally be displayed just like in
> org-lint, with ability to jump to the problematic LoCs in
> Org/intermediate file.
>
> This is a medium task and one will need to:
> 1. Generalize org-lint interactive interface (list of errors) to work
>with other code. Extract it into a separate library.
> 2. Accumulate export issues into a list to be displayed. For example,
>broken links can be displayed
> 3. Make functions like `org-latex-compile' accumulate LaTeX errors as
>well. (Optionally) associate LaTeX buffer lines with Org source.
> 4. Display the list of errors/warnings at the end of successful or
>failed export.
>
> Each step if fairly simple, except optional part in 3.
> Patches welcome!
>

Anything which provides additional information to assist the user in
identifying issues in their document is a plus in my view. 



[FR] Present list of errors in separate buffer when running org-export, similar to what org-lint does (was: [Syntax discussion] Should we treat src blocks without LANG as paragraphs?)

2022-12-27 Thread Ihor Radchenko


As Max proposed, it may be a good idea to extend the concept of org-lint
to export.

We may unify the LaTeX errors, some errors/warnings potentially signalled
by export backend, and maybe some warnings from org-lint during the
export process. These errors can ideally be displayed just like in
org-lint, with ability to jump to the problematic LoCs in
Org/intermediate file.

This is a medium task and one will need to:
1. Generalize org-lint interactive interface (list of errors) to work
   with other code. Extract it into a separate library.
2. Accumulate export issues into a list to be displayed. For example,
   broken links can be displayed
3. Make functions like `org-latex-compile' accumulate LaTeX errors as
   well. (Optionally) associate LaTeX buffer lines with Org source.
4. Display the list of errors/warnings at the end of successful or
   failed export.

Each step if fairly simple, except optional part in 3.
Patches welcome!

Max Nikulin  writes:

> ... Exporter may issue warnings, they are 
> collected and presented to user in a temporary window with buffer names 
> and line numbers as in compilation-minor-mode. The user may see that 
> something goes wrong, but if their does not switch to the warnings 
> window then it disappears. It would be great if exporters and lint share 
> code generating warnings. Another issue that mature development tools 
> usually allows to suppress particular warning for a specific line. It 
> may be a problem taking into account specific of Org syntax.
>
> As to `org-lint', I believe, it is hard to discover for new users and 
> there should be a reason to run it. It easy to forget about it even when 
> some problem is faced. It is mentioned in the manual, but
> - https://orgmode.org/manual/Feedback.html does not request to run 
> org-lint before reporting a bug
> - `org-submit-bug-report' neither suggest `org-lint' nor runs it as a 
> check. Likely it should be suppressed (with appropriate report) for 
> large buffers.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at .
Support Org development at ,
or support my work at