From: Lute Kamstra <Lute.Kamstra.lists@xs4all.nl>
Cc: rms@gnu.org, emacs-devel@gnu.org
Subject: Re: Fwd: Re: junk in *grep* buffers
Date: Wed, 27 Apr 2005 13:29:34 +0200 [thread overview]
Message-ID: <87ll7431b5.fsf@xs4all.nl> (raw)
In-Reply-To: <m14qdtfdlm.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Tue, 26 Apr 2005 17:24:24 -0400")
Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> When I do M-x grep and use
>>
>> grep -nH -e "(define-minor-mode" lisp/*.el
>>
>> I get a *grep* buffer with occurrences of "(define-minor-mode" in lisp
>> files. Every time that I tried, most lines in this buffer give the
>> text "(define-minor-mode" the grep-match-face, but a few lines don't
>> fontify "(define-minor-mode". The strange thing is that the lines
>> that don't fontify "(define-minor-mode" are different every time I
>> invoke grep.
>
> The problem, most likely is the following:
>
> 1 - grep sends a partial line like
>
> foo:123:toto \033[01;41mMATCH\033[00m
>
> 2 - font-lock fontifies this, which adds a face property and removes
> the markers, so the text is now:
>
> foo:123:toto MATCH
>
> 3 - grep sends the rest of the line
>
> bar baz\n
>
> so the complete line is now
>
> foo:123:toto MATCH bar baz\n
>
> 4 - font-lock is triggered again to fontify the added text, but it works
> a line-at-a-time so it re-fontifies the whole line, what begins by
> removing the `face' property and never re-adds it since the merkers are
> now lost.
>
> So the patch below should fix the problem because it uses the font-lock-face
> property which is not cleared by font-lock.
>
> If you find the patch works, please just install it for me,
Your patch fixes the problem I described. I'll add a comment
explaining the need to use font-lock-face and commit it.
Lute.
next prev parent reply other threads:[~2005-04-27 11:29 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-26 10:06 [Lute.Kamstra.lists@xs4all.nl: Re: junk in *grep* buffers] Richard Stallman
2005-04-26 21:24 ` Fwd: Re: junk in *grep* buffers Stefan Monnier
2005-04-27 11:29 ` Lute Kamstra [this message]
2005-04-28 11:00 ` Richard Stallman
2005-05-08 13:44 ` Andreas Schwab
2005-05-09 21:03 ` Richard Stallman
2005-05-09 21:16 ` Juri Linkov
2005-05-10 16:26 ` Richard Stallman
2005-05-10 17:36 ` Stefan Monnier
2005-05-11 8:23 ` Juri Linkov
2005-05-10 12:33 ` [Lute.Kamstra.lists@xs4all.nl: Re: junk in *grep* buffers] Kai Großjohann
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=87ll7431b5.fsf@xs4all.nl \
--to=lute.kamstra.lists@xs4all.nl \
--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.