question about Linux console and emacs
dawgpolo at u.washington.edu
Tue Dec 17 23:16:12 PST 2002
These are good questions; screaming "somebody must have thought of
this before". And, thankfully, they did.
Jing Su wrote:
> Hello Everybody,
> I recently dug out my old pentium 120mhz laptop, and thought to
> myself... "Why buy a new notebook when an old one just might do the
> trick?" So, I dropped Slack into it. So far, the computer does
> great. I got my programmin' on and make'n on. But, because X is
> such a hog, on the 16mbs of ram, I'm running the whole thing in
> console mode only. No X.
You're on the right track. Who needs all those fancy-schmancy pictures?
> I'm using the virtual consoles to switch between my various tasks,
> which is working great, but with a few annoyances which I am unable
> to figure out. I've lived most of my life in X so hopefully someone
> can tell me where to look for answers. I've tried googlin', but I'm
> turning up blank... maybe I'm trying the wrong keywords....
> First, is there a way to increase the scroll-back buffer size for the
> Linux Console? And to have it preserved when I switch between the
> virtual terminals?
Get friendly with 'screen'. It rocks! It's basically an advanced window
manager for the console. Scrollback buffers as big as you want, and you
can search through them using regular expressions. Copy and paste
scrollback data with ease. Detach and re-attach screen sessions. Split
the console horizontally. Monitor windows for activity or silence.
Logging. Etc. It's released under the GPL.
There's also an article in The Linux Journal issue 105, January 2003,
called "Power Sessions with Screen", that serves as a useful
introduction to the tool.
> And Second, I've read several newsgroup messages which claim Emacs21
> supports console syntax highlighting. I've got Emacs21.2 built on
> the system, but font-locking still does nothing but dull gray. Anyone
> know what I'm missing? Google gives me nothing and the Emacs Wiki
> didn't help either. I know that Emacs will do syntax highlighting
> when you run it in an xterm window in console mode... But I'd like it
> to syntax highlight when I'm running straight on virtual terminal...
> no X.
> C'mon... all you emacs people out there.... I'm so desperate for
> some color in my code I've started looking into VIM.... help me out
> here. ;)
You're a hardcore programmer and you haven't chosen your editor [read
religon] yet? Anyway...
Vim, Emacs, and any other editor worth it's weight does this
extensively, even in the plain 'ol console. However, syntax highlighting
will add overhead that may be considerable given the system you describe.
As a side note, I bet you can still run X software. Check out the
ratpoison window manager. It's pretty lightweight and may suit your needs.
More information about the Linux