From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: Highlighting in grep buffer Date: Sun, 09 May 2004 00:46:04 +0300 Organization: JURTA Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <874qqq4moz.fsf@mail.jurta.org> References: <87hdvvhzgh.fsf@mail.jurta.org> <87isgafmte.fsf-monnier+emacs@alfajor.local> <87isg7cmcy.fsf@mail.jurta.org> <87zn8m9boq.fsf@mail.jurta.org> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1084052883 4354 80.91.224.253 (8 May 2004 21:48:03 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 8 May 2004 21:48:03 +0000 (UTC) Cc: rms@gnu.org, drew.adams@oracle.com, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Sat May 08 23:47:58 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BMZfq-0004Jv-00 for ; Sat, 08 May 2004 23:47:58 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1BMZfq-0005lm-00 for ; Sat, 08 May 2004 23:47:58 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.33) id 1BMZee-0007t5-9w for emacs-devel@quimby.gnus.org; Sat, 08 May 2004 17:46:44 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.33) id 1BMZeY-0007sQ-6P for emacs-devel@gnu.org; Sat, 08 May 2004 17:46:38 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.33) id 1BMZeV-0007rY-OB for emacs-devel@gnu.org; Sat, 08 May 2004 17:46:37 -0400 Original-Received: from [66.33.219.19] (helo=spoon.dreamhost.com) by monty-python.gnu.org with esmtp (Exim 4.33) id 1BMZeV-0007r6-Dz; Sat, 08 May 2004 17:46:35 -0400 Original-Received: from mail.jurta.org (80-235-37-27-dsl.mus.estpak.ee [80.235.37.27]) by spoon.dreamhost.com (Postfix) with ESMTP id 5F10D13D834; Sat, 8 May 2004 14:46:32 -0700 (PDT) Original-To: Stefan Monnier User-Agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (gnu/linux) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:22942 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:22942 Stefan Monnier writes: >> I was thinking about the best solution and it seems that using >> font-lock machinery for fontification of grep matches is the simplest >> and most consistent with principles which compile.el is based on: >> a new rule is added to `grep-mode-font-lock-keywords' which fontifies >> the text inside the grep markers and deletes them afterwards. > > Agreed, but your current code will fail to re-highlight the matches if the > buffer is refontified. > We should either keep the markers (and make them invisible) or at least > place the face on the `font-lock-face' property rather than on the > `face' property (I'm not sure if this second method works "by design" > or "by accident", tho). >>From these two variants using `font-lock-face' seems better than making markers invisible, because often hidden text is too confusing for users. >> Could someone familiar with compile.el suggest a better method, for >> example, something like setting the `message' property with calculated >> `col' and `end-col' on grep markers in `grep-mode-font-lock-keywords' and >> using them in `compilation-goto-locus'? > > I'd rather keep this for a future version of Emacs. Since the new compile.el is a complete rewrite, would it be better to consolidate all major changes in one release? -- Juri Linkov http://www.jurta.org/emacs/