Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Taking the emacs plunge

by drewbie (Chaplain)
on Apr 26, 2002 at 19:02 UTC ( #162371=perlmeditation: print w/replies, xml ) Need Help??

Partly in response to the various threads I've seen recently here and on use.perl.org, and partly because many people much better programmers than I use it, I've decided to learn emacs. And more than the simple stuff I've learned to far - beginning/end of line, cut, paste, etc. I'd like to learn about the features like CVS integration, debugging, etc. And Emacs "culture" & philosophy. To this end I seek knowledge on several questions:

  1. Which version/flavor of emacs should I use? X vs. non-X, 22.x vs 21.x, terminal mode vs. gui mode. What are the advantages and disadvantages of each? I develop primarily on Win2K although I hope to put together a Linux workstation soon, and run Linux + apache + mod_perl on the server side.
  2. Resources for learning emacs commands. This could include books, articles, communities, etc. I've briefly looked at the O'Reilly emacs book, but worried that it was too out of date. Any other books to start?
  3. Hints on where to start and any gotchas I can expect in my quest for knowledge.
  4. How much, if any lisp, will I need to learn? I don't currently know lisp, but I'm not opposed to putting another language on my resume.
  5. Any other tips, tricks, emacs settings that have helped you be more productive. After all, this is truly why I'm learning emacs - (hopefully) more productivity.

Thanks for your ideas. All thoughts are welcome, even if you tell me I'm crazy. :-)

Replies are listed 'Best First'.
Re: Taking the emacs plunge
by Elian (Parson) on Apr 26, 2002 at 19:20 UTC
    Go for the GUI version of emacs wherever you go. Being able to properly use the mouse is really nice when it comes to doing editing work, as opposed to straight code/text writing. The advantages of syntax coloring aren't to be overlooked either. (Even with as simple a thing as POD-mode, the coloring's nice)

    Being able to use emacs in a terminal environment's a good thing, but I'd look at it the same way I look at knowing terminal-mode vi--learn enough to get by if you need to in an emergency. (which is a good reason to learn basic vi, regardless of how you feel about it. It's available just about everywhere, and is about the lightest-weight editor you'll find for those "I'm editing config files at runlevel s with-just a bare root partition and no swap" times)

      Being able to properly use the mouse is really nice when it comes to doing editing work

      I agree with your statement, but I'd also like to be comfortable enough that I don't have to use the mouse. I'm going on the assumption that there are people who do not use a mouse, and that a mouse is not essential to emacs use. You touch on this in your next paragraph. And I assumed that syntax highlighting & parens matching are included. I really don't like living without those features.

      And I do know vi somewhat as well. There are tons of times when I need to quickly edit a config file and vi is the way to go. And one client is hosted on a RaQ whose load shoots up when I run cvs commands. I shudder to think that an emacs session would do to the poor box. ;-)

        I agree with your statement, but I'd also like to be comfortable enough that I don't have to use the mouse. I'm going on the assumption that there are people who do not use a mouse, and that a mouse is not essential to emacs use. You touch on this in your next paragraph. And I assumed that syntax highlighting & parens matching are included. I really don't like living without those features.

        Oh, I don't use the mouse for most things, but it's nice to have handy when you do need it. You do need a gui interface of some sort for syntax coloring to work, unless things have really changed recently. Which they might, this being emacs and all.

        Paren/brace/bracket matching works regardless of how you invoke emacs, so that'll be there however you use it, os you'll be fine there. (Though using it over slow lines is a pain. OTOH, nobody does emacs over 9600 baud links these days...)

        There isn't anything in emacs that requires mouse usage, so don't worry about that. There are things that the mouse makes easier, certainly, but it's not required.

      I haven't used a mouse in emacs since the first week I started. In the beginning I did for the left-mark, right-copy, middle-paste. But I got over that, especially once I figured out it was an X thing. On rare occasion I might use middle-paste, but C-y is more natural ;-)

      The only issue I've ever had with terminal emacs is that in some terminal emulators ^H/Delete/Backspace is borked, and you end up in the help system.

      --
      perl -pew "s/\b;([mnst])/'$1/g"

Re: Taking the emacs plunge
by belg4mit (Prior) on Apr 26, 2002 at 19:46 UTC
    >4.How much, if any lisp, will I need to learn?
    None, write your .emacs in Perl ;-)

    --
    perl -pew "s/\b;([mnst])/'$1/g"

      Excellent! Leave it to those crafty hackers to get perl into emacs. I should still probably get the equivalent of "Learning LISP" though. ;-)
        Honestly you don't need to know lisp unless you plan on writing your own modes (which I'm sure you could do with Perlmacs). Usually you're just setting various values, and loading a few modes.

        --
        perl -pew "s/\b;([mnst])/'$1/g"

Re: Taking the emacs plunge
by belg4mit (Prior) on Apr 26, 2002 at 19:56 UTC
Re: Taking the emacs plunge
by perrin (Chancellor) on Apr 26, 2002 at 21:44 UTC
    When I'm stuck on Win32, I always grab XEmacs (don't worry about versions, just get the latest). There is a nice summary of commands here which I usually tack up on the wall beside me. CPerl mode rocks.
Re: Taking the emacs plunge
by samtregar (Abbot) on Apr 27, 2002 at 04:00 UTC
    I suggest you pick up Learning GNU Emacs and work through the examples as you read it. There are other, slower and more painful ways to learn Emacs, but why bother? The book is great!

    And when you're ready to learn some Elisp, check out Writing GNU Emacs Extensions. Don't just buy some random "Learning LISP" book and try to apply it to Emacs. That will only make you into one unhappy Lisp-hater.

    -sam

      Don't just buy some random "Learning LISP" book and try to apply it to Emacs. That will only make you into one unhappy Lisp-hater.
      That's because Emacs lisp is a particularly horrible incarnation of lisp, the lack of lexical scoping can really get on your nerves if you try and do any serious programming with it.
Re: Taking the emacs plunge
by ariels (Curate) on Apr 27, 2002 at 08:13 UTC

    Most importantly: whichever version (Emacs or XEmacs) you end up using has a tutorial. The startup screen (when you start (X)Emacs specifying no file(s) to edit) tells you to try <samp>C-h t</samp> ("control-h, then t") to enter a tutorial.

    It's certainly old-fashioned (it won't even assume you have arrow keys on your keyboard), but it will teach you the basics of text editing on (X)Emacs.

    After that, the serious documentation lives mostly in info (<samp>C-h i</samp>); learn to use info, and you should be well on your way...

Re: Taking the emacs plunge
by Steve_p (Priest) on Apr 27, 2002 at 04:58 UTC
    I would suggest XEmacs for a few reasons. Mainly, its available for Win2k and Linux. While you are transitioning over, you can start using it now. Second, its a lot easier to use than terminal Emacs, so the learning curve won't be as steep. As I'm still learning it myself, I can't give you a lot of hints. What I can tell you is that you don't need to know Lisp. You should get along fine without knowing it.

      I personally favour XEmacs 21.4.x myself - the default settings seem a little nicer (i.e. cperl-mode setup) than in GNU Emacs, and the XEmacs package system is great.
      I use both GNU Emacs and XEmacs - they both do the job.

      I should point out that GNU Emacs (i.e. vanilla Emacs) is available for Linux too - most Linux distros will ship a version of GNU Emacs, and if not, then you can always get the source and build it yourself. (Redhat certainly offers both GNU Emacs and XEmacs).

      Secondly, you can use GNU Emacs under X and get nice windows, colours and all the other things you'd expect.
      On a similar vein, just because XEmacs has an X in the name, doesn't mean you can't use it in a terminal.

      Update: Oh, and as far as learning Lisp goes, understanding the very basics (that everything is a list and how functions are defined is probably enough) should allow you to understand the config file a little better, but there is no need to know any Lisp to be able to use (X)Emacs fluently.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlmeditation [id://162371]
Approved by particle
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (5)
As of 2022-01-26 22:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:












    Results (70 votes). Check out past polls.

    Notices?