From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Pierre-Charles David Newsgroups: gmane.emacs.help Subject: Re: Syntax Highlighting Latency in Emacs Date: Mon, 13 Dec 2004 10:35:24 +0100 Organization: Guest of ProXad - France Message-ID: <87brcyilr7.fsf@shayol.info.emn.fr> References: NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1102930818 2657 80.91.229.6 (13 Dec 2004 09:40:18 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 13 Dec 2004 09:40:18 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Dec 13 10:40:12 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1Cdmgd-0001nr-00 for ; Mon, 13 Dec 2004 10:40:11 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1Cdmqj-0001DU-5b for geh-help-gnu-emacs@m.gmane.org; Mon, 13 Dec 2004 04:50:37 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!proxad.net!infeed-2.proxad.net!news11-e.free.fr!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.3 (gnu/linux) Cancel-Lock: sha1:AJBoHLP6flVXHQKgyCvYtOMaWF4= Original-Lines: 32 Original-NNTP-Posting-Date: 13 Dec 2004 10:37:18 MET Original-NNTP-Posting-Host: 193.54.76.162 Original-X-Trace: 1102930638 news11-e.free.fr 19446 193.54.76.162:43756 Original-X-Complaints-To: abuse@proxad.net Original-Xref: shelby.stanford.edu gnu.emacs.help:127270 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:22699 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:22699 jab3 writes: > I don't want to start a war or anything (because it probably has something > to do with my system), but I am curious about something I've noticed with > Emacs as compared with vim. If I'm looking at a source code file in vim, > (and it doesn't even have to be that large - maybe a few thousand K) the > syntax highlighting is automatic. And if I edit something, which changes > the highlighting of the rest of the file, it is instantaneous. But in > Emacs, there is a 2 or 3 second delay in the updating of the highlighting. > Is there a setting I'm missing somewhere? (I'm new to Emacs, and I am > trying to move to it instead of vim for serious editing) Has anyone else > noticed this? The font-locking system supports different modes of operation, which determine when fontification occurs. On my system (GNU Emacs 21.3) the default is `jit-lock-mode', with `jit-lock-stealth-time' set to 3. The doc says: "Stealthy buffer fontification if `jit-lock-stealth-time' is non-nil. This means remaining unfontified areas of buffers are fontified if Emacs has been idle for `jit-lock-stealth-time' seconds, while Emacs remains idle. This is useful if any buffer has any deferred fontification." This would be consistent with the behaviour you describe. Check the variables `font-lock-support-mode', `jit-lock-mode' and `jit-lock-stealth-time' variables, and try different values. -- Pierre-Charles David (pcdavid emn fr) Computer Science PhD Student, Ecole des Mines de Nantes, France Homepage: http://pcdavid.net/