[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

y-or-n-p and emacs --daemon

From: Ulrich Mueller
Subject: y-or-n-p and emacs --daemon
Date: Wed, 3 Dec 2008 11:44:55 +0100

Considering bugs like #1474, I wonder if y-or-n-p DTRT?

Try the following:

   $ emacs-23 -Q --daemon --eval '(y-or-n-p "hello? ")'

1. It hangs indefinitely,
2. it does not detach properly (it forks, but the parent doesn't exit),
3. it doesn't start the server.

Of course 2. and 3. are a consequence of 1. since it doesn't come to
the point where daemon-initialized gets called.

Now the problem is that y-or-n-p is called from many places, so
depending on the configuration there is some chance that Emacs will
ask for user interaction before initialisation is finished. There is
even one in server-start (which AFAICS won't be triggered in daemon
mode, but still...).

Shouldn't y-or-n-p signal an error if there is nobody to answer its
question? (Where necessary, its call could be condition-cased then.)

Same arguments apply to yes-or-no-p, of course.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]