I currently export my org agenda to html by issuing C-x C-w <NAME OF HTML FILE> RET. I'd like to have a shell script that does this automatically. Is this possible?

  • I was able to get it to write it out with this: emacsclient -e '(progn (org-agenda-list) (write-file "agenda.txt"))' but my emacs was already running (with the server) with the org file loaded. Do you want it to work without emacs running?
    – jtgd
    Dec 30, 2016 at 11:54

1 Answer 1


It is possible to export custom agenda views from the commandline.

emacs -eval (org-batch-store-agenda-views) -kill

If you use emacsclient, similar to what jtgd does, you can use the following command:

emacsclient -eval '(org-batch-store-agenda-views)'

Both commands will store your custom agenda views to the files, that are configured in the custom agenda views. The process is described in the manual section 10.7 Exporting custom agenda views.

Additionally, you can extract agenda information in machine readable formats.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.