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: Óscar Fuentes
Subject: Re: Emacs making questions while starting in daemon mode
Date: Tue, 06 Jul 2010 05:31:27 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Dan Nicolaescu <address@hidden> writes:

> Óscar Fuentes <address@hidden> writes:
>
>> I've just detected the second instance of a problem that consists on
>> asking questions to the user while emacs is starting in daemon mode (see
>> bug#6567) Unless the user is starting emacs from a console, he can't
>
> You can avoid that one by customizing `vc-follow-symlinks'.

Good to know. Thanks!

> Maybe you can make an argument in that bug report for changing the
> default for the above variable...

Maybe, but I worry about the general case, because I'm pretty sure that
it will happen again somewhere else as soon as I forget about this
pitfall.

>> notice the question and emacs sits there forever waiting for an
>> answer. From the POV of the user, the emacs daemon hangs.
>
> If "emacs --daemon" asks a question when starting, one should be able
> to answer it from the terminal, the same way it is done when emacs is
> started in batch mode.

I'm thinking on the case where there is no terminal, or you can not
assume that there is a human watching it.

> In general such a question is due to what the user has in .emacs, we
> can't really prevent the user from shooting himself in the foot.
>
>> Maybe all the features that request input from the user should bail out
>> if they are invoked while in daemon mode and there is no console nor
>> frame where to interact?  I'm thinking of y-or-n-p, ask-user-about*,
>> read-from-minibuffer, read-password, etc
>
> This assumes that there's a default correct answer to any of these
> questions, which is doubtful.

The absolutely wrong answer is to hang until the user figures out that
emacs' initialization froze and starts pulling his hair about the
cause. Then, if the cause is on emacs's own code, he needs to find a
workaround.

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.

Is there a predicate that tells if emacs is initializing?




reply via email to

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