LWN.net Logo

Emacs 22 on April 23

Emacs 22 on April 23

Posted Apr 10, 2007 18:51 UTC (Tue) by tnoo (subscriber, #20427)
In reply to: Emacs 22 on April 23 by smitty_one_each
Parent article: Emacs 22 on April 23

vi? It seems that the flame wars are as old as computing.

(funny cartoon here http://www.io.com/~dierdorf/emacsvi.html)


(Log in to post comments)

Emacs 22 on April 23

Posted Apr 10, 2007 20:14 UTC (Tue) by josh (subscriber, #17465) [Link]

That might hold true for the original vi, and some people do still use that, but most vi users now use one of the improved variants of vi, such as vim. One of the two main emacs editors in common use (GNU Emacs) comes from the original emacs. (I don't know whether GNU Emacs or XEmacs has more users.)

Emacs 22 on April 23

Posted Apr 10, 2007 20:50 UTC (Tue) by atai (subscriber, #10977) [Link]

Modern Emacs might conceptually come from the old Emacs (due to the inventor being Richard Stallman) but there was no continuity in the code (the current GNU Emacs was a rewrite by RMS in C)

Emacs 22 on April 23

Posted Apr 10, 2007 22:51 UTC (Tue) by JoeBuck (subscriber, #2330) [Link]

XEmacs is just a fork of GNU Emacs, that happened back in the version 18 days. It has plenty of RMS's code in it.

viper-mode

Posted Apr 10, 2007 23:47 UTC (Tue) by ncm (subscriber, #165) [Link]

This might be an appropriate place to mention viper-mode, which is a major mode (note, "mode"; emacs is very far from "modeless", by any definition) that implements Vi within Emacs. Since the command sets are almost disjoint, viper-mode is Vi and Emacs at the same time. That is, in viper-mode, almost all Vi and Emacs commands just work, with no mode switching needed. In practice that means that in addition to Emacs's regular command mode, entered with Alt-X, you get a Vi command mode, entered with the usual ESC.

Viper-mode in Emacs 22 works fine. I've been using it for 6 months in the beta releases.

viper-mode

Posted Apr 11, 2007 0:51 UTC (Wed) by bronson (subscriber, #4806) [Link]

In addition, there's a collaborative effort to create a vim-like mode for Emacs: http://www.emacswiki.org/cgi-bin/wiki/vimpulse.el

It's basically vi plus a few of the features that make vim really nice to use.

viper-mode

Posted Apr 11, 2007 1:43 UTC (Wed) by jasonspiro (guest, #38047) [Link]

Scott, thanks for the plug and for pointing me to the it. :)

All: I maintain vimpulse. Have you tried it? How do you like its visual text selection mode (press the letter v to enable) and its other features? What could be improved?

Emacs modes

Posted Apr 11, 2007 8:08 UTC (Wed) by ldo (subscriber, #40946) [Link]

... emacs is very far from "modeless" ...

Which is why my .emacs contains the following item in its custom-set-variables list:

'(auto-mode-alist (quote (("" . fundamental-mode))) t)

That disables all the modal cruft, and lets me use it as a nice, simple editor.

Emacs modes

Posted Apr 11, 2007 8:52 UTC (Wed) by ncm (subscriber, #165) [Link]

What, with no way to do search-and-replace? I guess that's simple. But how do you open a file? Ctrl-X switches to an unnamed mode, and Ctrl-F after that switches to "minibuffer-mode", and then Enter switches back to edit mode.

"Modeless emacs" was always a transparent fiction, from back when "modeless" was equated to "good": "Emacs is obviously good, therefore it must be modeless", facts notwithstanding. ("Object-oriented" took over that linguistic niche a little later.)

But viper-mode is a pretty good mode, as modes go.

viper-mode

Posted Apr 23, 2007 19:51 UTC (Mon) by jibal (guest, #44844) [Link]

"emacs is very far from "modeless", by any definition"

There is no comparison between emacs' modes, which are explicitly specified by switching between buffers or turning modes on and off, and vi's bimodal editing where every keystroke has two radically different meanings that one is constantly switching between (if they're actually editing, and not just typing a lot of new text). emacs's modes are more akin to different programs having different menus, or different user interfaces -- operations are context-sensitive, which is perfectly reasonable. But vi's modes both operate in exactly the same context. As Bill Joy said (http://web.cecs.pdx.edu/~kirkenda/joy84.html):
"One of the good things about EMACS, though, is its programmability and the modelessness. Those are two ideas which never occurred to me."

viper-mode

Posted Apr 23, 2007 20:00 UTC (Mon) by jibal (guest, #44844) [Link]

Here's another quote from Bill Joy (http://www.theregister.co.uk/2003/09/11/bill_joys_greates...) that is very revealing about its design, and the appropriateness of that design to the tasks at hand:

"It was really hard to do because you've got to remember that I was trying to make it usable over a 300 baud modem. That's also the reason you have all these funny commands. It just barely worked to use a screen editor over a modem. It was just barely fast enough. A 1200 baud modem was an upgrade. 1200 baud now is pretty slow.

9600 baud is faster than you can read. 1200 baud is way slower. So the editor was optimized so that you could edit and feel productive when it was painting slower than you could think. Now that computers are so much faster than you can think, nobody understands this anymore.

The people doing Emacs were sitting in labs at MIT with what were essentially fibre-channel links to the host, in contemporary terms. They were working on a PDP-10, which was a huge machine by comparison, with infinitely fast screens.

So they could have funny commands with the screen shimmering and all that, and meanwhile, I'm sitting at home in sort of World War II surplus housing at Berkeley with a modem and a terminal that can just barely get the cursor off the bottom line.

It was a world that is now extinct. People don't know that vi was written for a world that doesn't exist anymore - unless you decide to get a satellite phone and use it to connect to the Net at 2400 baud, in which case you'll realize that the Net is not usable at 2400 baud. It used to be perfectly usable at 1200 baud. But these days you can't use the Web at 2400 baud because the ads are 24KB."

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds