From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: dapfy@t-online.de (Daniel Pfeiffer) Newsgroups: gmane.emacs.devel Subject: Re: [rms@gnu.org: Re: mouse cannot be used in *grep* buffer if font-lock is turned off] Date: Wed, 20 Oct 2004 09:07:23 +0200 Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Message-ID: <20041020090723.204aa0a4@pfdabpc.inhouse.start.de> References: <20041019210656.2de3ff4b@pfdabpc.inhouse.start.de> <20041019235901.4c13c969@pfdabpc.inhouse.start.de> Reply-To: Daniel Pfeiffer NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1098256013 4106 80.91.229.6 (20 Oct 2004 07:06:53 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 20 Oct 2004 07:06:53 +0000 (UTC) Cc: Juri Linkov , rms@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Oct 20 09:06:39 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 1CKAYQ-0003kv-00 for ; Wed, 20 Oct 2004 09:06:38 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CKAfo-0000Ha-16 for ged-emacs-devel@m.gmane.org; Wed, 20 Oct 2004 03:14:16 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CKAfg-0000G8-0l for emacs-devel@gnu.org; Wed, 20 Oct 2004 03:14:08 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CKAfe-0000F6-QO for emacs-devel@gnu.org; Wed, 20 Oct 2004 03:14:07 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CKAfe-0000Ew-Mo for emacs-devel@gnu.org; Wed, 20 Oct 2004 03:14:06 -0400 Original-Received: from [194.25.134.19] (helo=mailout06.sul.t-online.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CKAY6-0001BZ-Ab; Wed, 20 Oct 2004 03:06:19 -0400 Original-Received: from fwd10.aul.t-online.de by mailout06.sul.t-online.com with smtp id 1CKAY5-00065U-00; Wed, 20 Oct 2004 09:06:17 +0200 Original-Received: from pfdabpc.inhouse.start.de (Tvbmj-ZDwe5+GUJN9DpqlxayHXjX76LZlBgffBK89MB+NEnVI4b2wM@[217.234.44.174]) by fwd10.sul.t-online.com with smtp id 1CKAXx-0Yo3pA0; Wed, 20 Oct 2004 09:06:09 +0200 Original-To: David Kastrup In-Reply-To: X-Mailer: Sylpheed version 0.9.10claws (GTK+ 1.2.10; i686-suse-linux) X-ID: Tvbmj-ZDwe5+GUJN9DpqlxayHXjX76LZlBgffBK89MB+NEnVI4b2wM X-TOI-MSGID: b15730be-4a1e-455d-b09c-7d921cdb4b3b 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: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:28647 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:28647 Saluton, David Kastrup skribis: > dapfy@t-online.de (Daniel Pfeiffer) writes: > > I too am not sure about the argument of always running this if you > > get no benefit. Come to think of it, imenu is highly redundant with what font-lock does. And many modes set it up, whether you use it or not. Same goes for outline-minor-mode, which can't fontify the "headlines", because it's not integrated with font-lock. > > As for compilation and grep the benefit is clear. > > Font-lock has rather good parsing capabilities, and these modes need > > that. The gaudiness is a side effect really. > > Sounds like the "if all you have is a hammer, every problem looks like > a nail" concept. If font lock is employed for something it is not > intended for because of efficiency, maybe we need to abtract the > parsing parts into useful packages of their own and make font lock use > them. True. But font-lock is already so widely supported, that it's gonna be hard to change radically. As for setting other properties, this is a fairly recent add-on. It was done in such a way, that it does not allow not setting `face'. Maybe that part could be prudentially loosened. Compile/grep uses the same regexps to understand the output, as it does to highlight them. Here there would be no benefit from dissociating the two. Stef's suggestion of making faces show optionally makes more sence for that. Parsing can't ever be good enough. Emacs for e-lisp and Eclipse for Java are about as close as you can get -- and even they are not perfect (think of a `(' in the fist column of a string). They have an "unfair" advantage, being able to look into the interpreter. For all others we must try real hard to understand the buffer contents. Font-lock, for all its restrictions, is by far the best parser we have, so we need to build up on that. coralament / best Grötens / liebe Grüße / best regards / elkorajn salutojn Daniel Pfeiffer -- lerne / learn / apprends / lär dig / ucz się Esperanto: http://lernu.net/