Sacha <no@address.spam> wrote:
+---------------
| "Tim Bradshaw" <tfb+google@tfeb.org> wrote in message
| > Emacs is like a guitar: imperfect, hard to learn, but you can
| > do great things with it. ...
|
| Agreed, that's why i choose to easy route...learn the keystrokes
| while not being stuck with emacs itself... When i'll feel more
| comfortable, maybe i'll switch... I just feel it is pretty bad that
| we have to work with this ages old tool. Lisp is supposedly one of
| the best languages around, it's sad we have to overcome the emacs
| barrier in order to use it effectively.
+---------------
Well, actually, you don't!! Really. Despite the cries of "Heretic!
Heretic! Burn the heretic!" you'll probably hear in response to
this post, it is *NOT* necessary to use Emacs to use Common Lisp
[or Scheme] effectively. I started using Scheme in 1992 and had
more-or-less completely switched to Common Lisp by 2000 and I
*still* use only Vi[1], and have written several medium-sized
production apps and a *host* of small tools in both Scheme and
Common Lisp without *ever* feeling that my editing environment
was in any way a hindrance. All you really need is an editor that:
- You're comfortable & fluent with, so that thinking about editing
doesn't interfere with thinking about *programming*;
- Has at least basic parenthesis matching[2];
- Has either language-sensitive indenting (Emacs) *OR* standard
text-based auto-indent (Vi) [that is, so that when you type an
"Enter" at the end of an indented line the editor starts the next
line under the first non-blank character of the previous line],
plus some way to shift a bunch of lines right or left by one column.
(It's *nice* if you can shift a whole s-expr[3], or shift by more
than one column at a time, but not necessary.)
Everything else is just gravy.[4]
If you want to learn Lisp, then LEARN LISP!! Use whatever editor you
already know, pasting code from an editor buffer into a Lisp REPL
[or do an editor "Save" and then type (LOAD "filename") in the REPL,
whichever makes more sense depending on how much has changed]. But
*don't* let learning Emacs (or Slime) slow you down! You *CAN*
learn Lisp and "use it effectively" without it. Really, you can.
Then, assuming that you become convinced that Lisp is for you, ;-}
if you later want to see whether Emacs/Slime will *further*
improve your productivity, well, then give it a try.
But *DON'T* blame Emacs for lack of success with Lisp, either
at first or later. That's just not right.
-Rob
[1] Not for lack of trying, multiple times, to switch to Emacs.
My fingers simply do *not* "chord" well -- sorry 'bout that.
And I *like* "moded" editors such as TECO, Bravo, and Vi
where lower-case characters are used for editing commands
[except in insert mode], since I tend to alternate between
fairly long periods of thinking followed by fairly long periods
of uninterrupted "inserting" followed by moderate periods of
"editing"... and then some testing & more thinking. But YMMV.
[2] Vi has matching-paren flashing *and* the ability to jump
back & forth between matching parens, as well as using such
"motion" indications as a selector for other operations.
E.g., when sitting on a paren, "d%" deletes the whole s-expr
[which you can then paste in somewhere else with "p" or "P"].
Even better, if you're sitting on a space *before* an open paren,
"d%" deletes the space, too, so you can swap two s-exprs easily.
Changing (FOO (BAR 35) (BAZ 53 21)) into (FOO (BAZ 53 21) (BAR 35))
takes just 5 keystrokes: "d%l%p". Longer than Meta-Ctrl-whatever
in Emacs, but not *that* much longer...
[3] Vi can do that. Assuming you've set your "shift width" to 1
(":se sw=1"), which IMHO is the only sane value when coding
Lisp/Scheme in Vi, then at a paren ">%" will shift all of the
lines containing the indicated s-expr right one column, and
>%...." will shift them right 5. Ditto "<%" and "<%....", etc.
[4] Well, you probably also need some kind of bit-mapped desktop
that at least lets you keep several windows open at once
(including an HTTP browser or two) and lets you cut&paste
easily between windows -- say, X Windows with even the *dumbest*
window manager, e.g., "twm" [which is what I use]. Personally,
I insist on "focus follows mouse" [as opposed to "click to focus"]
*without* "raise window on focus", which is why I don't like
MS Windows very much. [Somebody once said you can tweak it to
the prefs I like, but I never could figure out how without
breaking a bunch of ither stuff.]
Having a separate window open to a REPL into which you can
type APROPOS and DESCRIBE and INSPECT and the occasional bit
of code [or a LOAD or ASDF command] is pretty necessary, too.
-----
Rob Warnock <rpw3@rpw3.org>
627 26th Avenue <URL:http://rpw3.org/>
San Mateo, CA 94403 (650)572-2607