emacs-devel
[Top][All Lists]
Advanced

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

Re: option for loading up a gui specific emacs daemon


From: Eli Zaretskii
Subject: Re: option for loading up a gui specific emacs daemon
Date: Wed, 14 Dec 2016 17:47:54 +0200

> From: Filipe Silva <address@hidden>
> Date: Tue, 13 Dec 2016 21:02:15 -0200
> 
> I'd like to load emacs with emacs --daemon=gui and then connect to it with 
> emacsclient -c --sever-file=gui.
> 
> This works almost right. The problem is that various popular packages make 
> extensive use of the
> (display-graphic-p) function/predicate to query frame capabilities. For 
> example, a theme package may query
> (display-graphic-p) and assign gui or tty colors accordingly. 
> 
> the thing is that(display-graphic-p) always returns nil in a emacs --deamon 
> type of loading, because emacs
> does not know if you are using emacsclient with a gui or a tty. 

If you remove the test from those packages, does everything else in
the package work correctly without signaling any errors?

You see, these tests are supposed to be made before calling APIs that
would otherwise signal an error or otherwise barf on non-GUI frames.
If removing the tests makes the package work fine in the daemon mode
or on a text-mode frame, it means the test is redundant and should
simply be removed.  Very few Emacs features really require GUI frames,
so it could be that these tests, or at least some of them, are
remnants from distant past, when many more features would only work in
GUI mode.

OTOH, if these tests are indeed required, then making them work in the
daemon will not provide any relief for you, because it will just delay
the error until later.

Does the above make sense?



reply via email to

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