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: When are the face text properties actually set? Date: Wed, 13 Jun 2012 07:32:31 -0700 (PDT) Organization: http://groups.google.com Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: dough.gmane.org 1339598116 20650 80.91.229.3 (13 Jun 2012 14:35:16 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 13 Jun 2012 14:35: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 Wed Jun 13 16:35:16 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 1SeofD-0002nS-1Z for geh-help-gnu-emacs@m.gmane.org; Wed, 13 Jun 2012 16:35:15 +0200 Original-Received: from localhost ([::1]:36869 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SeofA-0004Cv-MZ for geh-help-gnu-emacs@m.gmane.org; Wed, 13 Jun 2012 10:35:12 -0400 Original-Path: usenet.stanford.edu!postnews.google.com!k5g2000vbf.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 51 Original-NNTP-Posting-Host: 193.49.124.107 Original-X-Trace: posting.google.com 1339597951 22444 127.0.0.1 (13 Jun 2012 14:32:31 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Wed, 13 Jun 2012 14:32:31 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: k5g2000vbf.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:192824 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:85227 Archived-At: I'm using GNU Emacs 23.1.1 (i686-pc-linux-gnu, GTK+ Version 2.22.0) of 2011-03-04 on roseapple, modified by Debian I start "emacs -Q", open any emacs-lisp file which containing more than one page of text. I choose a point (e.g. 2400) which is beyond the first page and type the following: M-: (get-text-property 2400 'face) RET => nil M-: (progn (goto-char 2400) (get-text-property 2400 'face)) => nil Now, point 2400 is visible. M-: (get-text-property 2400 'face) RET => font-lock-comment-face The function get-text-property returns nil only when the point given as argument has not yet been displayed. So, I can reproduce it each time I close and reopen the file. (C-x C-v RET) Is this normal or is it a bug? 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? 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: M-: (progn (goto-char 2400) (sit-for 0) (get-text-property 2400 'face)) => font-lock-comment-face but, if I use it inside my personal search and replace function, the text is continuously scrolled all over the file, which is quite disturbing. I also tried M-x font-lock-fontify-buffer but it did not change anything. And there is no lazy-font anymore in the emacs I use. Thanks in advance )jack(