0

I'm trying to "quickly" export my notes ans tasks from org-mode to a html-page with org-publish-projects.

I had a working setup some years ago and I'm trying to reactivate it, but doing the export constantly throws errors like "Unable to resolve link "name of heading" (also some links to entries with custom IDs gave errors).

If I repair each link manually, I loose to much time.

  • Can I make org-publish ignore skip those defective links and just list them in the log messages?
  • is there a way to repair those links automatically?
  • 1
    I guess these are internal links? Maybe these could be fixed with some advanced use of query-replace-regexp? What's wrong with these links, exactly? – JeanPierre Aug 20 at 12:08
  • I don't know in detail. It is some internal links and some with a custom ID and also some links to files - I would have to go through them one by one and I do not have the time for that. so for the moment I would prefer org-publish ignoring those links and just publish what's there instead of publishing nothing at all :-( – p.m Aug 20 at 15:16
  • @JeanPierre: I had a very large file with notes and I've restructured it, splitted the notes to different org-files, grouped them below different headings etc. So the internal links seem to be broken. – p.m Aug 20 at 15:30
1

It seems you can set the variable org-export-with-broken-links:

org-export-with-broken-links is a variable defined in ‘ox.el’. Its value is t Original value was nil

Documentation: Non-nil means do not raise an error on broken links.

When this variable is non-nil, broken links are ignored, without stopping the export process. If it is set to ‘mark’, broken links are marked as such in the output, with a string like

[BROKEN LINK: path]

where PATH is the un-resolvable reference.

This option can also be set with the OPTIONS keyword, e.g., "broken-links:mark".

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.