I got a similar error Invalid duration format: "-" when I was opened my agenda. Let me complete @Denis answer by explaining how this malformed input can be "inadvertently" inserted. In my case, the reason behind is I have mistakenly input "-" in the effort buffer activated on the agenda (e in the agenda). At the time, I've received the same error Invalid ...
Okay, I figured it out (by chance, by reading a different question about time stamps that just came up): Apparently, the agenda just includes everything that contains an "active time stamp". An active time stamp is any time stamp in angular brackets. Thus, if I replace in my timestamp-inserting code
(format-time-string (cdr org-time-...
Here's one way to fontify all entries matching :STYLE: important.
(defun fontify-important-entries ()
;; Move the point to the start of the buffer.
;; Then keep moving down one line until the end of the buffer.
(while (progn (forward-line 1) (not (eobp)))
;; Now get the text property at the start of each line. If there
you could use a local variable in your org files this way:
# Local Variables:
# eval: (auto-revert-mode)
Just append those lines at the end of each generated file. It'll work next time you open them. That should take care of those passive files.
To see the mandatory and optional arguments to functions such as run-with-timer and revert-buffer, type C-h f (aka M-x describe-function).
How about something like this?
(run-with-timer 0 (* 60 60)
(mapc (lambda (buffer)