Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added simple ANSI color escape sequence support to compiler message window #44

Closed
wants to merge 8 commits into from

Conversation

gigadude
Copy link

@gigadude gigadude commented Jun 4, 2012

My build system outputs ANSI-colorized status messages, this gets them working when building under Geany (only works for whole lines which start with "\x1b[", and only colorizes based on that first escape sequence).

@b4n
Copy link
Member

b4n commented Jun 30, 2012

I'm not fan of the feature, mostly because Geany can already parse compiler output -- and not handling color escape sequence should be harmless.

Moreover, if we actually wanted the feature I think it would require to

  • properly handle color anywhere;
  • make sure the color is readable (on the background we draw it on);
  • make sure it works with common coloring tools, like colorgcc, colormake, etc.

But again, I'm really not sure this is a good idea. If we want more coloring I guess we might simply color according to the parsing already present.

@gigadude
Copy link
Author

I think at the very least it should strip out the color sequences, they're ugly... and if you go to all that trouble,
colorizing would be nice (as for detecting backgrounds, etc, that's overkill IMO; let users configure it if it
doesn't show up).

  - Ed


From: Colomban Wendling reply@reply.github.com
To: gigadude eah1@yahoo.com
Sent: Saturday, June 30, 2012 1:31 PM
Subject: Re: [geany] Added simple ANSI color escape sequence support to compiler message window (#44)

I'm not fan of the feature, mostly because Geany can already parse compiler output -- and not handling color escape sequence should be harmless.

Moreover, if we actually wanted the feature I think it would require to

  • properly handle color anywhere;
  • make sure the color is readable (on the background we draw it on);
  • make sure it works with common coloring tools, like colorgcc, colormake, etc.

But again, I'm really not sure this is a good idea.  If we want more coloring I guess we might simply color according to the parsing already present.


Reply to this email directly or view it on GitHub:
#44 (comment)

@codebrainz
Copy link
Member

@b4n is that a "no we won't merge this"? If so, maybe just close it. I'm impartial to this change FWIW, but stripping out the escape sequences seems to make sense, assuming it works for stuff like colorgcc.

@b4n
Copy link
Member

b4n commented Jun 24, 2013

I think at the very least it should strip out the color sequences, they're ugly

Which tool forcefully generates color sequences? Tools I know that have a colored output are clever enough to check whether the terminal they are running on supports them, so don't mess up Geany's msgwindow. Maybe the tool would benefit from being fixed so it can run on non-ANSI colors aware terminals.

@b4n b4n closed this Jun 24, 2013
@eahutchins
Copy link

Do a Build>Make in the directory of the following Makefile:

    foo:
        @echo supports `tput colors` colors

I see 8 when I do this, is there another way to determine what colors are supported?

@b4n
Copy link
Member

b4n commented Jun 29, 2013

I don't know, but e.g. colorgcc works just fine, I don't see anything weird on the compiler messages, yet it's properly colored on the terminal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants