Skip to content

support ANSI colours in the compilation buffer #1608

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

Merged
merged 2 commits into from
Sep 13, 2018
Merged

support ANSI colours in the compilation buffer #1608

merged 2 commits into from
Sep 13, 2018

Conversation

fommil
Copy link
Contributor

@fommil fommil commented Sep 1, 2018

For example, when tasty is called with --color=always // @feuerbach

Disabled by default to avoid any performance impact, but perhaps we can do a test cycle and if people like it maybe turn it on by default?

BTW, I think there is a bug in Emacs... I had to use (point-max) but the docs said (point) should work.

2018-09-02-004013_1918x1078_scrot

@fommil
Copy link
Contributor Author

fommil commented Sep 1, 2018

oh, and there is also a missing regex to catch failed tasty tests as warnings... but I'll do that as a follow up.

@fommil
Copy link
Contributor Author

fommil commented Sep 2, 2018

The build failed for flakiness reasons unrelated to my proposed change:

The command '/bin/sh -c apt-get update     && apt-get install -y build-essential     && apt-get install --no-install-suggests --no-install-recommends -y emacs24-nox     && apt-get install -y ghc     && apt-get install -y haskell-stack' returned a non-zero code: 100

@fommil
Copy link
Contributor Author

fommil commented Sep 3, 2018

@purcell the #haskell-emacs room said that you're the maintainer, is that correct? Could you please do a review of this and merge if you're happy? The CI seems to be broken. I wonder if perhaps moving to gitlab, or using a custom docker image, would make this more reliable.

@purcell
Copy link
Member

purcell commented Sep 5, 2018

#haskell-emacs room said that you're the maintainer, is that correct?

LOL, just the only person occasionally looking at this in recent months, afaict. I've no bandwidth to fix up the build process currently, but the change looks reasonable. I only wonder why we wouldn't just unconditionally handle ANSI colours: I'm not convinced we need a new flag var.

@fommil
Copy link
Contributor Author

fommil commented Sep 5, 2018

@purcell hehe, I know the score.

Re new var, I just didn't want to break anybody's workflow. I plan on following up with a change to make it the default if I get say 10 reports of it working.

(point)))

(when haskell-compile-color
(read-only-mode -1)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here, I believe you can let-bind inhibit-read-only IIRC.

@@ -62,6 +63,11 @@ The `%s' placeholder is replaced by the current buffer's filename."
:group 'haskell-compile
:type 'boolean)

(defcustom haskell-compile-color nil
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since you're talking about a follow-up change later, let's just be bold and do this unconditionally.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, will do!

@fommil
Copy link
Contributor Author

fommil commented Sep 11, 2018

@purcell changes applied and eyeballed that it works.

@purcell purcell merged commit d6c2666 into haskell:master Sep 13, 2018
@purcell
Copy link
Member

purcell commented Sep 13, 2018

Sweet, thanks!

@fommil fommil deleted the ansi-colors branch September 13, 2018 07:01
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.

2 participants