- (while (not (stop-condition agenda))
- (agenda-run-once! agenda)
- (update-agenda-from-select! agenda)
- ;; Update the agenda's current queue based on
- ;; currently applicable time segments
- (add-segments-contents-to-queue!
- (schedule-extract-until! (agenda-schedule agenda) (gettimeofday))
- (agenda-queue agenda))
- (if post-run-hook
- (post-run-hook agenda)))
+ (parameterize ((%current-agenda-prompt (agenda-prompt-tag agenda))
+ (current-read-waiter wait-for-readable)
+ (current-write-waiter wait-for-writable))
+ (while (not (stop-condition agenda))
+ (agenda-run-once! agenda)
+ (update-agenda-from-select! agenda)
+ (add-segments-contents-to-queue!
+ (schedule-extract-until! (agenda-schedule agenda) (gettimeofday))
+ (agenda-queue agenda))
+ (if post-run-hook
+ (post-run-hook agenda))))