emacs-devel
[Top][All Lists]
Advanced

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

Re: Emacs making questions while starting in daemon mode


From: Dan Nicolaescu
Subject: Re: Emacs making questions while starting in daemon mode
Date: Tue, 06 Jul 2010 11:29:48 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux)

Óscar Fuentes <address@hidden> writes:

> Dan Nicolaescu <address@hidden> writes:
>
>>>>> I'm thinking on the case where there is no terminal, or you can not
>>>>> assume that there is a human watching it.
>>>>
>>>> If there's no terminal, the only absolutely safe way is to use:
>>>> emacs -Q --daemon
>>>
>>> This is precisely to avoid the case where emacs asks for user input
>>> while initializing, isn't it?
>>
>> More precisely is to prevent the user from shooting himself in the foot.
>
> In this case, the user did nothing stupid. It is emacs' fault if some
> package asks the user about something on circunstances where it is not
> appropiate.

The user did, it added something to his emacs that asks a question during 
startup.
The user should test emacs --daemon in a terminal before using it without a 
terminal. 

>>> If you start emacs --daemon from KRunner, for instance, there is no
>>> visible console. (KRunner is a KDE tool used for executing applications
>>> by its name. I guess Gnome has something similar.)
>>
>> What happens if you start any other program that requires tty input in
>> the same conditions?
>
> KRunner & friends does not show a tty. `less some-file', for instance,
> detects that it does not have a tty and just terminates. Apparently it
> is the same case for other tools, although not for vim in text mode.
>
> Adding `emacs --daemon' to init scripts is problematic for the same
> reason. Usually, daemons are started by init scripts, which run
> unattended. Is it considered okay for a daemon to ask questions while
> starting?

It's a design decision that was considered the best thing to do after
a few discussions on this list.


>>>>> 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.
>>>>
>>>> How is that different than having a default answer of "no" (or "yes")?
>>>
>>> "yes" and "no" can express very different intentions depending on the
>>> question ("are you sure you want to launch the ICBM?" "start process for
>>> establishing world peace?") C-g means "cancel," which arguably can cause
>>> confussion too, but less so, I hope.
>>
>> What does C-g mean for `yes-or-no-p'?
>
> Abort?

Return value?



reply via email to

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