Hello, In EmacsW32 when I use command M-x shell the cygwin bash launches. In this shell ANSI-color supported. For example, if you use command "ls --color" then the result will be colorized. But if you use the command "echo 1 | grep 1 --color" the result will NOT be colorized. If you put "--color=always": "echo 1 | grep 1 --color=always" then hex ANSI-codes appeares in output. In emacs config I write the following commands: (autoload 'ansi-color-for-comint_mode-on "ansi-color" nil t) (add-hook 'shell-mode-hook 'ansi-color-for-comint-mode-on).
After some figering out I found that grep --color returns strange ANSI colors: echo 1 | grep 1 --color=always | od -t x1 0000000 1b 5b 31 3b 33 33 6d 1b 5b 4b 31 1b 5b 6d 1b 5b 0000020 4b 0a 0000022 Here the strange ANSI-codes are: "[K" and "[m". To be compared the result of the command ls --color | od -t x1: 0000000 1b 5b 30 6d 1b 5b 30 31 3b 33 32 6d 62 61 73 68 0000020 2e 65 78 65 2e 73 74 61 63 6b 64 75 6d 70 1b 5b 0000040 30 6d 2a 0a 1b 5b 30 31 3b 33 32 6d 63 6d 64 70 0000060 72 6f 78 79 2e 65 78 65 2e 73 74 61 63 6b 64 75 0000100 6d 70 1b 5b 30 6d 2a 0a 65 63 68 6f 5f 72 65 73 0000120 2e 74 78 74 0a 65 63 68 6f 5f 72 65 73 5f 63 79 0000140 67 77 69 6e 2e 74 78 74 0a 6c 73 5f 72 65 73 2e 0000160 74 78 74 0a 0000164 So, it seems that ansi-color.el is not support ANSI-codes of grep command. I had ansi-color.el version 3.4.2. Then I downloaded and compiled the latest version of ansi-color.el - 3.4.5. The result is the same. -- View this message in context: http://old.nabble.com/ansi-color.el-doesn%27t-support-grep-ANSI-color-codes-tp31698780p31698780.html Sent from the Emacs - Windows - Help mailing list archive at Nabble.com.