aboutsummaryrefslogtreecommitdiff
path: root/bard-emacs-modules/bard-emacs-calendar.el
diff options
context:
space:
mode:
Diffstat (limited to 'bard-emacs-modules/bard-emacs-calendar.el')
-rw-r--r--bard-emacs-modules/bard-emacs-calendar.el19
1 files changed, 19 insertions, 0 deletions
diff --git a/bard-emacs-modules/bard-emacs-calendar.el b/bard-emacs-modules/bard-emacs-calendar.el
index ce7d4e8..7aaf8c6 100644
--- a/bard-emacs-modules/bard-emacs-calendar.el
+++ b/bard-emacs-modules/bard-emacs-calendar.el
@@ -80,4 +80,23 @@
holiday-christian-holidays nil
holiday-islamic-holidays nil))
+(defun bard/export-agenda-to-file ()
+ (interactive)
+ (org-eval-in-environment (org-make-parameter-alist
+ '(org-agenda-span
+ 'week
+ org-agenda-use-time-grid t
+ org-agenda-remove-tags t
+ org-agenda-window-setup 'nope))
+ (let* ((wins (current-window-configuration))
+ org-agenda-sticky)
+ (save-excursion
+ (with-current-buffer
+ (get-buffer-create org-agenda-buffer-name)
+ (pop-to-buffer (current-buffer))
+ (org-agenda nil "a")
+ (let ((result (buffer-string)))
+ (with-temp-file "~/.cache/agenda" (insert result)))))
+ (set-window-configuration wins))))
+
(provide 'bard-emacs-calendar)