emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: last try (was: while-no-input)


From: Kim F. Storm
Subject: Re: last try (was: while-no-input)
Date: 06 Nov 2002 10:45:34 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

Richard Stallman <address@hidden> writes:

>     In contrast, using throw/catch instead of Stefan's `annotated' quit
>     signal _DOES_NOT_WORK_
> 
> You say this as if it were observed fact, but the reason you give
> 
>                          since the code we really want to encapsulate,
>     such as ange-ftp and tramp, is not written to expect a non-local exit
>     due to non-quit events!
> 
> is a theoretical supposition.  Have you tried it?

No, but I did look (briefly) at the relevant code.

I looked at ange-ftp and it does indeed use unwind-protect in many
places, but it also has this code:
 (condition-case ... (quit (delete-procss ...))).

>From this I assumed that ange-ftp needed to be able to catch the quit
signal to properly clean-up connections.  However, looking at the code
again, I must admit that I'm less sure now, whether going through that
part of the code is really a good idea in case of user input!  Only
way to find out is to try it I guess...

I also looked at tramp and it has neither unwind-protects, nor
(condition-case ... quit ...), so I assumed that was quit-safe
[whatever that is ...].  
Maybe it works with both signal and throw -- maybe with neiter.

> 
> If the code was written properly, it should not care which kind of
> nonlocal exit is used.

I see.

> 
>     - either show us (in detail) how throw/catch can be used to achieve
>     the described goals without having to modify ange-ftp and tramp (and
>     every other package that may install file name handlers),
> 
> There is no evidence they need modification, only speculation.
> And if it does need modification, the code probably was not
> written in the recommended way, and the modification is probably
> a good idea anyway.

Ok.  Maybe I'll give it a try then...

-- 
Kim F. Storm <address@hidden> http://www.cua.dk





reply via email to

[Prev in Thread] Current Thread [Next in Thread]