all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* y-or-n-p and emacs --daemon
@ 2008-12-03 10:44 Ulrich Mueller
  2008-12-03 11:11 ` Espen Wiborg
  0 siblings, 1 reply; 13+ messages in thread
From: Ulrich Mueller @ 2008-12-03 10:44 UTC (permalink / raw)
  To: emacs-devel

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.

Ulrich




^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2008-12-04 13:15 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-03 10:44 y-or-n-p and emacs --daemon Ulrich Mueller
2008-12-03 11:11 ` Espen Wiborg
2008-12-03 19:33   ` Chong Yidong
2008-12-03 19:53     ` Dan Nicolaescu
2008-12-03 21:07       ` Chong Yidong
2008-12-03 21:53         ` Dan Nicolaescu
2008-12-04  1:05           ` Stephen J. Turnbull
2008-12-04  2:16         ` Stefan Monnier
2008-12-04  3:02           ` Dan Nicolaescu
2008-12-04  5:29             ` Stefan Monnier
2008-12-04 11:15           ` Ulrich Mueller
2008-12-04 11:28             ` Thierry Volpiatto
2008-12-04 13:15             ` Stefan Monnier

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.