From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Simon Josefsson Newsgroups: gmane.emacs.bugs Subject: Re: font-lock latency Date: Mon, 09 Sep 2002 03:33:36 +0200 Sender: bug-gnu-emacs-admin@gnu.org Message-ID: References: NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1031535247 24938 127.0.0.1 (9 Sep 2002 01:34:07 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 9 Sep 2002 01:34:07 +0000 (UTC) Cc: bug-gnu-emacs@gnu.org Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17oDRF-0006U6-00 for ; Mon, 09 Sep 2002 03:34:05 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 17oDRI-0007ad-00; Sun, 08 Sep 2002 21:34:08 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17oDR0-0007XS-00 for bug-gnu-emacs@gnu.org; Sun, 08 Sep 2002 21:33:50 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17oDQy-0007Ww-00 for bug-gnu-emacs@gnu.org; Sun, 08 Sep 2002 21:33:49 -0400 Original-Received: from 178.230.13.217.in-addr.dgcsystems.net ([217.13.230.178] helo=yxa.extundo.com) by monty-python.gnu.org with esmtp (Exim 4.10) id 17oDQx-0007Ws-00 for bug-gnu-emacs@gnu.org; Sun, 08 Sep 2002 21:33:47 -0400 Original-Received: from latte.josefsson.org (yxa.extundo.com [217.13.230.178]) (authenticated bits=0) by yxa.extundo.com (8.12.6/8.12.6) with ESMTP id g891Xfn3010722 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Mon, 9 Sep 2002 03:33:41 +0200 Original-To: eliz@is.elta.co.il X-Hashcash: 0:020909:eliz@is.elta.co.il:0f7cd1adb3fd87e9 X-Hashcash: 0:020909:bug-gnu-emacs@gnu.org:e2a2c48ddd052033 In-Reply-To: (Simon Josefsson's message of "Thu, 05 Sep 2002 05:58:47 +0200") Original-Lines: 38 User-Agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.3.50 (i686-pc-linux-gnu) Errors-To: bug-gnu-emacs-admin@gnu.org X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Bug reports for GNU Emacs, the Swiss army knife of text editors List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.bugs:3459 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:3459 Simon Josefsson writes: > Richard Stallman writes: > >> Doesn't help, the line is still incorrectly highlighted. I even tried >> pressing M-g M-g on every line of the buffer, but it was still wrong. >> C-l doesn't help either. Only way to get it right is to wait a few >> (3?) seconds. >> >> If some code that runs after 3 seconds gets it right, >> the first thing to do is find that code, >> and see how it gets the right results. > > The code is `jit-lock-stealth-fontify'. I now realized that if I set > `jit-lock-stealth-time' to 0 _before_ I enable font-lock-mode, it does > what I want -- that is, update the buffer immediately. > > jit-lock.el looks like voodoo to me, so I'm not going to try to find > out what caused the original problem. Unless it has negative > consequences, I think the default of `jit-lock-stealth-time' should be > changed to 0 so that this bug isn't visible. Assuming noone finds the > original cause of the problem, that is. I revoke that suggestion, setting `jit-lock-stealth-fontify' to 0 seems to trigger other problems. After editing a file for a while (difficult to reproduce) I get a backtrace like the below when pressing any key. I am now running with j-l-s-f set to 1 even though it annoys me, and I haven't seen the backtrace yet. Debugger entered--Lisp error: (args-out-of-range 6 4) font-lock-fontify-keywords-region(35308 35328 nil) font-lock-default-fontify-region(35308 35317 nil) font-lock-fontify-region(35308 35317) run-hook-with-args(font-lock-fontify-region 35308 35317) jit-lock-fontify-now(35308 35808) jit-lock-function(35308)