emacs-devel
[Top][All Lists]
Advanced

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

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


From: Chong Yidong
Subject: Re: y-or-n-p and emacs --daemon
Date: Wed, 03 Dec 2008 16:07:54 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

Dan Nicolaescu <address@hidden> writes:

>   > 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.

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).

What we could do is to make y-or-n-p signal an error.  Individual
callers will then have to check for daemon-mode and do something else
before calling y-or-n-p; which is also probably the way to fix bug#1310.




reply via email to

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