From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: jack-mac Newsgroups: gmane.emacs.help Subject: Re: When are the face text properties actually set? Date: Thu, 14 Jun 2012 00:43:06 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1339659916 10790 80.91.229.3 (14 Jun 2012 07:45:16 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 14 Jun 2012 07:45:16 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jun 14 09:45:15 2012 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Sf4jz-0001hk-FK for geh-help-gnu-emacs@m.gmane.org; Thu, 14 Jun 2012 09:45:15 +0200 Original-Received: from localhost ([::1]:37297 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sf4jz-0005x6-41 for geh-help-gnu-emacs@m.gmane.org; Thu, 14 Jun 2012 03:45:15 -0400 Original-Path: usenet.stanford.edu!postnews.google.com!l32g2000yqc.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 34 Original-NNTP-Posting-Host: 193.49.124.107 Original-X-Trace: posting.google.com 1339659871 15517 127.0.0.1 (14 Jun 2012 07:44:31 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Thu, 14 Jun 2012 07:44:31 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: l32g2000yqc.googlegroups.com; posting-host=193.49.124.107; posting-account=OWLhBgoAAAD1H7ELDXVfr3-5BJaMOe1v User-Agent: G2/1.0 X-HTTP-Via: 1.1 miaouuuuuuu:3131 (squid/2.7.STABLE4) X-HTTP-UserAgent: Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:10.0) Gecko/20100101 Firefox/10.0,gzip(gfe) Original-Xref: usenet.stanford.edu gnu.emacs.help:192831 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 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.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:85233 Archived-At: Thanks a lot, Stefan, for your precious answers! On 13 juin, 17:18, Stefan Monnier wrote: > It's normal: this is handled by jit-lock which adds the property on the > fly before a chunk of text is displayed. I did not know the jit-lock system! When I do "ema Can you tell me why, when > > > If it's normal, is there any way to force the text properties to be > > set the way they will be set when the point is displayed? > > Yes, you can use something like jit-lock-fontify-now. > > > I mean: I just want (get-text-property 2400 'face) to return the text > > property whether it has already been displayed or not! > > I tried the following which works more or less: > > =A0 =A0 =A0 =A0 M-: (progn (goto-char 2400) (sit-for 0) (get-text-prope= rty > > 2400 'face)) > > =A0 =A0 =A0 =A0 =3D> font-lock-comment-face > > Rather than check the `face' property for `font-lock-comment-face' you > should check the output of (syntax-ppss), which also has the advantage > of not depending on highlighting (so you don't need to fiddle with > jit-lock or worry about those users who disable font-lock). > > =A0 =A0 =A0 =A0 Stefan