From: Luc Teirlinck <teirllm@dms.auburn.edu>
Cc: alex@emacswiki.org, monnier@iro.umontreal.ca, emacs-devel@gnu.org
Subject: Re: y-or-n-p-with-timeout
Date: Tue, 9 Nov 2004 17:16:12 -0600 (CST) [thread overview]
Message-ID: <200411092316.iA9NGCZ22010@raven.dms.auburn.edu> (raw)
In-Reply-To: <E1CRTxh-0005Gf-7w@fencepost.gnu.org> (message from Richard Stallman on Tue, 09 Nov 2004 06:14:57 -0500)
Richard Stallman wrote:
Anyway, please tell me if you know of a good use for this function.
If I don't hear of one, I will mark it obsolete.
feedmail.el uses `y-or-n-p-with-timeout' at a couple of places. It
falls back on the regular `y-or-no-p' for Emacs versions for which
`y-or-n-p-with-timeout' is not defined. If I understand correctly it
will _automatically_ fall back on the regular `y-or-no-p' behavior on
platforms and in situations where `y-or-n-p-with-timeout' is broken.
It would seem that this is exactly the desired behavior in such
situations.
y-or-n-p-with-timeout does not exactly do a lot:
(defun y-or-n-p-with-timeout (prompt seconds default-value)
"Like (y-or-n-p PROMPT), with a timeout.
If the user does not answer after SECONDS seconds, return DEFAULT-VALUE."
(with-timeout (seconds default-value)
(y-or-n-p prompt)))
If `y-or-n-p-with-timeout' is broken on some platforms in certain
situations does this not automatically imply that `with-timeout' is
broken on these same platforms in those same situations?
Sincerely,
Luc.
next prev parent reply other threads:[~2004-11-09 23:16 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-06 15:19 y-or-n-p-with-timeout Richard Stallman
2004-11-06 17:24 ` y-or-n-p-with-timeout Jan D.
2004-11-07 18:04 ` y-or-n-p-with-timeout Richard Stallman
2004-11-06 18:14 ` y-or-n-p-with-timeout Alex Schroeder
2004-11-08 14:49 ` y-or-n-p-with-timeout Stefan
2004-11-09 11:14 ` y-or-n-p-with-timeout Richard Stallman
2004-11-09 23:16 ` Luc Teirlinck [this message]
2004-11-11 3:14 ` y-or-n-p-with-timeout Richard Stallman
2004-11-11 9:20 ` y-or-n-p-with-timeout Jan D.
2004-11-12 7:05 ` y-or-n-p-with-timeout Richard Stallman
2004-11-08 19:58 ` y-or-n-p-with-timeout Matthew Mundell
2004-11-09 21:29 ` y-or-n-p-with-timeout Richard Stallman
2004-11-09 22:51 ` y-or-n-p-with-timeout Matthew Mundell
2004-11-11 3:14 ` y-or-n-p-with-timeout Richard Stallman
2004-11-12 17:04 ` y-or-n-p-with-timeout Matthew Mundell
2004-11-13 16:37 ` y-or-n-p-with-timeout Richard Stallman
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=200411092316.iA9NGCZ22010@raven.dms.auburn.edu \
--to=teirllm@dms.auburn.edu \
--cc=alex@emacswiki.org \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
/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.