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: Wed, 05 Oct 2022 13:29:33 +0200 Message-ID: <87h70icxuq.fsf@sperrhaken.name> References: <87k05rr79k.fsf@ucl.ac.uk> <87czbjpq1c.fsf@dataswamp.org> <87r0zudtve.fsf@dataswamp.org> <87wn9g4svm.fsf@sperrhaken.name> <87lepvalvl.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="32619"; 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 Wed Oct 05 13:31:48 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 1og2cu-0008Kh-7N for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 05 Oct 2022 13:31:48 +0200 Original-Received: from localhost ([::1]:54924 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1og2cs-0000eA-Nn for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 05 Oct 2022 07:31:46 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38434) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1og2av-0000e2-04 for help-gnu-emacs@gnu.org; Wed, 05 Oct 2022 07:29:45 -0400 Original-Received: from mout.kundenserver.de ([212.227.126.133]:44361) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1og2at-0006wg-Bx for help-gnu-emacs@gnu.org; Wed, 05 Oct 2022 07:29:44 -0400 Original-Received: from localhost ([77.11.160.112]) by mrelayeu.kundenserver.de (mreue009 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MDQqk-1oWevN4C8c-00AT2d for ; Wed, 05 Oct 2022 13:29:40 +0200 In-Reply-To: <87lepvalvl.fsf@sperrhaken.name> (Felix Dietrich's message of "Tue, 04 Oct 2022 13:06:38 +0200") X-Provags-ID: V03:K1:sI4K6hHSMltkEovxfBtycWLsB6JCjwYd1IPxT7PD7b5A5kyMZ7V K3qYMw8F/lOMxXSpPNaaDrqy393rZ8U3ZPWpKmaPALvVaHaG4jKkEyuu6FLhr8vQSt99oNk tZq6nf8a4lBP24e3tXn48tW26Rc8C+uXbJrYfSC3autX0oUvKOquG7NUM2qCA8Vjxvj6iop nSVZnYmRQzj3zfQvtY22A== X-UI-Out-Filterresults: notjunk:1;V03:K0:nfB4Vya9pcc=:8hyTFg66tpR4TMFqrpe7Ag Ft2UW0Yu7RcgaZQB+IhSEzDFEoinp5FN1mOh/ozW7bwYQVffdKhVV6AhHuIqAYmkRo14en+Pe vMuz9WgbohSVjjEVS/G7P0VMfcgSqP5MBQPOUXW/TcR0a9/BZk/cpTohsrPMoiUfadv9JpRUM 7Nj5K2/AD5juAxXXGqMYuqWBZ6DEdCDoL5+Rx6KdhvBH/vqPbc9n0BDTdTvbMprtOTDDzuV39 h0nFUUNJe0lwj9aF8+6+fwSVhjW7fEJkSDGxiKZeFmUw7HIgEIl6GesNdDhO+54+jT4Y8T16t VLsDYZffKWDi0MeOpV/e3IQbfyXjFCXZ21TlhQ2mdWVDlrtAou+IOgUA+l7toZjJOpohPZDCs Qv6Ruc9Fml/zn1FsugGtKdyOhPiPcvPA44DdQ0Z6Jrfah5UqGwhgJfYp9Zux5XrrCNMebj/uo 2ZuR/SqFpig9lflbcAIR2WD0NK/4tcz9TjvphB/5z36K5qvnNDAd+PubtO2L6gJTfDxfadsjc gqeMhUcKOM7H3r8VRqph4md6LHhm1fM+2ezcu6KE7Sp5Rqx9QerKgnB/uNvDBU/NnQc2M2DRf Bme8QEVsFIluPiz8K5UsZMdJJK8rXW/YonYkWKZyzhxZ4y/+dwxM0xAb5xF3yttdfkfJLsnlh RZSVB7jkNm6WMpZ34IDl+HJhIc0X9d1YUE/MGXK79zzpa/+/J2zswip7ayjozGIGnbm/wz+e9 G+/I11KBmnrEGR3bGZRq653jjs0ZAqBh6yW8CTH3R+d9BZWd4q5ZUcBT6BiRNfH7nhKe3q8C Received-SPF: none client-ip=212.227.126.133; 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, 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:139714 Archived-At: Felix Dietrich writes: > 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=98de= fface=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 retur= n =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. I copied the wrong snippet from my experiments. It should have been this: #+begin_src emacs-lisp (progn (ignore-errors (defface my/test '((t . (:foreground :bla))) "test face")) (make-frame-command)) #+end_src --=20 Felix Dietrich