- (let* ((new-time (get-time))
- (agenda
- (handle-ports
- ;; Adjust the agenda's time just in time
- ;; We do this here rather than in agenda-run-once to make
- ;; agenda-run-once's behavior fairly predictable
- (set-field agenda (agenda-time) new-time))))
+ (let* ((agenda
+ ;; We have to update the time after ports handled, too
+ ;; because it may have changed after a select
+ (set-field
+ (handle-ports
+ ;; Adjust the agenda's time just in time
+ ;; We do this here rather than in agenda-run-once to make
+ ;; agenda-run-once's behavior fairly predictable
+ (set-field agenda (agenda-time) (get-time)))
+ (agenda-time) (get-time))))