unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@jurta.org>
Cc: drew.adams@oracle.com, emacs-devel@gnu.org
Subject: Re: why does occur depropertize matching lines?
Date: Mon, 06 Dec 2004 22:10:08 +0200	[thread overview]
Message-ID: <87hdmzb333.fsf@jurta.org> (raw)
In-Reply-To: E1Cb7rM-00014l-FU@fencepost.gnu.org

Richard Stallman <rms@gnu.org> 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	other threads:[~2004-12-06 20:10 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-05 23:45 why does occur depropertize matching lines? Drew Adams
2004-11-19 16:02 ` Drew Adams
2004-11-21  1:10   ` Richard Stallman
2004-11-21  1:51     ` Drew Adams
2004-11-21  3:22       ` Juri Linkov
2004-11-25  2:19         ` Richard Stallman
2004-11-25  7:27           ` Juri Linkov
2004-11-26 21:03             ` Richard Stallman
2004-12-05 16:43               ` Juri Linkov
2004-12-06  1:40                 ` Richard Stallman
2004-12-06 20:10                   ` Juri Linkov [this message]
2004-12-06 20:33                     ` Stefan Monnier
2004-12-06 21:40                       ` Juri Linkov
2004-12-08  4:39                         ` Richard Stallman
2004-12-08 19:06                           ` Drew Adams
2004-12-08 19:44                             ` Josh Varner
2004-12-08 20:08                               ` Drew Adams
2004-12-09  4:42                                 ` Richard Stallman
2004-12-08  4:59                         ` Stefan Monnier
2004-12-08  4:39                     ` Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87hdmzb333.fsf@jurta.org \
    --to=juri@jurta.org \
    --cc=drew.adams@oracle.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).