help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Terminal is not fully functional: from Shell of Emacs


From: Tim X
Subject: Re: Terminal is not fully functional: from Shell of Emacs
Date: Thu, 24 Sep 2009 20:07:42 +1000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux)

July <zell08v@orange.fr> 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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]