* escape characters in emacs20 shell mode
@ 2002-11-13 18:21 Nimar Arora
2002-11-13 19:17 ` Frédéric Bothamy
[not found] ` <mailman.1037219095.31729.help-gnu-emacs@gnu.org>
0 siblings, 2 replies; 7+ messages in thread
From: Nimar Arora @ 2002-11-13 18:21 UTC (permalink / raw)
Hi,
I'm running emacs20 on a Linux (Debian - Woody/stable)
virtual console. When I enter an emacs shell and try
to execute some command - like 'ls' - the output
contains a whole of junk - [[0m etc. These look like
the escape characters which can control the display
attributes on some terminals. I don't understand why
I'm getting these. I don't even have a .emacs file
yet, so I haven't changed the default configuration.
I tried, 'E-x shell-strip-ctrl-m' but to no avail. I
also tried to lookup the info on Emacs shell mode to
see if Debian has created some funky shell mode but
couldn't find anything.
Thanks,
Nimar
__________________________________________________
Do you Yahoo!?
U2 on LAUNCH - Exclusive greatest hits videos
http://launch.yahoo.com/u2
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: escape characters in emacs20 shell mode
2002-11-13 18:21 Nimar Arora
@ 2002-11-13 19:17 ` Frédéric Bothamy
[not found] ` <mailman.1037219095.31729.help-gnu-emacs@gnu.org>
1 sibling, 0 replies; 7+ messages in thread
From: Frédéric Bothamy @ 2002-11-13 19:17 UTC (permalink / raw)
* Nimar Arora <nimar_arora@yahoo.com> [2002-11-13 10:21] :
> Hi,
>
> I'm running emacs20 on a Linux (Debian - Woody/stable)
> virtual console. When I enter an emacs shell and try
> to execute some command - like 'ls' - the output
> contains a whole of junk - [[0m etc. These look like
> the escape characters which can control the display
> attributes on some terminals. I don't understand why
> I'm getting these. I don't even have a .emacs file
> yet, so I haven't changed the default configuration.
You probably have an alias on ls like alias='ls --color=auto'. These
ares color codes. Unalias ls and it should work as you want.
I still don't understand why auto-color tries to color on a dumb
terminal (same here). Probably a wrong terminfo/termcap definition.
Fred
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: escape characters in emacs20 shell mode
[not found] <mailman.1037212446.24847.help-gnu-emacs@gnu.org>
@ 2002-11-14 12:11 ` Daniel Jensen
0 siblings, 0 replies; 7+ messages in thread
From: Daniel Jensen @ 2002-11-14 12:11 UTC (permalink / raw)
Nimar Arora <nimar_arora@yahoo.com> writes:
> I'm running emacs20 on a Linux (Debian - Woody/stable)
> virtual console. When I enter an emacs shell and try
> to execute some command - like 'ls' - the output
> contains a whole of junk - [[0m etc. These look like
> the escape characters which can control the display
> attributes on some terminals. I don't understand why
> I'm getting these. I don't even have a .emacs file
> yet, so I haven't changed the default configuration.
Try putting this in your .emacs:
(require 'ansi-color)
(setq ansi-color-for-comint-mode t)
Or, use eshell instead.
> I tried, 'E-x shell-strip-ctrl-m' but to no avail. I
> also tried to lookup the info on Emacs shell mode to
> see if Debian has created some funky shell mode but
> couldn't find anything.
shell-strip-ctrl-m doesn't remove those color escape codes. It does
exactly what the name suggests, removes ^M's from output.
--
Daniel Jensen
: (format (concat "mailto:" "%s@%s.%s") "daniel" "bigwalter" "net")
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: escape characters in emacs20 shell mode
[not found] ` <mailman.1037219095.31729.help-gnu-emacs@gnu.org>
@ 2002-11-16 16:30 ` Kai Großjohann
2002-11-16 17:03 ` Frédéric Bothamy
[not found] ` <m3y97tjtiy.fsf@kuntu.zangpo.org>
1 sibling, 1 reply; 7+ messages in thread
From: Kai Großjohann @ 2002-11-16 16:30 UTC (permalink / raw)
Frédéric Bothamy <fbothamy@mail.dotcom.fr> writes:
> I still don't understand why auto-color tries to color on a dumb
> terminal (same here). Probably a wrong terminfo/termcap definition.
Is $TERM really `dumb' in an Emacs shell?
kai
--
~/.signature is: umop ap!sdn (Frank Nobis)
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: escape characters in emacs20 shell mode
2002-11-16 16:30 ` Kai Großjohann
@ 2002-11-16 17:03 ` Frédéric Bothamy
0 siblings, 0 replies; 7+ messages in thread
From: Frédéric Bothamy @ 2002-11-16 17:03 UTC (permalink / raw)
* Kai Großjohann <kai.grossjohann@uni-duisburg.de> [2002-11-16 17:30] :
> Frédéric Bothamy <fbothamy@mail.dotcom.fr> writes:
>
> > I still don't understand why auto-color tries to color on a dumb
> > terminal (same here). Probably a wrong terminfo/termcap definition.
>
> Is $TERM really `dumb' in an Emacs shell?
Using M-x shell, yes (for me under GNU Emacs 21.2.1), using eshell
TERM is not defined.
Fred
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: escape characters in emacs20 shell mode
[not found] ` <m3y97tjtiy.fsf@kuntu.zangpo.org>
@ 2002-11-17 19:22 ` Ivan Kanis
2002-11-18 7:34 ` Kai Großjohann
0 siblings, 1 reply; 7+ messages in thread
From: Ivan Kanis @ 2002-11-17 19:22 UTC (permalink / raw)
Martin> Maybe because it isn't this dumb. I like the colored
Martin> output in shell mode ;) You might try this to deal with
Martin> the escape sequences:
Martin> (autoload 'ansi-color-for-comint-mode-on "ansi-color" nil t)
Martin> (add-hook 'shell-mode-hook 'ansi-color-for-comint-mode-on)
Ah what a neat trick. I have been putting up with no colors for years
because I thought it was something that didn't work.
Now would it be possible to pass the tab command directly to the
shell? Now that bash has programmable tab completion I would like to
use it withing emacs. I would like to have the same behavior when I am
running bash in a console and when it's running in emacs.
Ivan
--
/-----------------------------------------------------------------------------*
| "I often quote myself; it adds spice to my | Ivan Kanis |
| conversation." | ivank@juliva.com |
| (George Bernard Shaw) | www.juliva.com |
*-----------------------------------------------------------------------------/
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: escape characters in emacs20 shell mode
2002-11-17 19:22 ` Ivan Kanis
@ 2002-11-18 7:34 ` Kai Großjohann
0 siblings, 0 replies; 7+ messages in thread
From: Kai Großjohann @ 2002-11-18 7:34 UTC (permalink / raw)
Ivan Kanis <ivank@juliva.com> writes:
> Now would it be possible to pass the tab command directly to the
> shell? Now that bash has programmable tab completion I would like to
> use it withing emacs. I would like to have the same behavior when I am
> running bash in a console and when it's running in emacs.
I vaguely remember that somebody posted something like this for
tcsh. Maybe it was called tcsh-completion.el. But it was many years
ago, so I don't remember.
kai
--
~/.signature is: umop ap!sdn (Frank Nobis)
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2002-11-18 7:34 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <mailman.1037212446.24847.help-gnu-emacs@gnu.org>
2002-11-14 12:11 ` escape characters in emacs20 shell mode Daniel Jensen
2002-11-13 18:21 Nimar Arora
2002-11-13 19:17 ` Frédéric Bothamy
[not found] ` <mailman.1037219095.31729.help-gnu-emacs@gnu.org>
2002-11-16 16:30 ` Kai Großjohann
2002-11-16 17:03 ` Frédéric Bothamy
[not found] ` <m3y97tjtiy.fsf@kuntu.zangpo.org>
2002-11-17 19:22 ` Ivan Kanis
2002-11-18 7:34 ` Kai Großjohann
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).