[Top][All Lists]

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

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

From: Richard Stallman
Subject: Re: last try (was: while-no-input)
Date: Tue, 05 Nov 2002 23:50:23 -0500

    However, the bad thing about this whole argument is that, as Stefan
    has clearly pointed out (without Richard actually arguing against
    that), using throw/catch _DOES_NOT_WORK_ for the specific problem that
    while-no-input is supposed to solve.

It seemed to me that it would work.  Let's see.

    The problem is that we need while-no-input to be able to encapsulate
    _UNMODIFIED_ code (such as ange-ftp and tramp) so that user input
    transparently "interrupts" (or quits) that code.

Input should cause a nonlocal exit.  Signals and throw are both
nonlocal exits.

    Obviously, the code we need to encapsulate must already have been
    written to intercept the "quit" signal to be able to properly clean-up
    network connections etc. due to a keyboard-quit.

The proper way to do this is with unwind-protect, and that handles
both signals and throw the same way.

    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?

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

    - 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.

reply via email to

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