unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: storm@cua.dk (Kim F. Storm)
Cc: Richard Stallman <rms@gnu.org>, emacs-devel@gnu.org
Subject: Re: last try (was: while-no-input)
Date: 05 Nov 2002 00:53:35 +0100	[thread overview]
Message-ID: <5xadkoriww.fsf@kfs2.cua.dk> (raw)
In-Reply-To: <200211041455.gA4EtqF23410@rum.cs.yale.edu>

"Stefan Monnier" <monnier+gnu/emacs@rum.cs.yale.edu> writes:

> >     > Please don't ask me to spend more time on this.
> >     > I have lots of other work to do, and I've made the decision.
> >     But this decision is just wrong.
> > I think it is right, so what can I say?
> 
> How about rebuffing the arguments you excised ?
> You're not really attempting to justify your position.

Well, I can fully understand why Richard thinks that using signal is
the wrong approach.  That is the obvious conclusion one would make if
only thinking about the "formal appearence" of the proposal, without
thinking about the substance of the problem that it tries to solve.

IMHO, Stefan's patch isn't ugly at all; actually, it is a pretty damn
clever solution to a tricky problem!

I can understand Stefan's frustration that the idea is rejected merely
on the reason of "ugliness".


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.

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.

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.

Therefore, the most obvious solution -- once you see it -- to
implement while-no-input is to use the quit signal as an indication
of pending user input.  That way, the existing code to handle
the quit signal will make while-no-input work transparently out of
the box!


In contrast, using throw/catch instead of Stefan's `annotated' quit
signal _DOES_NOT_WORK_ 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!

So although Richard may be right that signal is _formally_ the
wrong vehicle for while-no-input, it is the only vehicle which
will work without modifying the code we want to encapsulate.

So Richard, whether you want it or not, you need to think some more
about this issue to:

- 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),

- or admit that Stefan's signal quit approach (however ugly you think
it is) is a valid approach which actually will do the job properly
with the least amount of work -- and it's already done!


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

  reply	other threads:[~2002-11-04 23:53 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-01 21:19 while-no-input Stefan Monnier
2002-10-02 19:24 ` while-no-input Richard Stallman
2002-10-02 21:43   ` while-no-input Stefan Monnier
2002-10-03 13:28     ` while-no-input Richard Stallman
2002-10-03 15:53       ` while-no-input Stefan Monnier
2002-10-03 22:44         ` while-no-input Kim F. Storm
2002-10-03 22:33           ` while-no-input Stefan Monnier
2002-10-04 15:46         ` while-no-input Richard Stallman
2002-10-04 15:59           ` while-no-input Stefan Monnier
2002-10-05 16:33             ` while-no-input Richard Stallman
2002-10-24  0:06             ` while-no-input Kim F. Storm
2002-10-24  7:20               ` while-no-input Stefan Monnier
2002-10-24 10:24                 ` while-no-input Kim F. Storm
2002-10-25  5:35                   ` while-no-input Richard Stallman
2002-10-25  9:19                     ` while-no-input Kim F. Storm
2002-10-26 20:15                       ` while-no-input Richard Stallman
2002-10-25 13:44                     ` while-no-input Stefan Monnier
2002-10-26 20:13                       ` while-no-input Richard Stallman
2002-10-29 19:45                         ` while-no-input Stefan Monnier
2002-10-31 17:25                           ` while-no-input Richard Stallman
2002-10-31 18:03                             ` while-no-input Stefan Monnier
2002-11-02  3:32                               ` while-no-input Richard Stallman
2002-11-02  4:07                                 ` last try (was: while-no-input) Stefan Monnier
2002-11-03  1:04                                   ` Kim F. Storm
2002-11-04 12:01                                     ` Richard Stallman
2002-11-03 13:57                                   ` Richard Stallman
2002-11-04 14:55                                     ` Stefan Monnier
2002-11-04 23:53                                       ` Kim F. Storm [this message]
2002-11-06  4:50                                         ` Richard Stallman
2002-11-06  9:45                                           ` Kim F. Storm
2002-11-06 17:51                                             ` last try Kai Großjohann
2002-11-07 15:09                                               ` Richard Stallman
2002-11-07 15:07                                             ` last try (was: while-no-input) Richard Stallman
2002-10-05 22:43       ` while-no-input Kim F. Storm

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5xadkoriww.fsf@kfs2.cua.dk \
    --to=storm@cua.dk \
    --cc=emacs-devel@gnu.org \
    --cc=rms@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).