[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 0/3] Various clean up in preparation for libtextstyle

From: Akim Demaille
Subject: Re: [PATCH 0/3] Various clean up in preparation for libtextstyle
Date: Thu, 14 Feb 2019 21:52:53 +0100

hi HS,

> Le 14 févr. 2019 à 21:30, H. S. Teoh <address@hidden> a écrit :
> On Thu, Feb 14, 2019 at 09:06:53PM +0100, Akim Demaille wrote:
>> I'm exploring the use of libtextstyle to propose diagnostics in color.
>> I think it's nice looking on a terminal, but it's quite invasive on
>> the code.  Maybe libtextstyle is overkill.  I would appreciate
>> comments.
> [...]
> You probably shouldn't pay too much attention to my opinion on this
> topic, because I'm clearly an outlier, being an insane person who
> deliberately turns *off* syntax highlighting while coding, but I find
> color output from terminal programs very distracting.

I used to think that, but when clang and gcc introduced color in their
diagnostics, I clearly saw this as an improvement (to my eyes).  I also
appreciate the colors in diff, and in git.

At the beginning I did not like the caret error either, but then I
realized that in a terminal, they do help a lot.  In an IDE such as
Emacs, they don't help much, but in a terminal, they do.  That's why
I added them to Bison.  Since then, I much prefer having them than not.

> They tend to clash
> with whatever background color I set for my terminal, and don't really
> help that much anyway. I rather parse through the text directly and
> understand exactly what's going on, rather than being distracted by
> garish colors splashed everywhere.


My point is only to imitate what the compilers do to tell the difference
between errors and warnings.  For instance:

To be honest, I also read a far amount of parse traces, and I would
love a bit of color to see more easily the various steps in the

> I won't oppose using libtextstyle or Bison adopting color diagnostics,
> but if it were added I would request a way to turn it off so that it
> doesn't give me a headache.

Of course!  As a matter of fact, if we are to adopt libtextstyle,
not only can you easily turn off the colors, but you may also decide
to use other styles.  For instance, if instead of

.warning   { color : purple; }
.error     { color : red; }
.note      { color : cyan; }

I put this in diagnostics.css:

.warning   { }
.error     { font-weight : 800; text-decoration : underline; }
.note      { }

then you'd get:

(which shows I show close the style before the spaces, not after).
The user can decide the style she wants to use.  Including, err,
creations :)

> Thanks!  (Though if it's *that* invasive on
> the code, if it were up to me, I'd say no. But then I'm not the one
> making decisions here, so *shrug*.)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]