Compare commits

...

2 Commits

Author SHA1 Message Date
Ihor Radchenko ba747598c6
org-icalendar-export-agenda-files: Report file name when export fails
* lisp/ox-icalendar.el (org-icalendar-export-agenda-files): When
export fails, display warning listing the error and the problematic
file.
2024-04-26 18:09:43 +03:00
Ihor Radchenko 64049aaddc
lisp/ox.el (org-export-data): Improve broken link error message
* lisp/ox.el (org-export-data): Link to `org-export-with-broken' links
in the error message.  Highlight that export is aborted.
2024-04-26 18:09:03 +03:00
2 changed files with 8 additions and 2 deletions

View File

@ -1142,7 +1142,13 @@ external process."
(catch 'nextfile
(org-check-agenda-file file)
(with-current-buffer (org-get-agenda-file-buffer file)
(org-icalendar-export-to-ics))))
(condition-case err
(org-icalendar-export-to-ics)
(error
(warn "Exporting %s to icalendar failed: %s"
file
(error-message-string err))
(signal (car err) (cdr err)))))))
(org-release-buffers org-agenda-new-buffers)))))
;;;###autoload

View File

@ -1900,7 +1900,7 @@ Return a string."
(progn ,@body)
(org-link-broken
(pcase (plist-get info :with-broken-links)
(`nil (user-error "Unable to resolve link: %S" (nth 1 err)))
(`nil (user-error "Org export aborted. Unable to resolve link: %S\nSee `org-export-with-broken-links'." (nth 1 err)))
(`mark (org-export-data
(format "[BROKEN LINK: %s]" (nth 1 err)) info))
(_ nil))))))