Re: [PATCH] Add variable wl-biff-check-idle-delay, because with wl-biff-use-idle-timer Wanderlust checks mail only once

Pascal Haakmat <[email protected]>
Newsgroups gmane.mail.wanderlust.general
Message-ID <87a8d1x1h2.wl-pascalh__1479.33087214387$1479154600$gmane$org@gmail.com>
On Fri, 19 Aug 2016 11:57:38 +0200,
Pascal Haakmat wrote:

> On Sat, 16 Jul 2016 10:38:06 +0200,
> Kazuhiro Ito wrote:
> 
> > 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))))))
      ))))

Thanks 
Pascal
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.