From ba747598c617bb9ce0913eac4ecd141a839e44e2 Mon Sep 17 00:00:00 2001 From: Ihor Radchenko Date: Fri, 26 Apr 2024 18:09:43 +0300 Subject: [PATCH] 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. --- lisp/ox-icalendar.el | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lisp/ox-icalendar.el b/lisp/ox-icalendar.el index 584c78fcf..642590847 100644 --- a/lisp/ox-icalendar.el +++ b/lisp/ox-icalendar.el @@ -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