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, 27 Sep 2022 13:12:12 +0200 Message-ID: <87r0zxm5pv.fsf@sperrhaken.name> References: <87k05rr79k.fsf@ucl.ac.uk> <87czbjpq1c.fsf@dataswamp.org> <87v8pawlpy.fsf@ucl.ac.uk> <87sfkea2yw.fsf@gmail.com> 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="37958"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) Cc: Eric S Fraga , help-gnu-emacs@gnu.org To: Robert Pluim Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue Sep 27 15:39:37 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 1odAoC-0009a4-Sk for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 27 Sep 2022 15:39:36 +0200 Original-Received: from localhost ([::1]:57720 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1odAoB-0008O9-9x for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 27 Sep 2022 09:39:35 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56190) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1od8Vo-0008Gj-2A for help-gnu-emacs@gnu.org; Tue, 27 Sep 2022 07:12:28 -0400 Original-Received: from mout.kundenserver.de ([217.72.192.74]:39899) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1od8Vm-0006IJ-A5 for help-gnu-emacs@gnu.org; Tue, 27 Sep 2022 07:12:27 -0400 Original-Received: from localhost ([89.12.206.208]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.183]) with ESMTPSA (Nemesis) id 1M4JiJ-1odPcq2JaD-000KIB; Tue, 27 Sep 2022 13:12:21 +0200 In-Reply-To: <87sfkea2yw.fsf@gmail.com> (Robert Pluim's message of "Mon, 26 Sep 2022 11:40:07 +0200") X-Provags-ID: V03:K1:aEVUMgtE4leBK5HtK3DvaazxSK21kaDEeslOnU5oILIcvWHmttG alyob2dAcOLzyVUAhpA/9uxvB+hbLmz014iCTjACxJFgJy2xVmjkOtlfMo/bu7+QRS/NY19 Gcd/NyE5BGGwZlUvh6mkhjtkUyKUFbukNVv15O1cdtk7LQGxYfZ4zjlAXhmg2C4RpD0qszU L9E0fR2vQkUXNMkziW4FA== X-UI-Out-Filterresults: notjunk:1;V03:K0:nGAQaBqYgqE=:GNgYnUIXRfyWslIJZ1rfGR Uo1yfefdKwSkiuuyHwsPUo/eahxIk8fKL7Fqk0yd32jPTa2Bcm/Y55lnDJ+VE92uPEG/cdKN9 rWEYNucyNEzBHpzjthKfnEqQGQtmwQJ+KGB/mrRS1ncIcfx7uA36dE1gzlELx0rP8/LcCYV5H WTXSFFkOi8gF22r2GBwBJa+kLrqGolBPAAA+rZnrGQ/X6EpNbhvtzERCx97ZwgFXCktGyEAO9 0AqfzD6XX5V/51d5tztuqdHzdzF1B1RvuL+J14d6qR9mhOuMEa/4/PzAa4lUlGmdV8gJ8etlU LpKE6Pp8g/fBSc8+qE7kHKMeZ/kll3eIOmHzUtKWFQCxmkkb7k0AVD5el42twMk2CjfB+bpE4 gkKLETGe5jCYP+RTYT14KvUAoaxKzXzbTN8aj7PfrGLzq4d88aA/VFKS7jFCVgs48ceGeZZ+f +CTi05yUwrgTylSsoUWMn2NCpkH8OshBn/ZGcn3D4XdEOzIg1pNYFcqt485KQ5Qwxro/njG0L pNRNqB6vWcxjOy82VA6CkELR55RsGTQXXmGKKDUH1MrI9ZVcuCex8UBB36Nak3+4PgI0yVqj5 3a73tDp2wXYuxKD7XB03rJv8TTd7uBNStHQrRmMfKU0zXrPj6QtBBPS7COuUqqQX+eF9ktGZJ 8zOuKUrwNOVj0npGPvoHoTcUxiCO1DbFkJ+hcHVp8FjKCvEr6z6S+iDeDG0EfPS3lz4naArxX 1vVJuTqJC3cFk19P5m/YIfcQTvbrF/mYFQlkyhBi583R7LFrODizfyhXdhMq26/u4Gr2f9Z1 Received-SPF: none client-ip=217.72.192.74; 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:139646 Archived-At: Robert Pluim writes: > On Mon, 26 Sep 2022 10:04:09 +0100, Eric S Fraga said: > >> On Sunday, 25 Sep 2022 at 15:00, Emanuel Berg wrote: >> >>> Sounds like that error message should be changed to include >>> what face causes trouble, if possible? > > I think you=CA=BCre looking for the `debug-on-message' variable, since th= is > is a log in *Messages*, not an error. Would this work in this case? The variable =E2=80=98debug-on-message=E2=80= =99 seems to be handled in the C-function =E2=80=98set_message=E2=80=99 which, on a curs= ory glance, I cannot see being called from =E2=80=98add_to_log=E2=80=99 or below. Theref= ore, =E2=80=98debug-on-message=E2=80=99 may be bypassed in this case here. > (If you have a reproducer, we can look at changing the message) Here is one: #+begin_src emacs-lisp (let ((buf (generate-new-buffer "*test*")) (s (propertize "Hello World" 'face '(:foreground nil)))) (with-current-buffer buf (insert s)) (display-buffer buf)) #+end_src Upon evaluation, the resulting output in the =E2=80=9C*Messages*=E2=80=9D b= uffer also shows another issues with a missing newline between messages (in Emacs 28.1 at least). #+begin_example #>Invalid face attribute :foreground nil Invalid face attribute :foreground nil #+end_example Maybe a value of nil for the :foreground attribute in an anonymous face should be handled the same way as it is in a face defined with =E2=80=98defface=E2=80=99, that is being treated as the symbol =E2=80=98uns= pecified=E2=80=99? #+begin_src emacs-lisp (progn (defface my/test '((t . (:foreground nil))) "test face") (face-attribute 'my/test :foreground)) #+end_src #+RESULTS: : unspecified --=20 Felix Dietrich