all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Dan Nicolaescu <dann@gnu.org>
To: "Óscar Fuentes" <ofv@wanadoo.es>
Cc: emacs-devel@gnu.org
Subject: Re: Emacs making questions while starting in daemon mode
Date: Tue, 06 Jul 2010 11:29:48 -0400	[thread overview]
Message-ID: <yxq630s4oib.fsf@fencepost.gnu.org> (raw)
In-Reply-To: <87y6dohdq1.fsf@telefonica.net> ("Óscar Fuentes"'s message of "Tue\, 06 Jul 2010 16\:44\:22 +0200")

Óscar Fuentes <ofv@wanadoo.es> writes:

> Dan Nicolaescu <dann@gnu.org> 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	other threads:[~2010-07-06 15:29 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-05 16:27 Emacs making questions while starting in daemon mode Óscar Fuentes
2010-07-06  2:39 ` Dan Nicolaescu
2010-07-06  3:31   ` Óscar Fuentes
2010-07-06  3:59     ` Dan Nicolaescu
2010-07-06  4:17       ` Óscar Fuentes
2010-07-06  4:42         ` Dan Nicolaescu
2010-07-06 14:44           ` Óscar Fuentes
2010-07-06 15:29             ` Dan Nicolaescu [this message]
2010-07-06 15:55               ` Óscar Fuentes
2010-07-06 16:27                 ` Chad Brown
2010-07-06 16:53                   ` Stephen J. Turnbull
2010-07-06 17:29                     ` Dan Nicolaescu
2010-07-06 18:13                       ` Jan Djärv
2010-07-06 18:28                         ` Dan Nicolaescu
2010-07-06 19:11                     ` Chad Brown
2010-07-06 17:07                   ` Jan Djärv
2010-07-06 17:26                     ` Chong Yidong
2010-07-06 18:11                       ` Jan Djärv
2010-07-06 16:44                 ` Dan Nicolaescu
2010-07-06  4:04     ` Óscar Fuentes

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=yxq630s4oib.fsf@fencepost.gnu.org \
    --to=dann@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=ofv@wanadoo.es \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.