From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Felix Dietrich Newsgroups: gmane.emacs.help Subject: Re: how to track down "invalid face attribute" errors? Date: Tue, 04 Oct 2022 13:06:38 +0200 Message-ID: <87lepvalvl.fsf@sperrhaken.name> References: <87k05rr79k.fsf@ucl.ac.uk> <87czbjpq1c.fsf@dataswamp.org> <87r0zudtve.fsf@dataswamp.org> <87wn9g4svm.fsf@sperrhaken.name> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36022"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue Oct 04 13:10:13 2022 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 1offoR-00099n-Sg for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 04 Oct 2022 13:10:11 +0200 Original-Received: from localhost ([::1]:48168 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1offoQ-0002tu-Pv for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 04 Oct 2022 07:10:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52032) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1offlD-0001z3-TX for help-gnu-emacs@gnu.org; Tue, 04 Oct 2022 07:06:51 -0400 Original-Received: from mout.kundenserver.de ([217.72.192.73]:60045) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1offlB-0004VF-VT for help-gnu-emacs@gnu.org; Tue, 04 Oct 2022 07:06:51 -0400 Original-Received: from localhost ([89.12.94.204]) by mrelayeu.kundenserver.de (mreue106 [212.227.15.183]) with ESMTPSA (Nemesis) id 1M1INQ-1oe1rq06jC-002mWq for ; Tue, 04 Oct 2022 13:06:44 +0200 In-Reply-To: <87wn9g4svm.fsf@sperrhaken.name> (Felix Dietrich's message of "Mon, 03 Oct 2022 21:19:41 +0200") X-Provags-ID: V03:K1:V9pPbJctH3QMob6w9/XovthnUdF4hx/arz5sT6MBj2kmEXuhIpU YnaGu1uvUuTCM5rLkC+gVrVnZmFA0oRQKnSLFB1pK9iM3wKujVfZKoLNLtPnspVJPV3e4eK bgpKbP10sWmquB6XvWZOw3pOi+GlGKQeEJ4uAH5edt/Hvn1GhPl8AYByUZdqiCLbjQqwNLx gtjkBsLN8B+3kVRVo1mew== X-UI-Out-Filterresults: notjunk:1;V03:K0:LnVkUjuSw1M=:wtuXac1xSGaIRbxpl5mnSv Hx+TTUF2D6w3k7CYyeENJ2JzmKCHhyq8Msj56hPPfCwFif9CRpoj11rON5v6q4/xu3KU8D5tu xswtfQFh1NnVY+hE+pshQhCUFNNgeRcnsKnZeThiGeG/Y9WZyiMOTt6uSH1GwoXUFZxV+thJA RRbOPPYNZQnC+lbf0+q/FwAT6nPzye7AaEJDl6y2lQW025n5waQV8Oc6qCdosLSC2Si9Hj2qb GtsMqmog9rBvK3yMmjcpgKX9d2fP4wnIFPmRCoS7GnJKuM3ik4rTzT2NE+PMyPC2XXbW6G2ly d3O/jI4E6eX0Cd1WNLvJxkvfSuyJ1+wFahD8WBuQEGpYBHUmJhfxgfyz4Z5rfFBfuzwBz/Ml9 FVGfW2L0jjqTEq1k0BG65LY5AznNllonY6lNjldBYMa+zCvYDZSetMeaTH7Sh3+tvp2sZosol Hn5UB7G+IfJHcDj6wgrFpVIPzaUn6CHDpu2BRSzZnpO5HaRTf2sh1g+8X52++3xAxI46V+WEp EcWgPRONap4NF8PMv3otTeVwAF3A6fdHV31UyuGWxSXMkCUqxGX/eaN/t9Y/PE38cOx8lb9o2 QFgP25plpSJb2AmW5swcPN+AEXt+iA6nv7hCjHPsdPpLrtAom8ot3AX3EqByW6iJAtF/Wo90P ek9W6JeEDx6p+d7L1nCdWrcaTeJ82yxJsFo5HZ5TjsxZQDGAXdDpwOVfWq+ChVBH0xpU/9EvK QNC4UTe36FA2SB+UWceMTiSnGDhZmAythP0SbxdvuJCUfsvbb3qO/nI9D9NAgh079jOzV45k Received-SPF: none client-ip=217.72.192.73; envelope-from=felix.dietrich@sperrhaken.name; helo=mout.kundenserver.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 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:139706 Archived-At: Felix Dietrich writes: > Emanuel Berg writes: > >> Isn't it better to initialize the faces first, and if it is >> attempted to define [a face] using invalid attributes, then that >> would be an error? > > This already happens to a degree for named faces: if you use =E2=80=98def= face=E2=80=99 > to create a face with :foreground set to nil, subsequent calls to > =E2=80=98face-attribute=E2=80=99 for :foreground on that face will return= =E2=80=98unspecified=E2=80=99: > > #+begin_src emacs-lisp > (progn > (defface my/test '((t . (:foreground nil))) "test face") > (face-attribute 'my/test :foreground)) > #+end_src I was not correct with my assumption: when you =E2=80=98defface=E2=80=99 a = face with an invalid :foreground value this will produce an error, but enough of the face with the invalid value remains that later creations of new frames using =E2=80=98make-frame-command=E2=80=99 will fail with that same error: #+begin_src emacs-lisp (progn (ignore-errors (defface my/test03 '((t . (:foreground nil))) "test face")) (make-frame-command)) #+end_src This produces the error =E2=80=9C(wrong-type-argument stringp :bla)=E2=80= =9D. --=20 Felix Dietrich