From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tim X Newsgroups: gmane.emacs.help Subject: Re: help with M-x term Date: Fri, 14 Jul 2006 15:25:54 +1000 Organization: Posted via Supernews, http://www.supernews.com Message-ID: <877j2gycyl.fsf@tiger.rapttech.com.au> References: <1152734523.744338.154800@m79g2000cwm.googlegroups.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1152855658 8400 80.91.229.2 (14 Jul 2006 05:40:58 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 14 Jul 2006 05:40:58 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jul 14 07:40:57 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1G1GQ3-0007aY-7r for geh-help-gnu-emacs@m.gmane.org; Fri, 14 Jul 2006 07:40:55 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1G1GQ2-0001yN-ON for geh-help-gnu-emacs@m.gmane.org; Fri, 14 Jul 2006 01:40:54 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!syros.belnet.be!news.belnet.be!newsfeed00.sul.t-online.de!t-online.de!feeder.news-service.com!feed.xsnews.nl!feeder.xsnews.nl!138.199.65.86.MISMATCH!sn-xt-ams-06!sn-xt-ams-04!sn-post-ams-01!sn-post-sjc-01!supernews.com!corp.supernews.com!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.50 (gnu/linux) Cancel-Lock: sha1:BDeMFICdXo0mcybIowo6O6jUqHM= Original-X-Complaints-To: abuse@supernews.com Original-Lines: 53 Original-Xref: shelby.stanford.edu gnu.emacs.help:140329 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:35954 Archived-At: op132650c@mail.telepac.pt writes: >> Is there some reason why you aren't using M-x shell? > > I don't want to detour the attention about the question of William Daffer, but i > also prefer M-x term instead of M-x shell, because the output of M-x shell is > not well formatted compared to M-x term. > > Now i put the following question: > > What's the difference between M-x shell and M-x term? > > How can i configure M-x shell to be well formatted? > > One example of the bad formatation of the output of M-x shell, is when i do ls > -la. > I get the following: > > ]]] file1 ]]] file3^]]] ]]] file5^]]] > ]]] file2 ]]] file4^]]] ]]] file6^]]] > > > With the M-x term i get well formatted: > > file1 file3 file5 > file2 file4 file6 > The difference in 'formatting' you have observed is because M-x shell doesn't understand ANSI escape codes for colour. When you use the ls command and have it configured to display the output using different colours for different file types, it does this by using andsi colour escape sequences. However, M-x shell does not understand these "out of the box". There are at least two solutions - 1. configure ls not to use escape sequences when displaying a directory listing in a dumb terminal - one of the ls --color= values should do this 2. Enable support for ansi colours in comint derived modes - do an apropos for ansi color. M-x shell will then be able to interpret the ansi colour codes. 3. Use M-x term Tim -- tcross (at) rapttech dot com dot au