[Org] Fix misplaced require when exporting calendar

This commit is contained in:
Daniel - 2017-10-29 22:27:38 +01:00
parent ff607e439f
commit 305c358ca9
Signed by: dbo
GPG Key ID: 4F63DB96D45AA9C6
1 changed files with 20 additions and 20 deletions

View File

@ -804,10 +804,10 @@ _y_: ?y? year _q_: quit _L__l__c_: ?l?
"Export diary.org as ics file to the current value of `org-icalendar-combined-agenda-file.
This is done only if the value of this variable is not null."
(interactive)
(require 'ox-icalendar)
(if (null org-icalendar-combined-agenda-file)
(message "`org-icalendar-combined-agenda-file not set, not exporting diary.")
(progn
(require 'ox-icalendar)
(org-save-all-org-buffers)
(let ((org-agenda-files (list db/org-default-home-file
db/org-default-work-file))