emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Highlighting in grep buffer


From: Juri Linkov
Subject: Re: Highlighting in grep buffer
Date: Sun, 09 May 2004 00:46:04 +0300
User-agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (gnu/linux)

Stefan Monnier <address@hidden> 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/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]