Emacs as a programming environment

Obnoxious Math Grad Student weemba at garnet.berkeley.edu
Wed Aug 3 23:02:18 AEST 1988


I've always found these vi vs emacs wars pretty damned silly.  Too
many people making patently false claims about editors they don't
ever use.  Amazing, isn't it?

Me?  I'll use either one.  I can't for the life of me see what the
big religious deal is about this particular topic.

Anyway, no one has brought up one of the main attractions of Emacs:
it makes for a fine programming environment.  And I don't mean the
easy to use edit => compile => test => edit cycle built into Emacs.

I mean using Emacs Lisp itself for user-interface programming.  It's
something I've discovered in writing Gnews, my Emacs implementation
of rn/rrn: so many nit-picky little details that I used to do in C,
from declaring variables to using curses for window management to
documenting my code to recompiling after little changes, are often
quite trivial to do in Emacs Lisp.  In essence, Emacs Lisp is a
higher higher level language.

I haven't stopped writing C code, or Fortran for that matter, but
my preference now for all non-trivial user interaction is to create
specialized Emacs modes that will run C or Fortran code if necessary.

Let me mention three examples of how this worked in Gnews.  When I
simulated the goto-a-newsgroup command, it was completely trivial
to put in name completion, since Emacs comes with name completion.
When I simulated the index-a-newsgroup command, it was straight-
forward to add onto the index a menu-the-newsgroup mode.  And just
recently, I added the basics (forward and backward motion) of a
digest-reading mode to Gnews.  Within a day after I announced this
code's availability, a long-time Gnews-er contributed the reply
and followup code, plus lots more stuff that I haven't had time
to incorporate yet.

At the moment, you have to learn Emacs Lisp the hard way--there is
no manual.  But the first draft exists, and I believe a publishable
version will be ready in a few months.

(If you want a copy of Gnews, now up to version 1.9, it's about 300K
compressed tar, on ucbvax for anon FTP and osu-cis for anon UUCP.)

ucbvax!garnet!weemba	Matthew P Wiener/Brahms Gang/Berkeley CA 94720
"Nil sounds like a lot of kopins! I never got paid nil before!" --Groo



More information about the Comp.unix.questions mailing list