Skip to content

Instantly share code, notes, and snippets.

@michaelmrose
Created June 17, 2020 18:51
Show Gist options
  • Save michaelmrose/879d6de4a066b26442ae65c7e408d116 to your computer and use it in GitHub Desktop.
Save michaelmrose/879d6de4a066b26442ae65c7e408d116 to your computer and use it in GitHub Desktop.
update-agenda-in-background
(defun mmr/agenda-to-html-in-background ()
(async-start (lambda ()
(save-excursion
(with-current-buffer (get-buffer-create "*Org Agenda*")
(org-agenda nil "a"))))
(lambda (a)
(with-current-buffer (htmlize-buffer (get-buffer "*Org Agenda*"))
(write-region (point-min) (point-max) "/tmp/agenda-web.html")))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment