From: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: rms@gnu.org, drew.adams@oracle.com, emacs-devel@gnu.org
Subject: Re: Highlighting in grep buffer
Date: 06 May 2004 10:39:02 -0400 [thread overview]
Message-ID: <jwvd65hocf2.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <87zn8m9boq.fsf@mail.jurta.org>
> 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).
> I also made changes in `compilation-goto-locus' to highlight the
> matching string in the source buffer. The variable `highlight-regexp'
> is set to a string found in `compilation-locus' face. But perhaps
> this is not the best way to achieve the goal.
Seems pretty ugly indeed.
> 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.
Stefan
next prev parent reply other threads:[~2004-05-06 14:39 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-05 22:03 Highlighting in grep buffer Richard Stallman
2004-04-05 23:05 ` Drew Adams
2004-04-07 17:45 ` Richard Stallman
2004-04-07 18:16 ` Drew Adams
2004-04-08 4:21 ` Juri Linkov
2004-04-08 16:38 ` Stefan Monnier
2004-04-10 22:29 ` Juri Linkov
2004-04-11 23:20 ` Stefan Monnier
2004-05-06 8:55 ` Juri Linkov
2004-05-06 14:39 ` Stefan Monnier [this message]
2004-05-06 21:03 ` Miles Bader
2004-05-08 21:46 ` Juri Linkov
2004-04-09 22:46 ` Richard Stallman
2004-04-10 22:28 ` Juri Linkov
2004-04-12 3:52 ` Richard Stallman
2004-04-12 4:32 ` Miles Bader
[not found] <DNEMKBNJBGPAOPIJOOICMEGCCAAA.drew.adams@oracle.com>
2004-04-13 11:45 ` Juri Linkov
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvd65hocf2.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=drew.adams@oracle.com \
--cc=emacs-devel@gnu.org \
--cc=rms@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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.