On Tue, Sep 20, 2005 at 10:51:14AM +0200, clemens(a)ghanima.endorphin.org wrote:
My XEmacs 21.5b21 installation has problems with trapping errors
correctly, especially in the process.el framework. Have a look
at this backtrace (edited a bit) :
(12) (error/warning) Error in `pre-idle-hook' (resetting to nil): Attempt to throw
outside of function:To catch `call-process-done' with value `0'
(Summary of my old mail: This error occurs because the following sketch
(catch 'call-process-done
(while t
(run-something-via-the-pre-idle-hook-that-throws-call-process-done)))
does not work, because there is no way to throw something from the code that
is executed as caller from the pre-idle-hook.)
Here is a litte update on that bug. I presumed incorrectly that the
(with-trapping-errors ..) macro was catching 'call-process-done. In fact,
the tag that actually catches this throw is pushed on the catchlist by
safe_run_hook_trapping_problems which is called before
font-lock-pre-idle-hook in event-stream.c.
safe_run_hook_trapping_problems comes from eval.c. This function per default
catches errors and signals. Calling it with NO_INHIBIT_THROWS active in the
flags parameter enables the process sentinel to throws its call-process-done
symbol out of this safe_run_hook.._problems unwind prison.
Setting this flag cures my problem insofar, that I don't have to C-g twice
to get out of the loop installed by call-process-internal (process.el:284),
that would normally be terminated by catching call-process-done.
However, the question is: Is safe_run_hook_trappings supposed to throw
things and interrupt the execution of its callers on the stack frame? In
this case the execution of run_pre_idle_hook <- redisplay <- status_notify
<- delete-process. (callee <- caller)
At least at delete-process, I spot a potential problem (process.c:2180)
because in this method status_notify is called before remove_proces(process)
which - I presume - is for housekeeping. A never-returning status_notify
would prevent this housekeeping.
This can be fixed easily, if that's what we want. Unfortunately, I lack the
insight to decide whether this is correct or not. Please comment on this
issue, as I'm not sure how to proceed.
Best Regards,
--
Fruhwirth Clemens -
http://clemens.endorphin.org
for robots: sp4mtrap(a)endorphin.org