unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [dann@ics.uci.edu: grep fontification problem]
@ 2005-05-04 16:13 Richard Stallman
  2005-05-06 17:56 ` Marcelo Toledo
  0 siblings, 1 reply; 3+ messages in thread
From: Richard Stallman @ 2005-05-04 16:13 UTC (permalink / raw)


Is someone working on this problem?  Please tell me if you are.

------- Start of forwarded message -------
To: emacs-pretest-bug@gnu.org
From: Dan Nicolaescu <dann@ics.uci.edu>
Date: Mon, 02 May 2005 19:08:42 -0700
X-ICS-MailScanner: Found to be clean
X-ICS-MailScanner-SpamCheck: not spam (whitelisted),
	SpamAssassin (score=-100, required 5, USER_IN_WHITELIST)
Subject: grep fontification problem
Sender: emacs-pretest-bug-bounces+rms=gnu.org@gnu.org
X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on monty-python
X-Spam-Level: 
X-Spam-Status: No, hits=0.0 required=5.0 tests=none autolearn=no version=2.63


Save the following to /tmp/t

- ---cut here---
abc def abc def
def abc def
- ---cut here---

and then do M-x grep RET abc /tmp/t RET

the grep buffer will look like:

- -*- mode: grep; default-directory: "/tmp/" -*-
grep -nH -e abc /tmp/t
T:1:abc def ^[[01;41mabc^[[00m^[[K def
T:2:def abc def

Grep finished (matches found) at Mon May  2 18:57:15

The escape sequence for the second "abc" string was not eliminated and
replaced with a face. 



_______________________________________________
Emacs-pretest-bug mailing list
Emacs-pretest-bug@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug
------- End of forwarded message -------

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dann@ics.uci.edu: grep fontification problem]
  2005-05-04 16:13 [dann@ics.uci.edu: grep fontification problem] Richard Stallman
@ 2005-05-06 17:56 ` Marcelo Toledo
  2005-05-07 18:36   ` Richard Stallman
  0 siblings, 1 reply; 3+ messages in thread
From: Marcelo Toledo @ 2005-05-06 17:56 UTC (permalink / raw)


In 2004/04/05 we started a thread about highlighting grep buffer, the
code mentioned there uses the ansi codes of grep and activates the
`ansi-color-apply-on-region'.

This solution is partially acceptable, will work for most of the users,
but will fail for non GNU Grep, I cannot customize it in Emacs which is
bad in my opinion because may not look good in all displays and every
once grep changes their code, we have to make sure it will not break our
solution and it will still be highlighting correctly.

For some reason the solution nowadays looks pretty much confusing, it
uses the ansi codes generated from grep, doesn't activate ansi in the
region and the codes are stripped in the future.

In 26 Apr 2005 17:24:24 Stefan suggested something, but I can only
realize that we have been fighting against a wrong solution that we took
in the past.

Whatever is going on we have no complex highlight here so I don't see
why we should still stick with the ansi colors. This is turning the
source code complicated, longer, dependent and non-customizable in
Emacs.

Richard Stallman <rms@gnu.org> writes:

> Is someone working on this problem?  Please tell me if you are.
>
> From: Dan Nicolaescu <dann@ics.uci.edu>
> Subject: grep fontification problem
> To: emacs-pretest-bug@gnu.org
> X-Sent: 3 days, 15 hours, 21 minutes, 16 seconds ago
> X-Spam-Level: 
>
>
> Save the following to /tmp/t
>
> - ---cut here---
> abc def abc def
> def abc def
> - ---cut here---
>
> and then do M-x grep RET abc /tmp/t RET
>
> the grep buffer will look like:
>
> - -*- mode: grep; default-directory: "/tmp/" -*-
> grep -nH -e abc /tmp/t
> T:1:abc def ^[[01;41mabc^[[00m^[[K def
> T:2:def abc def
>
> Grep finished (matches found) at Mon May  2 18:57:15
>
> The escape sequence for the second "abc" string was not eliminated and
> replaced with a face. 

-- 
Marcelo Toledo
marcelo@marcelotoledo.org
http://www.marcelotoledo.org
Mobile: 55 71 9116-1101

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dann@ics.uci.edu: grep fontification problem]
  2005-05-06 17:56 ` Marcelo Toledo
@ 2005-05-07 18:36   ` Richard Stallman
  0 siblings, 0 replies; 3+ messages in thread
From: Richard Stallman @ 2005-05-07 18:36 UTC (permalink / raw)
  Cc: emacs-devel

    In 2004/04/05 we started a thread about highlighting grep buffer, the
    code mentioned there uses the ansi codes of grep and activates the
    `ansi-color-apply-on-region'.

    This solution is partially acceptable, will work for most of the users,
    but will fail for non GNU Grep,

Do other grep versions do this highlighting at all?

     I cannot customize it in Emacs which is
    bad in my opinion because may not look good in all displays and every
    once grep changes their code, we have to make sure it will not break our
    solution and it will still be highlighting correctly.

No, we don't have to do this.  If GNU grep changes and breaks this,
we just have to tell the grep maintainer is a bug.


This solution is imperfect, but better than nothing.
Does anyone have a better solution to suggest?

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-05-07 18:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-05-04 16:13 [dann@ics.uci.edu: grep fontification problem] Richard Stallman
2005-05-06 17:56 ` Marcelo Toledo
2005-05-07 18:36   ` Richard Stallman

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).