emacs-devel
[Top][All Lists]
Advanced

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

Re: why does occur depropertize matching lines?


From: Juri Linkov
Subject: Re: why does occur depropertize matching lines?
Date: Mon, 06 Dec 2004 22:10:08 +0200
User-agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (gnu/linux)

Richard Stallman <address@hidden> writes:
> I noticed an apparent confusion in the code that was inverting the meaning
> of the KEEP-PROPS parameter; so I fixed that.  The current code
> should keep the fontification of ALL the lines from the buffer.

It keeps the fontification of all copied lines, but not all lines in
the source buffer might be fontified at the moment of calling `occur',
since background font-lock fontification might not yet fontify some
portions of the source buffer which are not visible in the window.

When such unfontified lines are copied from the partly fontified
source buffer to the Occur buffer, the result looks very bad.

What I propose is to force font-lock fontification of the whole source
buffer before starting to copy its lines to the Occur buffer.
Alternatively, it could fontify only unfontified matched lines in the
source buffer before copying them.

>     It seems there is a need in a new face to display matching strings.
>     Such a face could be used also in other packages: to highlight matches
>     in *grep* buffer and apropos documentation.
>
> I don't entirely understand this point.  Are you saying that bold
> isn't sufficient to stand out?

Yes, in heavily highlighted text bold doesn't stand out sufficiently.

> If so, we could change the value of list-matching-lines-face.

Of course, but I can't find a good face to put into this face variable.
It is desirable for such face to have a background color different
from default.  The most suitable faces are `isearch-lazy-highlight-face',
`region' and `secondary-selection', but when users will use isearch on
the Occur buffer, or select a region on it, then text highlighted by them
will become indistinguishable from matching lines with the same color.

So it makes sense to add a new `match' face for matches in the Occur
buffer as well as for matches in grep output which is very similar by
functionality to occur.

-- 
Juri Linkov
http://www.jurta.org/emacs/





reply via email to

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