ada-mode-users
[Top][All Lists]
Advanced

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

Re: colorize the alr output in Emacs' compilation buffer


From: Troy Brown
Subject: Re: colorize the alr output in Emacs' compilation buffer
Date: Wed, 26 Oct 2022 22:25:43 -0400

If I understand you correctly, you're running the normal "M-x compile" command and the output is destined for the "*compilation*" buffer.  In that case, I think you want something like the following:

(require 'ansi-color)
(add-hook 'compilation-filter-hook (lambda () (ansi-color-apply-on-region compilation-filter-start (point))))

If you're running Emacs 28.1 or newer, there is 'ansi-color-compilation-filter' which can be used instead of the lambda.


Troy.

On Wed, Oct 26, 2022 at 1:56 PM Rolf Ebert <rolf.ebert.emacs@gmx.de> wrote:
I call 'alr build' as compile command. That does not look pretty at all,
the escape sequences are shown and not translated. So I called 'alr
--no-color build'. But that looks boring. After some research I added
the following two lines to my .emacs:

(require 'ansi-color)
(add-hook 'compilation-mode-hook 'ansi-color-for-comint-mode-on)

But that does not work neither.

Has anybody tried that before and has a solution?

Regards

      Rolf




reply via email to

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