all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Stefan Monnier" <monnier+gnu/emacs@rum.cs.yale.edu>
Cc: monnier+gnu/emacs@rum.cs.yale.edu, storm@cua.dk, emacs-devel@gnu.org
Subject: last try (was: while-no-input)
Date: Fri, 01 Nov 2002 23:07:02 -0500	[thread overview]
Message-ID: <200211020407.gA2472v07516@rum.cs.yale.edu> (raw)
In-Reply-To: E187p16-0004Uh-00@fencepost.gnu.org

> C-g is pretty much like an error even if not exactly.
> Quitting is not an anomaly, but it is not normal.
> The arrival of more input is normal.

Not while you're inside `while-no-input'.  In the cases where I want
to use it, the arrival of user input is definitely not normal:
the code within while-no-input should normally run to completion
before the user hits a key.
And the code run inside `while-no-input' (typically tramp or ange-ftp)
usually has no idea that it might be interrupted by some keyboard input,
so such an occurrence is (for the running code) definitely not normal.

> 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 will probably not install it if that means having to use throw
for one case and signal for the other: too much work to uglify
a simple and clean design.

Another reason to use signal is that `throw' has the disadvantage
that you cannot catch the signal so any code you might want to run
"in case the execution is aborted" will need to use unwind-protect.
This might be the right tool in many cases, but not all.

Catch and throw work well when the two places where they occur are
conceptually linked and where the author has some control
over the code that is being unwound (i.e. the code between the catch and
the throw).  In the cases where I want to use while-no-input,
I have no control over this code (otherwise I could have added some
polling directly in that code).

If you don't want to spend time on it, please give a bit
of trust to those who are willing to spend the time.  I have spent
much more time thinking about the feature than implementing it,
so don't just assume that I want to use `signal' because the
implementation is simpler.  I also have spent much more time
thinking about it than you have, so I deserve a bit more credit.


	Stefan


PS: Kim, if you want this feature, you're probably better off
    doing the remaining work, because I'm fed up with this arguing.

  reply	other threads:[~2002-11-02  4:07 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                                 ` Stefan Monnier [this message]
2002-11-03  1:04                                   ` last try (was: while-no-input) 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
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

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

  git send-email \
    --in-reply-to=200211020407.gA2472v07516@rum.cs.yale.edu \
    --to=monnier+gnu/emacs@rum.cs.yale.edu \
    --cc=emacs-devel@gnu.org \
    --cc=storm@cua.dk \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.