QUERY
* Zajcev Evgeny <zevlg(a)yandex.ru> writes:
Gnus users, have you seen this error?
itimer "with-timeout" signaled: (no-catch (nil) timeout)
There is a bug in `with-timeout' macro, when BODY is executed
successfuly intime, timeout handler is not destroyed and executed
lately outside the catch, giving no-catch error .. this patch fixes
this ..
Hi Evgeny!
I'm pretty sure this was fixed in...
,----
| 2005-10-11 Steve Youngs <steve(a)sxemacs.org>
|
| * timer-funcs.el (with-timeout): Use `unwind-protect' to ensure
| the timer is always deleted.
| From: tbennett(a)nvidia.com
|
`----
It is in xemacs-base package version 1.99 and above. Here is the
current `with-timeout'...
,----
| (defmacro with-timeout (list &rest body)
| "Run BODY, but if it doesn't finish in SECONDS seconds, give up.
| If we give up, we run the TIMEOUT-FORMS and return the value of the last one.
| The call should look like:
| (with-timeout (SECONDS TIMEOUT-FORMS...) BODY...)
| The timeout is checked whenever XEmacs waits for some kind of external
| event \(such as keyboard input, input from subprocesses, or a certain time);
| if the program loops without waiting in any way, the timeout will not
| be detected."
| (let ((seconds (car list))
| (timeout-forms (cdr list)))
| `(let ((with-timeout-tag (cons nil nil))
| with-timeout-value with-timeout-timer)
| (unwind-protect
| (when (catch with-timeout-tag
| (progn
| (setq with-timeout-timer
| (start-itimer "with-timeout" #'with-timeout-handler
| ,seconds nil nil t with-timeout-tag))
| (setq with-timeout-value (progn ,@body))
| nil))
| ,@timeout-forms
| with-timeout-value)
| (delete-itimer with-timeout-timer)))))
`----
...does it not work for you?
--
|---<Steve Youngs>---------------<GnuPG KeyID: A94B3003>---|
| I am Dyslexic of Borg. |
| Fusistance is retile. Your arse will be laminated. |
|------------------------------------<steve(a)sxemacs.org>---|