You are not logged in.

#1 2008-01-29 09:31:32

0l33l
Member
Registered: 2007-09-15
Posts: 28

Problems with Emacs Shell

Hi. I'm in a C programming class that highly encourages emacs. I compiled the cvs-unicode build, and I have used the regular build from pacman, but both run into the same problem. When I start a shell (alt+x then shell) in emacs, all the characters are incorrectly displayed.

When I normally open a terminal window and type in ls, I get the following

dburban ~  $  ls
12.11.07.cfg            screenshot1.bmp
494823416_files         screenshot2.bmp
494823416.html          screenshot3.bmp
da-eval.rtf             shit
Desktop                 ss0.bmp
Documents               start-fusion.sh
eclipse.desktop         the-seven-deadly-sins-portrayed-by-women_files
enable-keys.sh          the-seven-deadly-sins-portrayed-by-women.html
enable-keys.sh~         top-100-motivational-quotes_files
fix-ip.sh               top-100-motivational-quotes.html
Images                  top-20-entrepre_files
ipup.py                 top-20-entrepre.html
ipup.py~                Untitled1.abw.SAVED
Mac                     Wallpapers
monoff.sh               WiFi.txt
nautilus-debug-log.txt  workspace
restart-network.sh
dburban ~  $

However, in emacs, I get this:

[0;32mdburban[m [1;34m~[m [m [1;32m$ [m[1;37m ls
[0m[0m12.11.07.cfg[0m            [0mscreenshot1.bmp[0m
[01;34m494823416_files[0m         [0mscreenshot2.bmp[0m
[0m494823416.html[0m          [0mscreenshot3.bmp[0m
[0mda-eval.rtf[0m             [0mshit[0m
[01;34mDesktop[0m                 [0mss0.bmp[0m
[01;34mDocuments[0m               [01;32mstart-fusion.sh[0m
[0meclipse.desktop[0m         [01;34mthe-seven-deadly-sins-portrayed-by-women_files[0m
[01;32menable-keys.sh[0m          [0mthe-seven-deadly-sins-portrayed-by-women.html[0m
[0menable-keys.sh~[0m         [01;34mtop-100-motivational-quotes_files[0m
[01;32mfix-ip.sh[0m               [0mtop-100-motivational-quotes.html[0m
[01;34mImages[0m                  [01;34mtop-20-entrepre_files[0m
[0mipup.py[0m                 [0mtop-20-entrepre.html[0m
[0mipup.py~[0m                [0mUntitled1.abw.SAVED[0m
[01;34mMac[0m                     [01;34mWallpapers[0m
[01;32mmonoff.sh[0m               [01;32mWiFi.txt[0m
[0mnautilus-debug-log.txt[0m  [01;34mworkspace[0m
[01;32mrestart-network.sh[0m
[m[0;32mdburban[m [1;34m~[m [m [1;32m$ [m[1;37m

I have no clue were this is coming from. Emacs launches in the shell and doesn't give any error codes.

Any help would be greatly appreciated.

Offline

#2 2008-01-29 13:31:28

Theomachos
Member
From: Germany
Registered: 2007-07-31
Posts: 67
Website

Re: Problems with Emacs Shell

'M-x shell' doesn't support ansi colors by default. Try 'M-x eshell' or use this in your .emacs:

   ;; Add color to a shell running in emacs 'M-x shell'
   (autoload 'ansi-color-for-comint-mode-on "ansi-color" nil t)
   (add-hook 'shell-mode-hook 'ansi-color-for-comint-mode-on)

Take a look: http://www.emacswiki.org/cgi-bin/emacs- … goryEshell

Last edited by Theomachos (2008-01-29 16:00:01)


There is one thing even more vital to science than intelligent methods; and that is, the sincere desire to find out the truth, whatever it may be.
Charles S. Peirce

Offline

#3 2008-01-29 16:38:53

pauldonnelly
Member
Registered: 2006-06-19
Posts: 776

Re: Problems with Emacs Shell

Use "M-x term" instead.

Offline

#4 2008-01-29 18:10:49

0l33l
Member
Registered: 2007-09-15
Posts: 28

Re: Problems with Emacs Shell

Thank you! Both solutions work wonderfully!

Offline

#5 2008-01-29 18:18:07

Sjoden
Member
From: WA
Registered: 2007-08-16
Posts: 380
Website

Re: Problems with Emacs Shell

Emacs is a great OS and all, but idk why they want you to use it when it still doesn't have a good text editor....

Offline

#6 2008-01-29 19:29:58

pauldonnelly
Member
Registered: 2006-06-19
Posts: 776

Re: Problems with Emacs Shell

Sjoden wrote:

Emacs is a great OS and all, but idk why they want you to use it when it still doesn't have a good text editor....

M-x viper-mode?

Offline

#7 2008-03-08 06:11:24

wiremore
Member
Registered: 2005-08-23
Posts: 43

Re: Problems with Emacs Shell

you can also (add-hook 'shell-mode-hook 'ansi-color-for-comint-mode-on) in your .emacs to get terminal colors in the normal emacs shell.

Offline

#8 2008-03-08 06:40:53

valnour
Member
From: Cleveland, TN, USA
Registered: 2008-02-17
Posts: 84
Website

Re: Problems with Emacs Shell

Sjoden wrote:

Emacs is a great OS and all, but idk why they want you to use it when it still doesn't have a good text editor....

Argh.

That quote (or misquote as it were) always gets dug up from the depths of the internet when emacs is discussed.

Offline

Board footer

Powered by FluxBB