[Top][All Lists]
[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
- Re: while-no-input, Richard Stallman, 2002/11/01
- last try (was: while-no-input), Stefan Monnier, 2002/11/01
- Re: last try (was: while-no-input), Kim F. Storm, 2002/11/02
- Re: last try (was: while-no-input), Richard Stallman, 2002/11/03
- Re: last try (was: while-no-input), Stefan Monnier, 2002/11/04
- Re: last try (was: while-no-input), Kim F. Storm, 2002/11/04
- Re: last try (was: while-no-input), Richard Stallman, 2002/11/05
- Re: last try (was: while-no-input),
Kim F. Storm <=
- Re: last try, Kai Großjohann, 2002/11/06
- Re: last try, Richard Stallman, 2002/11/07
- Re: last try (was: while-no-input), Richard Stallman, 2002/11/07