From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ergus Newsgroups: gmane.emacs.help Subject: Re: Cannot run emacsclient in GUI Date: Wed, 4 Nov 2020 17:19:35 +0100 Message-ID: <20201104161935.bawcnqbiu46wxhoe@Ergus> References: <83k0v1azxe.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39306"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs@gnu.org To: Eli Zaretskii Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Wed Nov 04 17:34:52 2020 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kaLkI-000A3S-Jg for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 04 Nov 2020 17:34:50 +0100 Original-Received: from localhost ([::1]:43794 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kaLkH-0004lD-M9 for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 04 Nov 2020 11:34:49 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46076) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kaLVt-0004gG-1P for help-gnu-emacs@gnu.org; Wed, 04 Nov 2020 11:19:57 -0500 Original-Received: from sonic316-11.consmr.mail.bf2.yahoo.com ([74.6.130.121]:39947) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kaLVp-0007dO-Dp for help-gnu-emacs@gnu.org; Wed, 04 Nov 2020 11:19:56 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048; t=1604506789; bh=beEHy2Z/tXLN7XcBb5TuQisafesVWUQpjJmq3uBnjHo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From:Subject; b=DY97B971NTyhEibNyO9rkqDBUNm/DLpjNG4QoEWoMk/XWsCUE7WB0DG4kQ8oK1e/mq4J3F/lOtt1JlulCIha0mT9F7uap4VPmp8mgC8mN8MZH5b9Ql14AOOhDGd2tkJMuyrwzrgIz38QTVl0UCJxoUDYXO28HSjVZwBV9yMiUmkvO0t9TFNGNnOEqiYbCEaOIasui2XS0miWAJbiQx7sRZ6+wM9QCzhkNxtrUti70V8pHC65CWGF8lZVFlkCWNGllXCWlM+B5892IgGDCvxkHkLuKZK+nYY1b8Qj4djLnmxERmG3XUdl0nPpdb1qdY0k5RpZ3am5r1WAiHRIy2b6Fg== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1604506789; bh=Yv3jN6vMhEZ+c9IiXIdGApJkUkNArqfo6P4uWz390PJ=; h=Date:From:To:Subject; b=W896wkw5pr2JyPSYBmlOHCs7fmvqBT8bdHkU6K5mkNND7G5G5qH+dLfn+v4ovYrXZ1pxD8XwG2yxJOQGSxzs8dIUX1eo3vzQpncKTV5Ep05DQpHRzlNv0kkb6dJXxqoYpW5OinpaXRlYE5Yiip4u2Xftw/aCwLBPqkFg441pLPAxeU9zSzAeJZuU1bV3Zul22O8bAsawsDPETq4Voo4afqgQTgtGH2UUCMRf6gEBkWQgzSM4Kqe/zN+IqB8FcqHezKCqqA+yf8CFTAMfLhfsva2bNdxSwhy3oulVlvNtNa0FTnE9FPWpyyX4xEh34vKYiEf25rVaW89mW0pbTQg0Ag== X-YMail-OSG: dqMJQYAVM1k96BRsGopWb7slKFs43FGdIZDOW8cRCuyxbmAhG.6hm16nX6HuCnY fJjQCgkamKzYyfljKF7f1nPOQ8pc80yljBF7GR6Z3NloR5gQCpHInKeOz6zDQgssM8K4bbeQRWEF qgxV2Q4fb3ls1H.S8JeSWexf1KH5D4OD6rF3HXSmfNQzQleitWShQtvEOykaVbVhdmDZChwM3lbk zp043N.QSiBLTAEmm2tkpX8Jt5rLluJ6fhAPAGKKa5A9rwC0rl.35YduTXn6_ewfsfzXuykh0IeQ ycxjqFAGrHfbDvtbnSWB_YVAmEtfTM9wZaURCaxRNfeaub1rma48SDVj_UCU_oqnWvpoCcC4rbr8 AGwZLTtPuhD1Avied9KNo_m5mz9qIXblrk7MlftJw8yy_C7flRUaWWTYFTD9KW9ZO69bRRBrh6Pa lMqxgdY3N8AyIqcIW5rTHvIh71R1xbm9KkxWWQUzqsdCjn3uz53K0XUUemTHmtciF4TuyCb56_lT FHPug_3F0kZTAXBd8JKJJwwb4iJkGkqIwcLm0aV1RwwmZ1gXNmeLMB6efBM2tFTIA44hqf.3D.NY YqZPil9_AeQzL2PMwbQWP.9HQ_N2h42o2fd.CMFtuixlducL5jk79JH0W2ekbY0enMcsUMIX9Whq ZJ_esU.5LF8TMEeSkFwHBefXRwrku1mqahdNu5OnCAD1eqPvJA8FS7oRQ9Jwzz.vxfcDsWwlvU8u 2qHNQ4s7lhMDzbWapGE0bStrVinCAtOMBrNSk5DSRx5LF6.wuLVtC3QoerxS7vxhLG30qvIYh8r6 l4mzmk0c5mF.QbEUufUGxUqdxvZI0jtknjLd6m9joY Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic316.consmr.mail.bf2.yahoo.com with HTTP; Wed, 4 Nov 2020 16:19:49 +0000 Original-Received: by smtp402.mail.ir2.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID 32ac39d27e806162186a751c1aaec23a; Wed, 04 Nov 2020 16:19:47 +0000 (UTC) Content-Disposition: inline In-Reply-To: <83k0v1azxe.fsf@gnu.org> X-Mailer: WebService/1.1.16944 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.aol Apache-HttpAsyncClient/4.1.4 (Java/11.0.7) Received-SPF: pass client-ip=74.6.130.121; envelope-from=spacibba@aol.com; helo=sonic316-11.consmr.mail.bf2.yahoo.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/11/04 11:19:49 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:124992 Archived-At: 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 >> >> 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) >