[net.emacs] Why emacs?

dorner@uiucuxc.CSO.UIUC.EDU (10/01/86)

I've used lots of editors, even wrote one once.  I've been using vi for
some time now, and like it.  But I hear such fanatical comments from
emacs users that my curiosity has been piqued.  I tried it once, but when
I found out that I had to use control characters to get around, I backed 
out in a hurry.

So, emacs evangelists, convert me.  Tell me why emacs is so nifty.

---

Steve Dorner
University of Illinois Computing Services Office
dorner@uiucuxc.CSO.UIUC.EDU, ihnp4!cbosgd!uiucdcs!uxc!dorner

I am the OFFICIAL SPOKESMAN not only of UIUC, but of the State of Illinois,
The President of the United States, and the EMPEROR of the WORLD.  All my
decisions are final.

wohler@sri-spam.ARPA (Bill Wohler) (10/03/86)

Distribution:

[oops, this got long so i put in section headers. they are:
INTRO, PROGRAMMING, TEXT, MISC  --bw]

INTRO

one gentleman (in net.emacs) asked why we use emacs, but
there are many out there who use other editors who might
wonder about emacs.

i used vi at the university of california at davis where we
pronounced it 'vi' with a long i, and i continued to be a
staunch vi proponent here at sri.  well, i was introduced to
the mh interface that gnuemacs offered and found it the
best way to read mail, but continued to use vi for all other
purposes.

several months went by and i still refused to use emacs
for anything but mail, but by then i was becoming familiar
with it and the bonds were breaking.  having gotten used to
the control characters and the stateless mode, i began
exploring it further.

in the following discussion i use the terms "window" and
"buffer" loosely.  if you're not familiar with emacs, a
buffer contains text and is not necessarily visable, and a
window is what you can see, and displays one of the current
buffers.

PROGRAMMING

i found out about the c mode and how helpful it was.  you
could set variables so that the c-mode would emulate your
coding style.  for example, a tab indents the current line
properly.  a line feed acts like vi in "autoindent" mode,
except that if the next line needs to be indented it will do
that for you, or if you just typed a '}' it'll put the } in
the right place (that is, you don't have to hit ^D to back
up) or if you're in the middle of an argument list when you
cause a line break, it'll place you in the right place under
the previous line. 

emacs compiles your code for you, putting the errors in a
separate window. you can then step through the errors and
emacs will put your cursor on the same line as the current
error.  and if the error was in another file, it'll open up
that other file and place it in a new window if necessary.

oh, then you add or remove a nested section of code.  in vi
you would use a careful use of ">" or "<".  emacs can do
this plus a little more.  i missed the 'f' option in vi
until i wrote a quickie function in lisp to do it for me,
and i don't know much lisp.  so far, i have all the
functionality of vi in emacs plus some more.

emacs uses tags also.

READING MAIL

emacs has its own mailer but i have not used it.  it's
probably very good.  i got turned onto mh when i first got
here and so it was natural for me to use the emacs
interface to mh.  this interface initially provides a small
window with the message headers (as in berkeley mail) and
another window for reading messages.  for purely browsing
through mail, it is similar to berkeley mail except that the
mail headers remain in the small window so that you can
immediately delete messages based on the subject.

the single thing which gives this mailer and advantage over
all other mailers is when you reply to messages.  the
message you are replying to is displayed in another window
so that you can grab sections of it to include in your
message.  you don't have to include the whole message and
then delete what you don't want.  there are numerous other
little details that i also use during the course of the day
that help me send and read my mail faster and keep it better
organized.

WRITING TEXT

it has the automatic wraparound that vi has (set wrapmargin)
but unlike vi, filling is built in. with a couple of
keystrokes, you can fill a region of text with ragged or
straight margins instantly.  after using this feature, using
!Gfmt or !Gnroff in vi is intolerably slow.

you can check the spelling of a window as well.  instead of
generating a list of badly spelled words and manually
searching a replacing them, emacs will put your cursor at the
first misspelled word, allow you to fix the misspelling (and
then fix it throughout the text), and then place your cursor
at the next misspelling.

MISCELLANIOUS FEATURES

you can run regions of text through unix pipes, or put
the output of the shell command in a window, or create a
window and run a shell in it, which can then be used later,
like using script(1).

emacs is used slightly differently than vi.  rather than
calling up vi every time you need to edit a file, you start
up a emacs process and leave it there, finding files as
necessary.  after a while you'll have many different buffers
containing files that you use a lot--switching buffers is
quick and easy.

you use registers to store text in vi.  you use buffers in
emacs.  you can obtain your last 10 deletions in vi. same in
emacs, but you are not limited to the last 10 kills.  undo?
you've got only one in vi, but you can undo the last n
changes in emacs--i have not yet hit the value of 'n'.  you
can quickly read man pages inside emacs, browse through
directories and files, remap keys to your liking, create
abbreviations.  if you feel the need, you can write lisp
functions and then bind them to keys to customize your
editing.  i've seen lisp functions to visually play the
towers of hanoi problem inside emacs, convert one table of
data to a  differently formatted table--adding and
multiplying two columns to generate a new column while he
was at it. that's flexibility!

needless to say, i now live inside my emacs window since
it can do so much for me.  i guess that's what prompted
someone to create an icon (for suns) which is an image of a
kitchen sink!

DISADVANTAGES

it is bigger and depends on library files during run time.
there is a shorter learning curve for getting basic editing
done, but then it does take longer to get a lot of finer
details mastered.  there are several emacs out there and you
have to decide which one to use.  it starts up slightly
slower than vi (some emacs are worse than others in this
regard). hence, you usually leave a emacs process running as
mentioned above.  some people don't need the functionality,
or the extensibility of emacs.

this list is hardly exhaustive, but has touched upon the
reasons why i switched.  i resisted emacs for such a long time,
so i find it surprising that i completely ignore vi now, and
that is why i wrote this piece.

i used the generic "emacs" throughout the text.  i use
gnuemacs and some of the functionality mentioned above is
not found in other emacses.  i easily converted many
ccaemacs users to gnuemacs. it took a little longer to
convert a gosling emacs user, but he saw the benefits of
gnuemacs and simply changed the bindings of the keys to what
he was used to.  can't do that in vi.

--b "i saw the light" w

ps.  i included newsgroup general for the mail information,
and net.lang for the c-mode information.  my apologies if you
don't think that this message was appropriate for this
newgroup. 

mujica@neptune.cs.ucla.edu (Sergio Mujica) (10/03/86)

In article <7726@sri-spam.ARPA> wohler@sri-spam.UUCP (Bill Wohler) writes:
>
>INTRO
>
>one gentleman (in net.emacs) asked why we use emacs, but
>there are many out there who use other editors who might
>wonder about emacs.
>
>i used vi at the university of california at davis where we
>pronounced it 'vi' with a long i, and i continued to be a
>staunch vi proponent here at sri.  well, i was introduced to
>the mh interface that gnuemacs offered and found it the
>best way to read mail, but continued to use vi for all other
>purposes.
>

I used to be very fond of vi for a long time,  then started using
emacs for the same reasons that Bill Wohler points out.

I learned how to use it,  and started tuning details, like writing
small pieces of lisp code to make life easier.

But... I missed the orthogonality and simple design of vi. I also
found that I felt more comfortable using unix to do my things.

I decided that emacs was very powerful a tool, maybe too much
even for complex tasks.  Overwhelmingly powerful!

Sooo... I returned to vi.  Using emacs for some 8 months was
very interesting, I had  a lot of fun and learned many things.
But I am using vi.


----
Sergio Mujica,   	   Computer Science Department, UCLA
mujica@cs.ucla.edu   ...!{sdcrdcf,ihnp4,trwspp,ucbvax}!ucla-cs!mujica

bogstad@brl-smoke.ARPA (William Bogstad ) (10/08/86)

In article <21600007@uiucuxc> dorner@uiucuxc.CSO.UIUC.EDU writes:
>
>I've used lots of editors, even wrote one once.  I've been using vi for
>some time now, and like it.  But I hear such fanatical comments from
>emacs users that my curiosity has been piqued.  I tried it once, but when
>I found out that I had to use control characters to get around, I backed 
>out in a hurry.
>
>So, emacs evangelists, convert me.  Tell me why emacs is so nifty.

	Others will probably go into all of emacs features, but I would
like to stress what I found important.  I will start with some personal
history.  I used a modified ed for close to two years and managed to get
quite a bit done.  I probably could have used vi, but on a PDP 11/23 it
would have been pretty bad.

	Then I started to program on VAXes and of course I wanted to use
a full screen editor.  I started using vi and continued for a couple of
months.  Before mastering vi, a friend introduced me to emacs.  (I still
haven't mastered vi.)

	The feature that really attracted me was the multiple windows.
I have a tendency to want to look at related code at the same time and I
hate to fight with printouts.  The 'compile' commands which would catch
the error messages from the compiler and parse them was also a nice
feature.  The automatic C indentation mode is very nice.  This, however,
can be very obnoxious if it doesn't match your coding style.

	I have backed off from emacs a bit now and I currently use the
jove editor.  It has most of the standard emacs commands, but it doesn't
have a built-in programming language for writting functions.  On systems
where I have compared it, it takes up no more space then vi and gives
you all of the features mentioned above.  It is also useable on systems
without job control unlike full blown versions of emacs.

	I should probably note that I do still go back to ed on
occassion when I am doing some really heavy text massaging.  Usually,
this is something which should be better left to sed.  I avoid using vi
whenever possible.

				Bill Bogstad
				bogstad@hopkins-eecs-bravo.arpa

page@ulowell.UUCP (Bob Page) (10/11/86)

In article <21600007@uiucuxc> dorner@uiucuxc.CSO.UIUC.EDU writes:
>
>I've used lots of editors, even wrote one once.  I've been using vi for
>some time now, and like it.
>
>So, emacs evangelists, convert me.  Tell me why emacs is so nifty.

I also backed out of emacs when I learned I had to use control keys.
Then a few years later I was doing heavy switching between VMS and
UNIX all day long - sometimes in editors on each system at the same
time.  EDT and vi don't understand each other's commands!  I was
going crazy, and my productivity went downhill.

I now use VMS and UNIX systems, along with Amiga, DG's AOS, Symbolics,
Apollo and more -- but just have to deal with one text editor.  Emacs.

Multiple windows, buffers and command customization are a plus too.
And you know what?  I have my cursor keys bound to do what you'd
expect - and never use the cursor keys.  They're too far away!  The
control key is right here.

..Bob



-- 
UUCP: wanginst!ulowell!page	Bob Page, U of Lowell CS Dept
VOX:  +1 617 452 5000 x2233	Lowell MA 01854 USA

hans@erisun.UUCP (Hans J. Albertsson) (10/12/86)

[]

1) Emacs is multi-buffer + multi-window. Edit several texts in one single
   editor instance.

2) Modes are per buffer, so diverse editing related jobs can be handled
   in parallell.

3) Emacs runs subprocesses with I/O thru special mode edit buffers, which
   makes for nice program development support, or WYSIWIG simulation
   even for nroff/troff. At least one commercial Prolog uses emacs as
   a development environment, as does/did SUN Common Lisp. Comfortable,
   and travels well between terminal types.

4) Emacs-like editors exist for the most diverse systems, and has been
   around for a while, now.

5) On an ASCII terminal, there exists no better window-system emulator.

However, even I, who really find vi unbearable with it's dual modes, 
know one or two things that vi does better. Such as the implicit macro
in ".". However, try and ADD a word completion mode using current buffer
as abbreviation data base to vi... So:

6) Emacs is easily user extensible.