[Gllug] Terminals within Emacs

Nix nix at esperi.org.uk
Thu May 28 23:59:06 UTC 2009


On 27 May 2009, Stephen Nelson-Smith said:

> Those of you who favour Emacs as a work environment, could you share
> your experiences of using terminals / shells from within emacs?

At work I pretty much live in tshell (well, in XEmacs, but I think the
two are pretty much the same: it's term-mode with a few extra
keybindings for history searching and the like). I have dozens of
tshells open at any one time, in structured layouts (each environment
gets a frame of its own, with the shell at the top and the environment's
log streaming by in a tail -f'ed tshell at the bottom, locked in place
via set-window-dedicated-p so that popup windows, window splitting and
the like don't disturb it: I think dedicated windows may be an XEmacs-
only idea, though).

It helps that I don't use cursor-controlling programs much during
development (those I do use generally want to do cursor control within a
line, which even works in line mode), and spend a lot of time with
programs like Oracle's vile sqlplus and ugly broken shells that don't
implement any sort of history. So tshell fills in for me there.

> I've experimented with eshell, and never really got on with term.

I've done the opposite, stalling out on eshell because it's a) seemingly
stalled and b) seemingly almost entirely undocumented. It looks like a
nice idea but its only real utility in its current state of development
seems to be if you're stuck on Windows with no Cygwin, where its elisp
reimplementations of common commands may be helpful.

> I've also found Tramp to be a shocker if there's any network glitches
> - making the rest of my environment hang.

Oh yes, don't I know it. C-g is the thing, but it should really use
process sentinels. This tends to collide with bugs in some emacsen:
file-name-handlers and sentinels didn't get on in at least emacs
20.something and XEmacs 21.4.5--9 (my attempt to fix this in .8 was
a bit of a disaster and led to .9 being rushed out).

> So - any top hints on using terminals inside emacs?  At present I
> either run screen in a (gnome)terminal , and flick between emacs and
> that, or I run emacs under screen, and multiplex using screen.

I'll admit that emacs terminals are most useful when the rest of your
environment is kind of crappy or when you want to use elisp to automate
things in shells: so at work, doing things on dozens of boxes half of
which are running grotty Solarises without even bash, and using sqlplus
a lot, tshell is an absolute godsend.

At home, where I have decent consoles, I tend to use konsole a lot and X
selections: but even there, tshell sometimes comes in handy.
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list