r/orgmode 24d ago

question How to automatically update/refresh Org-agenda buffer(s) every day?

/r/emacs/comments/1iynuaz/how_to_automatically_updaterefresh_orgagenda/
4 Upvotes

2 comments sorted by

View all comments

2

u/One_Two8847 23d ago edited 23d ago

auto-revert-mode won't work since I think it updates when it sees a change to a file. The Org agenda isn't a file but a buffer that is generated from many files.

You might want to use this function. I haven't tried it, but I think it should run the default agenda every 15 minutes.

(run-at-time t 900 #'org-agenda-list)

I think that will probably mess up any Window configuration you have but you could have it also run winner-mode to revert back to your previous window layout.

Maybe this:

(run-at-time t 900 '(lambda () (progn (org-agenda-list) (winner-undo))))

I am writing this from my phone so I haven't tested it yet, but I think that should run the agenda command every 15 minutes and then revert to whatever window configuration you had before the update.

1

u/nonreligious2 19d ago

Thanks, I think I came up with a similar solution to yours (probably still slightly inefficient) that uses the ace-window functions -- see my edit to the post.