From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Luc Teirlinck Newsgroups: gmane.emacs.devel Subject: Re: y-or-n-p-with-timeout Date: Tue, 9 Nov 2004 17:16:12 -0600 (CST) Message-ID: <200411092316.iA9NGCZ22010@raven.dms.auburn.edu> References: <87wtwyn8tf.fsf@confusibombus.example.org> NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1100042371 13775 80.91.229.6 (9 Nov 2004 23:19:31 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 9 Nov 2004 23:19:31 +0000 (UTC) Cc: alex@emacswiki.org, monnier@iro.umontreal.ca, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Nov 10 00:19:22 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CRfGj-000109-00 for ; Wed, 10 Nov 2004 00:19:21 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CRfP9-0006bc-Tm for ged-emacs-devel@m.gmane.org; Tue, 09 Nov 2004 18:28:03 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CRfNt-0005zc-6d for emacs-devel@gnu.org; Tue, 09 Nov 2004 18:26:45 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CRfNr-0005z2-O1 for emacs-devel@gnu.org; Tue, 09 Nov 2004 18:26:43 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CRfNr-0005yO-Ho for emacs-devel@gnu.org; Tue, 09 Nov 2004 18:26:43 -0500 Original-Received: from [131.204.53.104] (helo=manatee.dms.auburn.edu) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CRfEQ-0004mw-1v; Tue, 09 Nov 2004 18:16:58 -0500 Original-Received: from raven.dms.auburn.edu (raven.dms.auburn.edu [131.204.53.29]) by manatee.dms.auburn.edu (8.12.10/8.12.10) with ESMTP id iA9NGmFu001376; Tue, 9 Nov 2004 17:16:49 -0600 (CST) Original-Received: (from teirllm@localhost) by raven.dms.auburn.edu (8.11.7p1+Sun/8.11.7) id iA9NGCZ22010; Tue, 9 Nov 2004 17:16:12 -0600 (CST) X-Authentication-Warning: raven.dms.auburn.edu: teirllm set sender to teirllm@dms.auburn.edu using -f Original-To: rms@gnu.org In-reply-to: (message from Richard Stallman on Tue, 09 Nov 2004 06:14:57 -0500) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:29686 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:29686 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.