[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#8084: 24.0.50; Grep output not usable in Ubuntu
From: |
Lars Ingebrigtsen |
Subject: |
bug#8084: 24.0.50; Grep output not usable in Ubuntu |
Date: |
Mon, 21 Feb 2011 01:19:25 -0800 |
User-agent: |
Gnus/5.110012 (No Gnus v0.12) Emacs/24.0.50 (gnu/linux) |
Glenn Morris <rgm@gnu.org> writes:
>> In a default install of Ubuntu Maverick, M-x grep doesn't seem to work
>> very well. The problem seems to be related to Ubuntu grep having
>> colourising switched on by default.
>
> How did they switch on colours by default? I would have guessed it's
> just a shell alias, which shouldn't affect Emacs.
D'oh! It is:
larsi@lenovo:~$ type grep
grep is aliased to `grep --color=auto'
That explains why doing stuff like
GREP_COLORS=never grep ...
doesn't work for me... How silly.
But does Emacs bypass the shell alias settings?
> In any case, it's kind of odd that this would cause a problem, since
> Emacs itself turns on grep colours by default - see
> grep-highlight-matches and grep-process-setup.
The former is 'auto for me. But still I'm getting...
gnus.el:4080: ;; "[01;31mhello[m", and the select method is ("[01;31mhello[m"
(my-var "something"))
Oh, d'oh again!
I have
(global-font-lock-mode -1)
and that makes the escape codes not work.
So this is all user error, I think. Or should M-x grep work if you have
font locking switched off? It's not only that the output of M-x grep is
unreadable, but `next-error' doesn't work the first time, either. (The
second and subsequent times it does work.)
--
(domestic pets only, the antidote for overdose, milk.)
larsi@gnus.org * Lars Magne Ingebrigtsen