emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Bug: Org exporter: broken-link errors can't be debugged with debug-on-error [9.3 (release_9.3 @ /usr/share/emacs/28.0.50/lisp/org/)]
@ 2020-11-30 18:43 Dima Kogan
  2020-12-01  6:05 ` Kyle Meyer
  0 siblings, 1 reply; 2+ messages in thread
From: Dima Kogan @ 2020-11-30 18:43 UTC (permalink / raw)
  To: emacs-orgmode

Hi. I'm using the org included with a very recent emacs built from git.

I have a large project consisting of many .org files that I'm exporting
to html. Somewhere there's a broken link, so when I export the project I
get

  user-error: Unable to resolve link: "figures/blahblahblah.svg"

This doesn't tell me where the problem is, specifically, so to find out
I

  (setq debug-on-error t)

and go again. But something about the org code is preventing the
debugger from triggering on this. That really shouldn't be happening.
This is an error that's causing the export to give up and quit, and the
debugger should come up (when debug-on-error).

Also, it would be nice if the error message reported the source file and
line number of the bad link.

Thanks!
Please Cc me in replies; I'm not subscribed to the list.

Emacs  : GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.23, cairo version 1.16.0)
 of 2020-09-29, unofficial emacs-snapshot build: http://emacs.secretsauce.net
Package: Org mode version 9.3 (release_9.3 @ /usr/share/emacs/28.0.50/lisp/org/)


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

* Re: Bug: Org exporter: broken-link errors can't be debugged with debug-on-error [9.3 (release_9.3 @ /usr/share/emacs/28.0.50/lisp/org/)]
  2020-11-30 18:43 Bug: Org exporter: broken-link errors can't be debugged with debug-on-error [9.3 (release_9.3 @ /usr/share/emacs/28.0.50/lisp/org/)] Dima Kogan
@ 2020-12-01  6:05 ` Kyle Meyer
  0 siblings, 0 replies; 2+ messages in thread
From: Kyle Meyer @ 2020-12-01  6:05 UTC (permalink / raw)
  To: Dima Kogan; +Cc: emacs-orgmode

Dima Kogan writes:

> Hi. I'm using the org included with a very recent emacs built from git.
>
> I have a large project consisting of many .org files that I'm exporting
> to html. Somewhere there's a broken link, so when I export the project I
> get
>
>   user-error: Unable to resolve link: "figures/blahblahblah.svg"
>
> This doesn't tell me where the problem is, specifically, so to find out
> I
>
>   (setq debug-on-error t)
>
> and go again. But something about the org code is preventing the
> debugger from triggering on this. That really shouldn't be happening.
> This is an error that's causing the export to give up and quit, and the
> debugger should come up (when debug-on-error).

It's not Org specific; it's a default behavioral difference between
error and user-error:

,----[ C-h f user-error RET ]
| [...]
| In contrast with other errors, user errors normally do not cause
| entry to the debugger, even when ‘debug-on-error’ is non-nil.
| This can be overridden by ‘debug-ignored-errors’.
`----

> Also, it would be nice if the error message reported the source file and
> line number of the bad link.

That does sound helpful.  Completely guessing, but I would think the
source file but not the line number may be easily obtainable when the
org-link-broken error (later converted to a user-error) is signaled.

You may find setting org-export-with-broken-links to `mark' helpful for
locating the broken links, though it marks the broken links in the
output, so the results still need to be mapped back to the corresponding
source file.


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

end of thread, other threads:[~2020-12-01  6:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-30 18:43 Bug: Org exporter: broken-link errors can't be debugged with debug-on-error [9.3 (release_9.3 @ /usr/share/emacs/28.0.50/lisp/org/)] Dima Kogan
2020-12-01  6:05 ` Kyle Meyer

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).