From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.devel Subject: RE: "Invalid face reference" msg logged to *Messages* (but no error) Date: Tue, 5 May 2009 19:29:58 -0700 Message-ID: <000d01c9cdf2$8d7e1580$0200a8c0@us.oracle.com> References: <002c01c9cdb2$ec215510$0200a8c0@us.oracle.com><006d01c9cddf$622ae830$0200a8c0@us.oracle.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1241577065 9830 80.91.229.12 (6 May 2009 02:31:05 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 6 May 2009 02:31:05 +0000 (UTC) Cc: emacs-devel@gnu.org To: "'Stefan Monnier'" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed May 06 04:30:56 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1M1WuI-0003nI-Kk for ged-emacs-devel@m.gmane.org; Wed, 06 May 2009 04:30:50 +0200 Original-Received: from localhost ([127.0.0.1]:46904 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M1WuI-0006RU-11 for ged-emacs-devel@m.gmane.org; Tue, 05 May 2009 22:30:50 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M1WtV-0005w1-9d for emacs-devel@gnu.org; Tue, 05 May 2009 22:30:01 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M1WtQ-0005uB-Bs for emacs-devel@gnu.org; Tue, 05 May 2009 22:30:00 -0400 Original-Received: from [199.232.76.173] (port=59121 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M1WtQ-0005u8-43 for emacs-devel@gnu.org; Tue, 05 May 2009 22:29:56 -0400 Original-Received: from acsinet12.oracle.com ([141.146.126.234]:24523) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1M1WtP-0005w8-LA for emacs-devel@gnu.org; Tue, 05 May 2009 22:29:55 -0400 Original-Received: from rgminet15.oracle.com (rcsinet15.oracle.com [148.87.113.117]) by acsinet12.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n462Tkka027733 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 6 May 2009 02:29:47 GMT Original-Received: from abhmt001.oracle.com (abhmt001.oracle.com [141.146.116.10]) by rgminet15.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id n462TqTN021539; Wed, 6 May 2009 02:29:53 GMT Original-Received: from dradamslap1 (/98.210.250.59) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 05 May 2009 19:29:50 -0700 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: Thread-Index: AcnN6ZGQbzM8BaEoRoq3IuAZw1GvXgABYnxw X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3350 X-Source-IP: abhmt001.oracle.com [141.146.116.10] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A010205.4A00F61F.0216:SCFSTAT5015188,ss=1,fgs=0 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 1) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:110704 Archived-At: > > (add-text-properties 99 111 (face (quote some-face))) > > This code isn't correct, because it calls `face' as a function. > So I guess you mean > (add-text-properties 99 111 '(face (quote some-face))) Yes, that was actually from the debugger, so it was after arg evaluation. > in which case the fix is to use > (add-text-properties 99 111 '(face some-face)) Duh. Hard to believe I didn't notice that. Thanks for the extra eyeballs. > > N is incremented thereafter, with seemingly each event. My guess is > > that it is redisplay that is logging/updating the message - > > it doesn't seem to be related to the code being evaluated. The > > add-text-property call seems only to be what initiates it. > > Yes, the message comes from redisplay. I had the same code in several places (different commands) actually, from copy+pasting no doubt. What's odd it that it still worked. The only difference I can see is the message logged to *Messages*. The face was added properly, combined with other text properties properly when that was the case, etc. I don't understand it, but that's the case. I wonder too why such a thing is not handled as an error, or even as a message to the echo area, but just logged in *Messages*. Is it the case perhaps that we never raise an error from the redisplay code? Anyway, thanks for clearing this up.