From 2567fee3c9039fbfdb93fea459738d2c0fed132b Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Mon, 30 Oct 2017 00:50:11 +0100 Subject: [PATCH] Fix Org corruption when `org-agenda-files' is invalid * lisp/org.el (org-install-agenda-files-menu): Prevent errors in `org-agenda-files' from corrupting Org initialization. Reported-by: Allen Li --- lisp/org.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/org.el b/lisp/org.el index d7fff023e..5da51ce39 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -21577,7 +21577,9 @@ Your bug report will be posted to the Org mailing list. ["Cycle through agenda files" org-cycle-agenda-files t] ["Occur in all agenda files" org-occur-in-agenda-files t] "--") - (mapcar 'org-file-menu-entry (org-agenda-files t)))))))) + (mapcar 'org-file-menu-entry + ;; Prevent initialization from failing. + (ignore-errors (org-agenda-files t))))))))) ;;;; Documentation