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: Terminal is not fully functional: from Shell of Emacs Date: Thu, 24 Sep 2009 20:07:42 +1000 Organization: Rapt Technologies Message-ID: <87eipw7j0x.fsf@lion.rapttech.com.au> References: <87vdj9zlfh.fsf@iki.fi> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1253789124 23111 80.91.229.12 (24 Sep 2009 10:45:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 24 Sep 2009 10:45:24 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Sep 24 12:45:17 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Mqloe-00051i-AX for geh-help-gnu-emacs@m.gmane.org; Thu, 24 Sep 2009 12:44:48 +0200 Original-Received: from localhost ([127.0.0.1]:58794 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mqlod-0003CK-9L for geh-help-gnu-emacs@m.gmane.org; Thu, 24 Sep 2009 06:44:47 -0400 Original-Path: news.stanford.edu!usenet.stanford.edu!newsfeed.news2me.com!news.astraweb.com!border2.newsrouter.astraweb.com!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux) Cancel-Lock: sha1:98n4tZKwpbReTa/4DdFrCVJa5hk= Original-Lines: 58 Original-NNTP-Posting-Host: d8b067ea.news.astraweb.com Original-X-Trace: DXC=9Q@]Sbd]]CjK; GKPh8BJfdL?0kYOcDh@j; >GTR`=ZX:boWjeWga8cogL?:=ZL5GW@hPGd 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:68435 Archived-At: July writes: >> By "the shell of Emacs" do you mean "M-x shell" command? If so, the >> warning is correct, "M-x shell" is not terminal at all, it's a kind of >> repeated shell command prompt. If you need a terminal inside Emacs use >> "M-x term". > > You are totally right. Thanks a lot. > > How ever, another question plz. > > There are 3 shells now for emacs > shell (activated by esc-x shell) > term > eshell > > what are their difference? Which one you recommand? > Emacs has had these three 'shell' environments since emacs 21 (two of them were in emacs 20 as well). Like many things in emacs, the answer to the question "Which is the best to use" depends on what it is you want to do. There is no one answer to this question. M-x shell is great if you just want to execute simple commands at a shell prompt, especially commands that do not require 'advanced' I/O such as screen formatting or addressing different locations on the screen. M-x term provides a more sophisticated shell terminal that does support advanced I/O. However, it can be a bit slower than M-x shell and has some slightly different key bindings, such as character mode an dline mode. This is the shell to use if you wanted to run something like lynx or mutt etc. M-x eshell is a shell written in emacs lisp. This is a very powerful shell if you know emacs lisp as you can write small bits of elisp and have them evaluated by the shell. However, it has som elimitations - for example, it doesn't handle redirection as well as normal shells and can give some unusual/unexpected results if you run something like a bash script that relies on redirection and piping of output/input etc. Despite these weaknesses, it can be a great little shell to hack around in because you get the power of elisp and you can write new eshell funcions easily (if you know elisp). I tend to use M-x shell and M-x eshell. However, I also tend to use built-in emacs facilities over running some other program in an emacs terminal. for example, using M-x man/M-x woman to browse man pages, using perldoc mode to work with perl PODs, usiing a native emacs mail reader rather than mutt, using M-x procd to examine processes rather than top etc Tim -- tcross (at) rapttech dot com dot au