org: fix org layout if no agenda files

This commit is contained in:
Eivind Fonn 2016-08-07 21:04:04 +02:00
parent 98990b25bd
commit f98a80a364
1 changed files with 3 additions and 1 deletions

View File

@ -532,4 +532,6 @@ Headline^^ Visit entry^^ Filter^^ Da
(spacemacs|define-custom-layout "@Org"
:binding "o"
:body
(find-file (first (org-agenda-files)))))
(let ((agenda-files (org-agenda-files)))
(when agenda-files
(find-file (first agenda-files))))))