unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Grep and font-lock
@ 2004-04-21  9:12 Jan D.
  2004-04-21  9:33 ` Jan D.
  2004-04-21 16:04 ` Stefan Monnier
  0 siblings, 2 replies; 17+ messages in thread
From: Jan D. @ 2004-04-21  9:12 UTC (permalink / raw)


Hello.

Good to see grep working again.  However, there is an incompatible 
change,
grep now always turns on font-lock, which the old did not do.  How does
one go about to turn it off for grep only?  Not wanting to be against 
new
stuff, but I find that I more and more agree with the guy who remarked
that for every new Emacs he has to turn more and more features off to
get back to the same state as the previous release.

I don't mind to turn stuff off, but I do think how to turn off 
incompatible
changes as this should be mentioned in NEWS.

I do not have perfect vision and black on white is always best for me.
Some colour combinations makes my eyes hurt, the defaults that font-lock
uses very much so.

	Jan D.

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

* Re: Grep and font-lock
  2004-04-21  9:12 Grep and font-lock Jan D.
@ 2004-04-21  9:33 ` Jan D.
  2004-04-21 16:04 ` Stefan Monnier
  1 sibling, 0 replies; 17+ messages in thread
From: Jan D. @ 2004-04-21  9:33 UTC (permalink / raw)



> Hello.
>
> Good to see grep working again.  However, there is an incompatible 
> change,
> grep now always turns on font-lock, which the old did not do.  How does
> one go about to turn it off for grep only?  Not wanting to be against 
> new
> stuff, but I find that I more and more agree with the guy who remarked
> that for every new Emacs he has to turn more and more features off to
> get back to the same state as the previous release.
>
> I don't mind to turn stuff off, but I do think how to turn off 
> incompatible
> changes as this should be mentioned in NEWS.

I see compilation also turns on font-lock.  This should also be easy
to turn off IMHO.

	Jan D.

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

* Re: Grep and font-lock
  2004-04-21  9:12 Grep and font-lock Jan D.
  2004-04-21  9:33 ` Jan D.
@ 2004-04-21 16:04 ` Stefan Monnier
  2004-04-21 19:27   ` Jan D.
  1 sibling, 1 reply; 17+ messages in thread
From: Stefan Monnier @ 2004-04-21 16:04 UTC (permalink / raw)
  Cc: emacs-devel Devel

> Good to see grep working again.  However, there is an incompatible change,
> grep now always turns on font-lock, which the old did not do.  How does
> one go about to turn it off for grep only?  Not wanting to be against new

The new compile.el uses font-lock internally, so you can't turn it off.
But maybe we can make it so font-lock does not put any faces.


        Stefan

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

* Re: Grep and font-lock
  2004-04-21 16:04 ` Stefan Monnier
@ 2004-04-21 19:27   ` Jan D.
  2004-04-21 19:36     ` Stefan Monnier
  0 siblings, 1 reply; 17+ messages in thread
From: Jan D. @ 2004-04-21 19:27 UTC (permalink / raw)
  Cc: emacs-devel Devel

>> Good to see grep working again.  However, there is an incompatible 
>> change,
>> grep now always turns on font-lock, which the old did not do.  How 
>> does
>> one go about to turn it off for grep only?  Not wanting to be against 
>> new
>
> The new compile.el uses font-lock internally, so you can't turn it off.
> But maybe we can make it so font-lock does not put any faces.

Any particular reason it doesn't behave like other modes, i.e. if
global font lock is off, and not otherwise turned on, via a hook for
example, leave it off?

	Jan D.

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

* Re: Grep and font-lock
  2004-04-21 19:27   ` Jan D.
@ 2004-04-21 19:36     ` Stefan Monnier
  2004-04-21 22:26       ` Jan D.
  0 siblings, 1 reply; 17+ messages in thread
From: Stefan Monnier @ 2004-04-21 19:36 UTC (permalink / raw)
  Cc: emacs-devel Devel

> Any particular reason it doesn't behave like other modes, i.e. if
> global font lock is off, and not otherwise turned on, via a hook for
> example, leave it off?

What part of "uses it internally" don't you understand?
If you turn off font-lock, compile.el just plain doesn't work any more.


        Stefan

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

* Re: Grep and font-lock
  2004-04-21 19:36     ` Stefan Monnier
@ 2004-04-21 22:26       ` Jan D.
  2004-04-21 22:41         ` Miles Bader
                           ` (2 more replies)
  0 siblings, 3 replies; 17+ messages in thread
From: Jan D. @ 2004-04-21 22:26 UTC (permalink / raw)
  Cc: emacs-devel Devel

>> Any particular reason it doesn't behave like other modes, i.e. if
>> global font lock is off, and not otherwise turned on, via a hook for
>> example, leave it off?
>
> What part of "uses it internally" don't you understand?
> If you turn off font-lock, compile.el just plain doesn't work any more.

I assumed it didn't use all the faces internally and those could be 
turned
off, and give the impression that font lock is off.  If that is not 
possible,
I guess I have to redefine those faces.  However, NEWS should mention
this, and perhaps list the names of the faces.  It is not obvious that
faces starting with compile- also affects grep.

	Jan D.

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

* Re: Grep and font-lock
  2004-04-21 22:26       ` Jan D.
@ 2004-04-21 22:41         ` Miles Bader
  2004-04-21 22:51         ` Stefan Monnier
  2004-04-23 17:21         ` Richard Stallman
  2 siblings, 0 replies; 17+ messages in thread
From: Miles Bader @ 2004-04-21 22:41 UTC (permalink / raw)
  Cc: Stefan Monnier, emacs-devel Devel

On Thu, Apr 22, 2004 at 12:26:54AM +0200, Jan D. wrote:
> I guess I have to redefine those faces.  However, NEWS should mention
> this, and perhaps list the names of the faces.  It is not obvious that
> faces starting with compile- also affects grep.

Hmmm, before putting them in NEWS or a release, let's rename the new
compilation deffaces without the `-face' suffix...

-Miles
-- 
"Most attacks seem to take place at night, during a rainstorm, uphill,
 where four map sheets join."   -- Anon. British Officer in WW I

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

* Re: Grep and font-lock
  2004-04-21 22:26       ` Jan D.
  2004-04-21 22:41         ` Miles Bader
@ 2004-04-21 22:51         ` Stefan Monnier
  2004-04-23 17:21           ` Richard Stallman
  2004-04-23 17:21         ` Richard Stallman
  2 siblings, 1 reply; 17+ messages in thread
From: Stefan Monnier @ 2004-04-21 22:51 UTC (permalink / raw)
  Cc: emacs-devel Devel

> I assumed it didn't use all the faces internally and those could be turned
> off, and give the impression that font lock is off.

That's actually what I suggested: font-lock does not only set faces.
compile.el uses it to set faces (which have no other purpose than aesthetic)
and to set crucial meta info.  So you can't just plain turn off font-lock
because it would break grep, but we could add some option to font-lock
so you can have it ON without any of the visual effects.


        Stefan

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

* Re: Grep and font-lock
  2004-04-21 22:26       ` Jan D.
  2004-04-21 22:41         ` Miles Bader
  2004-04-21 22:51         ` Stefan Monnier
@ 2004-04-23 17:21         ` Richard Stallman
  2 siblings, 0 replies; 17+ messages in thread
From: Richard Stallman @ 2004-04-23 17:21 UTC (permalink / raw)
  Cc: monnier, emacs-devel

    I assumed it didn't use all the faces internally and those could be 
    turned
    off, and give the impression that font lock is off.  If that is not 
    possible,
    I guess I have to redefine those faces.  However, NEWS should mention
    this, and perhaps list the names of the faces.  It is not obvious that
    faces starting with compile- also affects grep.

It would be nice if compile.el were set up to install other properties
for parsing purposes, instead of using the fonts for that.  The font lock
mechanism can be used to do this.

This way, it would be ok for users to turn the fontification on and
off in the usual ways, and it would not affect the parsing.

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

* Re: Grep and font-lock
  2004-04-21 22:51         ` Stefan Monnier
@ 2004-04-23 17:21           ` Richard Stallman
  2004-04-23 17:41             ` David Kastrup
  0 siblings, 1 reply; 17+ messages in thread
From: Richard Stallman @ 2004-04-23 17:21 UTC (permalink / raw)
  Cc: jan.h.d, emacs-devel

    That's actually what I suggested: font-lock does not only set faces.
    compile.el uses it to set faces (which have no other purpose than aesthetic)
    and to set crucial meta info.  So you can't just plain turn off font-lock
    because it would break grep, but we could add some option to font-lock
    so you can have it ON without any of the visual effects.

When a mode uses the font-lock mechanism to put on other properties,
turning font-lock mode on and off should have no effect on that.
Turning font-lock mode on and off should only affect the faces.

If this is not how it works now, let's change it.

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

* Re: Grep and font-lock
  2004-04-23 17:21           ` Richard Stallman
@ 2004-04-23 17:41             ` David Kastrup
  2004-04-25 18:08               ` Richard Stallman
  0 siblings, 1 reply; 17+ messages in thread
From: David Kastrup @ 2004-04-23 17:41 UTC (permalink / raw)
  Cc: jan.h.d, Stefan Monnier, emacs-devel

Richard Stallman <rms@gnu.org> writes:

>     That's actually what I suggested: font-lock does not only set
>     faces.  compile.el uses it to set faces (which have no other
>     purpose than aesthetic) and to set crucial meta info.  So you
>     can't just plain turn off font-lock because it would break grep,
>     but we could add some option to font-lock so you can have it ON
>     without any of the visual effects.
> 
> When a mode uses the font-lock mechanism to put on other properties,
> turning font-lock mode on and off should have no effect on that.
> Turning font-lock mode on and off should only affect the faces.
> 
> If this is not how it works now, let's change it.

Definitely.  Since compile has changed, I get occasional colors
appearing here and there randomly.  I find that annoying.  I want my
font lock to stay turned off.

That being said, I think we should change the default of font-lock to
"on": new users consider it a great and helpful feature and are used
to getting it from their editors and on relying on this sort of syntax
analysis.

This will not change that I will keep font lock turned off on my
Emacs, but it is easier for me to turn it off than for a new user to
turn it on.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

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

* Re: Grep and font-lock
  2004-04-23 17:41             ` David Kastrup
@ 2004-04-25 18:08               ` Richard Stallman
  2004-04-25 18:32                 ` Simon Josefsson
                                   ` (2 more replies)
  0 siblings, 3 replies; 17+ messages in thread
From: Richard Stallman @ 2004-04-25 18:08 UTC (permalink / raw)
  Cc: jan.h.d, monnier, emacs-devel

    That being said, I think we should change the default of font-lock to
    "on": new users consider it a great and helpful feature and are used
    to getting it from their editors and on relying on this sort of syntax
    analysis.

Maybe you are right.  What do others think?

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

* Re: Grep and font-lock
  2004-04-25 18:08               ` Richard Stallman
@ 2004-04-25 18:32                 ` Simon Josefsson
  2004-04-25 19:18                   ` David Kastrup
  2004-04-26 10:07                 ` Kim F. Storm
  2004-04-26 16:10                 ` Drew Adams
  2 siblings, 1 reply; 17+ messages in thread
From: Simon Josefsson @ 2004-04-25 18:32 UTC (permalink / raw)


Richard Stallman <rms@gnu.org> writes:

>     That being said, I think we should change the default of font-lock to
>     "on": new users consider it a great and helpful feature and are used
>     to getting it from their editors and on relying on this sort of syntax
>     analysis.
>
> Maybe you are right.  What do others think?

I think so too.  What would a reason for not enabling it by default
be?  I think today more users find font-lock helpful, compared to
those who don't.  Monochrome users have been said to dislike
font-locking in the past, but perhaps that can be fixed by simply
choosing better highlighting for monochrome?  I wouldn't think CPU or
memory requirements matter.

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

* Re: Grep and font-lock
  2004-04-25 18:32                 ` Simon Josefsson
@ 2004-04-25 19:18                   ` David Kastrup
  0 siblings, 0 replies; 17+ messages in thread
From: David Kastrup @ 2004-04-25 19:18 UTC (permalink / raw)
  Cc: emacs-devel

Simon Josefsson <jas@extundo.com> writes:

> Richard Stallman <rms@gnu.org> writes:
> 
> >     That being said, I think we should change the default of
> >     font-lock to "on": new users consider it a great and helpful
> >     feature and are used to getting it from their editors and on
> >     relying on this sort of syntax analysis.
> >
> > Maybe you are right.  What do others think?
> 
> I think so too.  What would a reason for not enabling it by default
> be?

Disabled persons might not be able to see enough to disable the
default setting again.  I think we already discussed this at one time,
and one proposal was to have a -bw option that would switch faces to
just foreground color and background color, preferably maybe even
choosing different font shapes instead of font colors.

The discussion tapered off at some time.  Even if we don't implement
the full last proposal (which about everyone agreed would be nice to
have), we should perhaps at least provide a basic -bw switch that
would cooperate with -reversevideo (or what it was called): quite a
few of people with sight disabilities use white on black.

> I think today more users find font-lock helpful, compared to those
> who don't.  Monochrome users have been said to dislike font-locking
> in the past, but perhaps that can be fixed by simply choosing better
> highlighting for monochrome?

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

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

* Re: Grep and font-lock
  2004-04-25 18:08               ` Richard Stallman
  2004-04-25 18:32                 ` Simon Josefsson
@ 2004-04-26 10:07                 ` Kim F. Storm
  2004-04-27 14:24                   ` Stefan Monnier
  2004-04-26 16:10                 ` Drew Adams
  2 siblings, 1 reply; 17+ messages in thread
From: Kim F. Storm @ 2004-04-26 10:07 UTC (permalink / raw)
  Cc: David Kastrup, monnier, jan.h.d, emacs-devel

Richard Stallman <rms@gnu.org> writes:

>     That being said, I think we should change the default of font-lock to
>     "on": new users consider it a great and helpful feature and are used
>     to getting it from their editors and on relying on this sort of syntax
>     analysis.
> 
> Maybe you are right.  What do others think?

Generally speaking, I think font-lock should be on by default.

As this poses a problem to some users, adding the -bw switch seems like
a simple way to overcome those problems.

-- 
Kim F. Storm <storm@cua.dk> http://www.cua.dk

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

* RE: Grep and font-lock
  2004-04-25 18:08               ` Richard Stallman
  2004-04-25 18:32                 ` Simon Josefsson
  2004-04-26 10:07                 ` Kim F. Storm
@ 2004-04-26 16:10                 ` Drew Adams
  2 siblings, 0 replies; 17+ messages in thread
From: Drew Adams @ 2004-04-26 16:10 UTC (permalink / raw)
  Cc: emacs-devel

Yes, "on" is a better default for font-lock-mode.

-----Original Message-----
From: emacs-devel-bounces+drew.adams=oracle.com@gnu.org
[mailto:emacs-devel-bounces+drew.adams=oracle.com@gnu.org]On Behalf Of
Richard Stallman

    That being said, I think we should change the default of font-lock to
    "on"...

Maybe you are right.  What do others think?

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

* Re: Grep and font-lock
  2004-04-26 10:07                 ` Kim F. Storm
@ 2004-04-27 14:24                   ` Stefan Monnier
  0 siblings, 0 replies; 17+ messages in thread
From: Stefan Monnier @ 2004-04-27 14:24 UTC (permalink / raw)
  Cc: David Kastrup, rms, jan.h.d, emacs-devel

> Generally speaking, I think font-lock should be on by default.

Agreed.


        Stefan

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

end of thread, other threads:[~2004-04-27 14:24 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-04-21  9:12 Grep and font-lock Jan D.
2004-04-21  9:33 ` Jan D.
2004-04-21 16:04 ` Stefan Monnier
2004-04-21 19:27   ` Jan D.
2004-04-21 19:36     ` Stefan Monnier
2004-04-21 22:26       ` Jan D.
2004-04-21 22:41         ` Miles Bader
2004-04-21 22:51         ` Stefan Monnier
2004-04-23 17:21           ` Richard Stallman
2004-04-23 17:41             ` David Kastrup
2004-04-25 18:08               ` Richard Stallman
2004-04-25 18:32                 ` Simon Josefsson
2004-04-25 19:18                   ` David Kastrup
2004-04-26 10:07                 ` Kim F. Storm
2004-04-27 14:24                   ` Stefan Monnier
2004-04-26 16:10                 ` Drew Adams
2004-04-23 17:21         ` 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).