From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Alex Hutcheson Newsgroups: gmane.emacs.devel Subject: Re: option for loading up a gui specific emacs daemon Date: Tue, 13 Dec 2016 18:14:53 -0500 Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11402d9478f15305439264a8 X-Trace: blaine.gmane.org 1481671041 27120 195.159.176.226 (13 Dec 2016 23:17:21 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 13 Dec 2016 23:17:21 +0000 (UTC) Cc: emacs-devel@gnu.org To: Filipe Silva Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Dec 14 00:17:17 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cGwJv-00064q-PI for ged-emacs-devel@m.gmane.org; Wed, 14 Dec 2016 00:17:15 +0100 Original-Received: from localhost ([::1]:44558 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cGwK0-0006c0-0C for ged-emacs-devel@m.gmane.org; Tue, 13 Dec 2016 18:17:20 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44005) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cGwJM-0006Gm-Ex for emacs-devel@gnu.org; Tue, 13 Dec 2016 18:16:41 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cGwJJ-0005be-9T for emacs-devel@gnu.org; Tue, 13 Dec 2016 18:16:40 -0500 Original-Received: from mail-qt0-f180.google.com ([209.85.216.180]:33734) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cGwJJ-0005Vz-2d for emacs-devel@gnu.org; Tue, 13 Dec 2016 18:16:37 -0500 Original-Received: by mail-qt0-f180.google.com with SMTP id p16so2257700qta.0 for ; Tue, 13 Dec 2016 15:16:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=DSAwnbcDzPu+l6G3m1oRPEfRkRiaUlZjYcNKUOLzAH0=; b=AJNJOOAgivuwef00ahSBV2olInXfw1s9aF1aoZyNPiVOzCogW6Aqt5clzgKFopW+Y9 V/hhWpo7Fsse/C3RNPkYcH+C108VKCQE7ieCOGDBsYzD7Qk8RGXLG3T5pRHgk4SKHpPa inEkROlKzXTNcqj/3Y6+fG9o1apdsxZMAg5X1WqcPqztPIIYX4L0QixGRpIm7EV1Wrh0 c8VgJZ16QvfAdNBw+wNF4YPTr69pKBdJm9jNuloUktmb/sSrlqTdKg2kTzNBgTM33+KJ g7N8MYWKQkIXBsx56BWvJ/X/f6sXNwVza+LmFuHOPYNJXDVArjMWJaLUorX7hFTzi+2m FqcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=DSAwnbcDzPu+l6G3m1oRPEfRkRiaUlZjYcNKUOLzAH0=; b=OQGzevlKyZdE/StuiVv352BEl7FyCwafKMSFcpDm579pSGOkpNu5BNS6v6gbItwsDn PZO+BwZMdY2jRi5iABqcppCqGoa8WBLDvdf4iU46iek7j7F7dwn6pGx+/PNQEGnipuZG X17qSN8W8pGAQICGLmGiv/8VVYZFTunKFpYKOCTWA8Gpf0ZpRF2jg1dxUfeo6Bd6g6R7 wJilg/+FcxHaJaGAHJV519rdMAH3flQdkv3pUsyhgFMkh/qgEcN7LhyJ20X1e9ETlD8i QsaC1jPwykj98qK6e9eo7yF02aOGLKMQioidIkfB4d3r+wssS43cbhSL2DKBVtS1Kq61 EeIQ== X-Gm-Message-State: AKaTC01MSBkFx6UZQ3RTTI1kxIaKDpxxrrStJYrvRqA0+240nJUBeiYCCB2urt/C9iDXP3pHw9L6DvsCfzLd2Es1 X-Received: by 10.200.35.105 with SMTP id b38mr85453757qtb.28.1481670913463; Tue, 13 Dec 2016 15:15:13 -0800 (PST) Original-Received: by 10.237.49.193 with HTTP; Tue, 13 Dec 2016 15:14:53 -0800 (PST) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.85.216.180 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:210419 Archived-At: --001a11402d9478f15305439264a8 Content-Type: text/plain; charset=UTF-8 Have you tried starting emacs with: emacsclient -c -a "" That should start a daemon if one isn't already running. I can't easily check the value of (display-graphic-p) during loadup right now, but it would be easy to try. On Tue, Dec 13, 2016 at 6:02 PM, Filipe Silva wrote: > Dear developers of the mighty emacs editor, > > 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. > > Is there a way to say to emacs something like, "look, I'm starting you as > a daemon, but I promise I'll only connect to you with gui frames, so for > all intents and purposes, pretend that you are being started up as a gui". > > If there is not a way to do that, maybe we could add that kind of option? > > The impact of not having this options is that cosmetic packages that make > use of (display-graphic-p) always look off in a emacs --daemon loading > scenario. > > thanks in advance, > > Ninrod > -- Alex Hutcheson alexhutcheson@google.com --001a11402d9478f15305439264a8 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Have you tried starting emacs with:
emacsclient -c -a ""

That should start a daemon if one isn't already runni= ng. I can't easily check the value of (display-graphic-p) during loadup= right now, but it would be easy to try.

On Tue, Dec 13, 2016 at 6:02 PM, = Filipe Silva <filipe.silva@gmail.com> wrote:
Dear developers of the mighty emacs = editor,=C2=A0

I'd like to load emacs with emacs --daemon=3Dg= ui and then connect to it with emacsclient -c --sever-file=3Dgui.


the thing is tha= t(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.=C2=A0

Is there a way to say to emacs something like, "= look, I'm starting you as a daemon, but I promise I'll only connect= to you with gui frames, so for all intents and purposes, pretend that you = are being started up as a gui".=C2=A0

If there is not a way= to do that, maybe we could add that kind of option?=C2=A0

The = impact of not having this options is that cosmetic packages that make use o= f (display-graphic-p) always look off in a emacs --daemon loading scenario.= =C2=A0

thanks in advance,=C2=A0

Ninrod



--
Al= ex Hutcheson
--001a11402d9478f15305439264a8--