[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: y-or-n-p and emacs --daemon
From: |
Dan Nicolaescu |
Subject: |
Re: y-or-n-p and emacs --daemon |
Date: |
Wed, 3 Dec 2008 11:53:04 -0800 (PST) |
Chong Yidong <address@hidden> writes:
> Espen Wiborg <address@hidden> writes:
>
> >> $ 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.
> >>
> >> 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...).
> >
> > Actually, this yes-or-no-p *is* triggered in daemon mode, but only
> > (AFAICT) in the case uncovered by bug #1310, where a client's X
> > connection is lost and the daemon tries to shut down.
>
> The only thing I can think of is to make y-or-n-p and yes-or-no-p
> default to "no" when only the daemon's dummy terminal is open.
Bad idea:
(unless (y-or-n-p "Stop me from removing all your files")
/bin/rm -rf /
)
> Does anyone have a better suggestion?
Ignore it, or fix it properly: so that it works like y-or-n-p when using -batch.
- y-or-n-p and emacs --daemon, Ulrich Mueller, 2008/12/03
- Re: y-or-n-p and emacs --daemon, Espen Wiborg, 2008/12/03
- Re: y-or-n-p and emacs --daemon, Chong Yidong, 2008/12/03
- Re: y-or-n-p and emacs --daemon,
Dan Nicolaescu <=
- Re: y-or-n-p and emacs --daemon, Chong Yidong, 2008/12/03
- Re: y-or-n-p and emacs --daemon, Dan Nicolaescu, 2008/12/03
- Re: y-or-n-p and emacs --daemon, Stephen J. Turnbull, 2008/12/03
- Re: y-or-n-p and emacs --daemon, Stefan Monnier, 2008/12/03
- Re: y-or-n-p and emacs --daemon, Dan Nicolaescu, 2008/12/03
- Re: y-or-n-p and emacs --daemon, Stefan Monnier, 2008/12/04
- Re: y-or-n-p and emacs --daemon, Ulrich Mueller, 2008/12/04
- Re: y-or-n-p and emacs --daemon, Thierry Volpiatto, 2008/12/04
- Re: y-or-n-p and emacs --daemon, Stefan Monnier, 2008/12/04