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: Sun, 05 Dec 2004 18:43:02 +0200
User-agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (gnu/linux)

Richard Stallman <address@hidden> writes:
>     Inverting the meaning of the `keep-props' argument for context lines is
>     too unnatural thing to do.  It's more natural to expect that users
>     might want to highlight either everything (matching and context lines)
>     or nothing.
>
> I think users will like the behavior that results from the changes I
> wrote.  I like it, and it seems natural to me.  Why wouldn't other
> people like it?

One of the reasons why people wouldn't like it, is the fact that
when the source buffer is not yet completely fontified by background
fontification, some lines copied to the Occur buffer are not fontified.
Such party fontified Occur buffer looks too ugly.  Perhaps, the right
thing to do is to call (font-lock-fontify-region (point-min) (point-max))
on the source buffer from `occur-engine' before it starts to copy
source lines to the Occur buffer?

There is another problem which arises when all font properties are
copied to the Occur buffer: matches fontified in `list-matching-lines-face'
(which is `bold' by default) don't stand out as clearly as they were
when the Occur buffer had no fontified lines at all.

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.

A good choice for properties of such face is still unclear.
One variant is to use bold red (like grep --color uses with ANSI
sequences).  However, bold red is too loud color, it is used mostly
for error messages.  Another variant is to set some background color
like in `highlight', `isearch-lazy-highlight-face', `region' or
`secondary-selection'.

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





reply via email to

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