From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?utf-8?Q?=C3=93scar_Fuentes?= Newsgroups: gmane.emacs.devel Subject: Re: Emacs making questions while starting in daemon mode Date: Tue, 06 Jul 2010 05:31:27 +0200 Message-ID: <87bpali8vk.fsf@telefonica.net> References: <87wrt9j3mj.fsf@telefonica.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: dough.gmane.org 1278387110 32246 80.91.229.12 (6 Jul 2010 03:31:50 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 6 Jul 2010 03:31:50 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jul 06 05:31:48 2010 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.69) (envelope-from ) id 1OVyst-0001GR-QZ for ged-emacs-devel@m.gmane.org; Tue, 06 Jul 2010 05:31:48 +0200 Original-Received: from localhost ([127.0.0.1]:53200 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OVyst-0000Ob-0a for ged-emacs-devel@m.gmane.org; Mon, 05 Jul 2010 23:31:47 -0400 Original-Received: from [140.186.70.92] (port=54056 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OVysn-0000OU-CT for emacs-devel@gnu.org; Mon, 05 Jul 2010 23:31:42 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OVysl-000748-Lu for emacs-devel@gnu.org; Mon, 05 Jul 2010 23:31:41 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:33692) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OVysl-00073t-9m for emacs-devel@gnu.org; Mon, 05 Jul 2010 23:31:39 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1OVysi-0001Cw-NV for emacs-devel@gnu.org; Tue, 06 Jul 2010 05:31:36 +0200 Original-Received: from 219.red-88-24-228.staticip.rima-tde.net ([88.24.228.219]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 06 Jul 2010 05:31:36 +0200 Original-Received: from ofv by 219.red-88-24-228.staticip.rima-tde.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 06 Jul 2010 05:31:36 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 50 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 219.red-88-24-228.staticip.rima-tde.net User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:55N12vrFZyK41inofogOIFlcnMw= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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:126818 Archived-At: Dan Nicolaescu writes: > Óscar Fuentes writes: > >> I've just detected the second instance of a problem that consists on >> asking questions to the user while emacs is starting in daemon mode (see >> bug#6567) Unless the user is starting emacs from a console, he can't > > You can avoid that one by customizing `vc-follow-symlinks'. Good to know. Thanks! > Maybe you can make an argument in that bug report for changing the > default for the above variable... Maybe, but I worry about the general case, because I'm pretty sure that it will happen again somewhere else as soon as I forget about this pitfall. >> notice the question and emacs sits there forever waiting for an >> answer. From the POV of the user, the emacs daemon hangs. > > If "emacs --daemon" asks a question when starting, one should be able > to answer it from the terminal, the same way it is done when emacs is > started in batch mode. I'm thinking on the case where there is no terminal, or you can not assume that there is a human watching it. > In general such a question is due to what the user has in .emacs, we > can't really prevent the user from shooting himself in the foot. > >> Maybe all the features that request input from the user should bail out >> if they are invoked while in daemon mode and there is no console nor >> frame where to interact? I'm thinking of y-or-n-p, ask-user-about*, >> read-from-minibuffer, read-password, etc > > This assumes that there's a default correct answer to any of these > questions, which is doubtful. The absolutely wrong answer is to hang until the user figures out that emacs' initialization froze and starts pulling his hair about the cause. Then, if the cause is on emacs's own code, he needs to find a workaround. IMO, an acceptable "answer" on those cases is to act as if the user pressed C-g to abort the question, leave some notice on *Messages* and keep going with the initialization. Is there a predicate that tells if emacs is initializing?