[OS X Emacs] How to efficiently work with shells/term? drag & drop, history, several instances

Jonathan Groll lists at groll.co.za
Thu Sep 22 08:54:25 EDT 2011


On Thu, 22 Sep 2011 12:04:38 +0000, "Hofert  Jan Marius" <marius.hofert at math.ethz.ch> wrote:

> > This hint is questionable.  There is usually no need to start X11 for R, given that one can open a graphics window with quartz().  I only need X when R insists on firing up a Tcl/Tk UI, such as when installing packages and selecting mirror servers from within R.

Sorry about that. Never used R myself, just recall reading that bit in
the FAQ, and I thought since it's in the FAQ it must be a common
problem.

At one point I suspected there was a path issue within the term, which
I've seen myself. Does not seem to be the case here!


[...]

> If I use: "M-x term" none of the commands work, no ls, no ssh, no R,
> no cd, nothing. I always get the saming warning (as described). Is
> there something wrong? 

They should. What shell do you specify with M-x term - /bin/bash? 

Also, as a point of diagnosis, can you start Emacs without
customizations? For Aquamacs see:

http://aquamacs.org/reporting-bugs.shtml (Before this one gets me into
trouble, I don't know if the advice given here works, don't have a mac
nearby to test! But we are looking at the equivalent of emacs -q)
> 
> In particular, I would like to know:
> (4) what is exactly the difference between M-x shell and M-x term?

M-x shell is a 'different' shell written in elisp. It isn't bash or
whatever you're used to. And since it is written in elisp it also
works on architectures such as windows.

As the manual says about the Emacs Terminal Emulator: "This creates
(or reuses) a buffer named `*terminal*', and runs a subshell with
input coming from your keyboard, and output going to that buffer." You
can select what subshell you run in M-x term - it doesn't have to be
bash!

> (5) The problem described in (2) [the cursor moving], does this
> happen for others, too, or am I the only one experiencing this?

The terminal emulator has two modes - term mode and char mode. In term
mode the arrow keys (at least under bash) do what you think they
should - navigate command history etc. In char mode they move the
cursor in the buffer.

Cheers,
Jonathan
--
jjg: Jonathan J. Groll : groll co za
has_one { :blog => "http://bloggroll.com" }
Sent from my computer device which runs on free software



More information about the MacOSX-Emacs mailing list