From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: y-or-n-p and emacs --daemon Date: Wed, 03 Dec 2008 21:16:42 -0500 Message-ID: References: <18742.25383.80136.946560@a1i15.kph.uni-mainz.de> <87ocztcy3t.fsf@grumblesmurf.org> <87abbdm4t8.fsf@cyd.mit.edu> <200812031953.mB3Jr4qh027604@mothra.ics.uci.edu> <874p1lj7bp.fsf@cyd.mit.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1228357022 27804 80.91.229.12 (4 Dec 2008 02:17:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 4 Dec 2008 02:17:02 +0000 (UTC) Cc: Dan Nicolaescu , Espen Wiborg , emacs-devel@gnu.org To: Chong Yidong Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Dec 04 03:18:05 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1L83n0-00062n-RI for ged-emacs-devel@m.gmane.org; Thu, 04 Dec 2008 03:18:03 +0100 Original-Received: from localhost ([127.0.0.1]:43597 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L83lq-0000l2-6g for ged-emacs-devel@m.gmane.org; Wed, 03 Dec 2008 21:16:50 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L83ll-0000kR-IV for emacs-devel@gnu.org; Wed, 03 Dec 2008 21:16:45 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L83lk-0000jb-0W for emacs-devel@gnu.org; Wed, 03 Dec 2008 21:16:44 -0500 Original-Received: from [199.232.76.173] (port=59354 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L83lj-0000jY-U9 for emacs-devel@gnu.org; Wed, 03 Dec 2008 21:16:43 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:18834) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1L83lj-0007fu-MA for emacs-devel@gnu.org; Wed, 03 Dec 2008 21:16:43 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ar0EAGvMNknO+Jkl/2dsb2JhbACBbc9CgwGBIw X-IronPort-AV: E=Sophos;i="4.33,711,1220241600"; d="scan'208";a="30625252" Original-Received: from 206-248-153-37.dsl.teksavvy.com (HELO pastel.home) ([206.248.153.37]) by ironport2-out.teksavvy.com with ESMTP; 03 Dec 2008 21:16:43 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id D44ED8BAF; Wed, 3 Dec 2008 21:16:42 -0500 (EST) In-Reply-To: <874p1lj7bp.fsf@cyd.mit.edu> (Chong Yidong's message of "Wed, 03 Dec 2008 16:07:54 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. 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: news.gmane.org gmane.emacs.devel:106544 Archived-At: >> Bad idea: >> (unless (y-or-n-p "Stop me from removing all your files") >> /bin/rm -rf / >> ) Such a question would be a bug that we need fixing. Usually Emacs is pretty consistent in asking questions in such a way that `n' is a safe answer. >> Ignore it, or fix it properly: so that it works like y-or-n-p when >> using -batch. > I don't think that would solve the problem either, since AFAIU the > daemon might not have a user accessible terminal at all (as bug#1310). Does someone know the reason for this problem? E.g. it's not clear to me why the y-or-n-p question is displayed (even though it's after "Starting Emacs daemon", so stdout should have been closed) but the answer is ignored (or is it?). Ideally, either the question comes before detaching and it should then behave as it does in -batch, or the question comes after detaching and it should then wait for a frame to be created to display the question in there. Stefan