unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Hemant Kumar <hemant@codemancers.com>
To: help-gnu-emacs@gnu.org
Subject: Emacs and colors in compilation buffer
Date: Sun, 13 Oct 2013 11:28:21 +0530	[thread overview]
Message-ID: <28FFC71E-7E47-48DD-B313-38A03B353103@codemancers.com> (raw)

Hello folks,

I am using https://github.com/Wilfred/ag.el for searching in directory and the with colors enabled in ag it looks like, 
http://cl.ly/image/2K35030n1C0T (Please note same problem exists with various ack modes as well)

As you can see it doesn't completely break and ansi color sequences are properly converted (at least some of it). In fact when search output is small enough, it looks perfect. But lets say when I grepping something like Rails code and then the result looks like:

http://cl.ly/image/2x012Y1L0e2T

As if the the color which was supposed to highlight the match has taken the background!

I already have following bit in my configuration file:

(require 'ansi-color)
(add-hook 'shell-mode-hook 'ansi-color-for-comint-mode-on)
(defun colorize-compilation-buffer ()
  (interactive)
  (toggle-read-only)
  (ansi-color-apply-on-region (point-min) (point-max))
  (toggle-read-only))

(add-hook 'compilation-filter-hook 'colorize-compilation-buffer)


Which  should fix this problem but it doesn't completely.  

Any help is much appreicated.



Cheers
Hemant
http://twitter.com/gnufied
http://www.codemancers.com





             reply	other threads:[~2013-10-13  5:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-13  5:58 Hemant Kumar [this message]
2013-10-13  6:01 ` Emacs and colors in compilation buffer Hemant Kumar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=28FFC71E-7E47-48DD-B313-38A03B353103@codemancers.com \
    --to=hemant@codemancers.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).