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 <vianchielfaura@gmail.com>
<http://lists.gnu.org/archive/html/emacs-orgmode/2017-10/msg00424.html>
This commit is contained in:
Nicolas Goaziou 2017-10-30 00:50:11 +01:00
parent 5c91976b49
commit 2567fee3c9
1 changed files with 3 additions and 1 deletions

View File

@ -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