all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ergus <spacibba@aol.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Cannot run emacsclient in GUI
Date: Wed, 4 Nov 2020 17:19:35 +0100	[thread overview]
Message-ID: <20201104161935.bawcnqbiu46wxhoe@Ergus> (raw)
In-Reply-To: <83k0v1azxe.fsf@gnu.org>

Hi Eli:

I am interested in this question.

What's the right way to add a hook like this for emacsclient only?

I mean; does the emacsclient defines a variable to condition
window-setup-hooks? Something like (if emacsclient ...)? or are there
any emacsclient-hook?

The elisp manual about emacsclient specifics is not very explicit IMO.

On Wed, Nov 04, 2020 at 05:45:33PM +0200, Eli Zaretskii wrote:
>> From: Ram�n Lorenzo Panad�s-Barrueta
>>  <rpana92@gmail.com>
>> Date: Wed, 4 Nov 2020 10:41:31 +0100
>>
>> (defun on-after-init ()
>>   "Make transparent background only for terminal."
>>   (if (display-graphic-p)
>>       (progn (message "XWINDOW")
>>          (set-face-background 'default "#292b2e"))
>>     (progn (message "TERMINAL")
>>        (set-face-background 'default "unspecified-bg"))))
>>
>> (add-hook 'window-setup-hook 'on-after-init)
>>
>> The above happens to work perfectly for emacs, but not for emacsclient,
>> which yield the following error:
>>
>> $ emacsclient -c
>> Waiting for Emacs...
>> *ERROR*: Undefined color: "unspecified-bg"
>>
>> On the other hand emacsclient -nw -c, works as expected. Could anyone
>> please give me some hints on how to solve this issue?
>
>unspecified-bg is meaningless for GUI frames, that's why you get the
>error.  Try this instead:
>
>   (face-spec-reset-face 'default)
>



  reply	other threads:[~2020-11-04 16:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-04  9:41 Cannot run emacsclient in GUI Ramón Lorenzo Panadés-Barrueta
2020-11-04 15:45 ` Eli Zaretskii
2020-11-04 16:19   ` Ergus [this message]
2020-11-04 16:39     ` Eli Zaretskii
2020-11-05 10:31       ` Robert Pluim

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=20201104161935.bawcnqbiu46wxhoe@Ergus \
    --to=spacibba@aol.com \
    --cc=eliz@gnu.org \
    --cc=help-gnu-emacs@gnu.org \
    /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.