Re: [PATCH] Add variable wl-biff-check-idle-delay, because with wl-biff-use-idle-timer Wanderlust checks mail only once
Kazuhiro Ito <[email protected]>
| Newsgroups | gmane.mail.wanderlust.general |
|---|---|
| Message-ID | <86wpf5y1vw.wl--xmue__41421.3607939475$1481532229$gmane$org@d1.dion.ne.jp> |
> > > I wrote the patch to fix the below two problems. But because I don't > > > use wl-biff and it is very unstable in my environment, the patch is > > > not much tested. > > > > Thank you! I will try the patch and report any problems. > > The patch seems to work well after adding an "(unwind-protect ...)": > > (defun wl-biff-event-handler () > (unwind-protect > (condition-case signal > (wl-biff-check-folders) > ;; Do redisplay right now, if no input pending. > (sit-for 0) > (error > (message "wl-biff: %s (%s)" (car signal) (cdr signal)))) > (progn > (wl-biff-stop) > (wl-biff-start) > (let ((idle (and wl-biff-use-idle-timer > ;; Available on Emacs 22 or later. > (fboundp 'current-idle-time) > (current-idle-time)))) > (when idle > ;; Run idle timer for the case Emacs keeps idle. > (put 'wl-biff 'timers > (cons (run-with-idle-timer > (+ wl-biff-check-interval (float-time idle)) > nil 'wl-biff-event-handler) > (get 'wl-biff 'timers)))))) > )))) I can't test it much. But it seems not to have bad effects, so I committed it into the repository with minor fix. Please test. -- Kazuhiro Ito