diff --git a/dashboard-widgets.el b/dashboard-widgets.el index df5b8990..5e116806 100644 --- a/dashboard-widgets.el +++ b/dashboard-widgets.el @@ -393,6 +393,7 @@ date part is considered." (defun dashboard-insert-agenda (list-size) "Add the list of LIST-SIZE items of agenda." + (require 'org-agenda) (let ((agenda (dashboard-get-agenda))) (dashboard-insert-section (or (and (boundp 'show-week-agenda-p) show-week-agenda-p "Agenda for the coming week:") @@ -401,9 +402,9 @@ date part is considered." list-size "a" `(lambda (&rest ignore) - (let ((buffer (find-file-other-window (nth 4 ,el)))) + (let ((buffer (find-file-other-window (nth 4 ',el)))) (with-current-buffer buffer - (goto-char (nth 3 ,el))) + (goto-char (nth 3 ',el))) (switch-to-buffer buffer))) (format "%s" (nth 0 el))) (and (not agenda) diff --git a/dashboard.el b/dashboard.el index 4ef94345..cbfd7648 100644 --- a/dashboard.el +++ b/dashboard.el @@ -23,7 +23,6 @@ (require 'bookmark) (require 'calendar) -(require 'org-agenda) (require 'page-break-lines) (require 'recentf) (require 'register)