Learning GNU Emacs, 3rd Edition
For a programmer, it is reasonable to question whether or not a word processor or graphical IDE is the right tool to edit a simple script or properties file. IDEs like Eclipse have become universals hammers, and to some of their users, any file containing text looks like a nail. Specific tasks are rarely handled well by universal tools, and text editing is no exception. Dave Thomas and Andy Hunt, authors of The Pragmatic Programmer and founders of the Pragmatic Bookshelf series, recommend that programmers adopt a text editor as an essential utility in their collection of appropriately-suited tools. The tried-and-true text editor is enjoying a renaissance of sorts, and one of the most extensible and customizable applications among text editors is the venerable GNU Emacs.
Tutorials and documentation for Emacs are abundant, but they often prove time-consuming and ineffective for actually learning Emacs. The printed version of the official GNU Emacs manual reads more like an application programming interface (API) document than an instructional guide. This book is a refreshing break from the documentation many have come to expect. Imagine having a group of leading experts on Emacs at your disposal to teach you how to use it in a conversational, consultative style. That is what has been bundled into this book.
The extensibility of Emacs is considered both a key strength and a confusing weakness of the application. The Emacs community has created all sorts of additional capabilities for Emacs, ranging from the impressive to the absurd. The authors have done well to judiciously select which Emacs capabilities to cover. For example, while Emacs does have the capability to function as an email client, other applications have long superseded its ability. The authors have chosen not to cover this topic, and instead devote the available space to learning Emacs' core functionality -- powerful, efficient text editing.
This edition of the book uses the space gained by the removal of esoteric topics to flesh out areas of more common interest. Peripheral areas of Emacs, such as compatibility modes for programming languages (other than Java and Perl), have been left for the user to research after gaining a solid foundation on Emacs as editor and work environment. Integration with the major version control systems has been expanded to include Subversion alongside the age-old standards CVS, RCS, and SCCS. Coverage of support for Java and Perl has also improved, as well as sections for editing HTML and XML. Users wanting to tap into the power of Lisp programming for Emacs should find the coverage satisfying as well.
The pace of the material is comfortable, and the order in which topics are introduced allows the user to progress smoothly through the book. Users with some experience can skip past the first three chapters, but would be advised to read through them, particularly those who are self-taught (which applies to most Emacs users). Given the amount of time the average user spends in Emacs, picking up one or two time-saving shortcuts would be well worth an investment of a few hours. Instructions are given in a way that reflects the fact that there are multiple ways to achieve the same outcome; the authors do not attempt to foist "the only way" to accomplish something upon the reader. Some readers will find that bothersome, desiring instead a simple, straightforward heuristic for performing a task. However, the typical users of Emacs tend to be people who embrace the fact that the world is not a simple, straightforward abstraction. The book reflects the authors' awareness of this nuance.
Perhaps the most distinguishing feature of this book is the chapter devoted to the use of Emacs on different platforms. Unix, Windows and Mac OS X users receive equal acknowledgment. The precautions and insights regarding subtle differences in Emacs when used on particular platforms can reduce users' frustration when getting started.
The mnemonic devices and conventions used in the book allow users to
commit useful keyboard commands to memory. The memorization is further
solidified by the exercises sprinkled appropriately through each
chapter. Readers do not go for very many pages before it is time to be
at the keyboard again, harnessing the power of muscle memory to
reinforce the material presented. Those who spend any time at a shell
prompt or in console applications will find that their new mastery of
Emacs keyboard shortcuts translates into increased proficiency with
command-line operations as well.
...doing just what I just did? I mean, just once?
Vi would I want to learn emacs????
I've been using vi for over 20 years. From time to time, I have tried to learn emacs (seeing the benefits) but the learning curve seems so steep, relative to just sticking with the statuis quote. Short of taking a couple of months off to focus on this extensiveley, what's the best way?
"I'd rather be a lightning rod than a seismometer." -Ken Kesey
jedi@localhost# vim slashdot_post
:wq
i
I use Vim you insensitive clod!
<ESC>
How about teco?
Does it have a teco mode?
A feeling of having made the same mistake before: Deja Foobar
I have noticed when I use Emacs for extended periods of time my right hand hurts at the end of the day.
I upgraded to a Microsoft Wireless Comfort Keyboard to try and aleviate the problem but it doesn't seem to be helping all that much.
Any suggestions from the Slashdot crowd. Are their any emacs friendly keyboards?
This review is amazing!
I haven't been this excited since Slashdot's review of "Learning GNU Emacs, 2nd Edition".
I'm a big tall mofo.
But given Emacs' startup time, you're forgiven.
It's like this:
Vi, vi vould I vant to learn emacs????
So, you can write a macro that takes the specs, emails them to India where the code is written, emails the code back to you, and then you take credit for it!
Evil people don't think they're evil. - George Lucas, Making of Ep III
My fingers are connected to my brina, I swear.
"I'd rather be a lightning rod than a seismometer." -Ken Kesey
Intersting the author appears to be presenting the "atheist" point of view, into a subject the stirs religious rants amongst the editor's loyalist.
What I'd like to find and or write is a good PHP/HTML mode for emacs, or even a CPAN/CTAN clone for emacs modes and scripts.
Apocalypse Cancelled, Sorry, No Ticket Refunds
The GNU Emacs Manual available for free at http://www.gnu.org/software/emacs/manual/ is excellent. Printed versions are available too.
Emacs also comes with a built-in tutorial that is a good interactive introduction to Emacs.
If you are considering learning Emacs, yes, it can seem like an intimidating task. The interface and commands are nothing like what people are used to today. But it is certainly worth the effort learning Emacs and getting used to it.
Is anyone ever sure what it is? It's been called a text editor, an e-mail application, an IDE, and even a web browser. Is there something that Emacs can't do?
VIM is EMACS done right!
All I want to know is how to exit this piece of crap so I can go back to using Vi
echo "alias emacs='vim'">>.bashrc
"Instructions are given in a way that reflects the fact that there are multiple ways to achieve the same outcome; the authors do not attempt to foist "the only way" to accomplish something upon the reader."
Do the authors discuss the relative benefits and drawbacks of each method? Do they discuss when it is and isn't appropriate for each? More info on this would be helpful.
"Readers do not go for very many pages before it is time to be at the keyboard again, harnessing the power of muscle memory to reinforce the material presented."
This is not muscle memory. This can be called learning through use. If the reader were to repeat the intended action 5,000 times, then maybe it could be called muscle memory.
My impression from the review is that the book will:
Give me the basics of Emacs use, and how they differ sometimes on different platforms;
Give me mnemonics to memorize keyboard shortcuts;
Show me multiple ways of doing some things;
Show me how to use basic Emacs with different languages, in some common situations.
So, my understanding from reading the review is that this is an fairly thorough introduction to Emac use that is easy to understand and doesn't bother with extraneous material.
Am I off base here?
"Trolls they were, but filled with the evil will of their master: a fell race..." -- J.R.R. Tolkien on Olog-hai
I like Emacs and its brethren, however, I don't do software development in Emacs anymore. Full blown IDEs like Eclipse are really worth the power, especially since they are able to semantically understand source code.
However, when I just need to do some basic config file editing I use Jove which is a scaled down version of Emacs that has the same keys as Emacs but loads as quickly as vi.
Emacs works great though when I have to interact in a complex way with the shell. For instance, I find it very useful when used in conjunction with command line SQL clients for Postgres, Mysql, or Oracle. The history and multiple command buffers are great for working with these command line clients. When I work with Oracle DBAs they are often impressed with how powerfully I can use SQLPlus from inside of Emacs.
I learned emacs in school, but by far the most helpful thing was the PDF reference card I printed up and carried with me. You can get the emacs card at http://refcards.com/
Physicists do it with a big bang!
Emacs is a great operating system, but it needs a better text editor.
"Live Free or Die." Don't like it? Then keep out of the USA
534 pages, 437 of which contain a table of all the keyboard shortcuts.
Save yourself $13.58 by buying the book here: Learning GNU Emacs. And if you use the "secret" A9.com discount, you can save an extra 1.57%!
Arr! Ye be right young scallywag! This post be not of topicalness, nary is it flamebait!
"Obscenity is the crutch of the inarticulate motherfucker." - cloak42
..and they are just as much in a twist, it seems.
True confidence comes not from realising you are as good as your peers, but that your peers are as bad as you are.
..yet I hardly ever use it.
I used to use Emacs for development, vi for sysadmin, but once I discovered Vim, I've started using Emacs less and less for dev, except when hacking Lisp (using SLIME.. you just can't do Lisp effectively without an editor at least as powerful as Emacs).
I can really appreciate Emacs, and I love Lisp (being able to code some quick Lisp right in the middle of an email reply is pretty damn cool for instance), but I just don't *need* that kind of flexibility. And the lack of consistency with Meta keys is frustrating (on my Mac, Carbon Emacs uses command, the terminal uses option, but on other machines I have to fall back on Esc).
I noticed the new Emacs has a built-in spreadsheet, by the way (M-x ses-mode). It's actually pretty cool (the cells are Lisp expressions, and the code is checked for dangerous operations before being excecuted). It's also a sign that maybe Emacs is a little TOO flexible???
Anyway, I'm not sure the point of this post, except that everybody should at least give Emacs a try.
Dude: "You have to leave now!"
Stallman: "Do you know who I am ? I made EMACS!!"
Dude: "I don't care. I use vi."
I loved using pico & nano until I found wonderful jed. =]
Would that be Max?
Ignore this signature. By order.
All I know about Emacs is that all the Emacs books are in the MAC/Apple section of my local Barnes and Noble.
So it must be a MAC thing, and since I use Windows...
"Live Free or Die." Don't like it? Then keep out of the USA
Well played, dunandgroup. I like the subtle way you substituted your own Amazon-whoring referral link where the original quote included the following link to "our vi book":
http://www.oreilly.com/catalog/vi6/
And you even got modded informative for posting a word-for-word copy of a single paragraph from the O'Reilly site! Well trolled!
I strictly use VI, and now I find out that Emacs stands for Editing MACroS, here I thought it stood for Eight Megs And Constantly Swapping. What an informative book!!!!11one!
GL HF!
Oh, so that's what ESR has been doing other than flaming MS recruiters with leet skills.
- the-code
http://geekz.co.uk/lovesraymond/archive/show-them
make 'em walk the planck.
Aye, but that'd be a mighty short walk (Planck scale is 1.6 x 10^-33 cm)
and they want their pirate voice back
Granted, most of the other editors do this, too. I've been using 'vi' variants for over 20 years, and have currently settled on VIM. Most of them have built-in help for parsing build output, but it just seems so much clunkier than when I watch an EMACS user do it.
What I'd really like is a book or HOWTO that's focused on effective software development using EMACS. The general-purpose "learning" books just don't get into that kind of narrow depth.
Schwab
Editor, A1-AAA AmeriCaptions
Mod me how you like, but proceeds go to F/OSS projects. Feel free to see what I donate to. Greasemonkey automatically rewrites my amazon links & I don't mind if you rewrite the referral either. (I also encourage direct donations to F/OSS projects.)
I tried emacs, but couldn't figure out how to exit! Why do they make it so hard?
:wq
I'll have the reviewer know that I use gnus for my email and news reading, and it's perfect for the task. I've still yet to find a program which has as many features, and yet to find one which is accessible over a command-line as well as through a GUI.
I run a shell in emacs (esc-x shell). It works great for searching through reams of command line job output and is slightly easier the piping to a file then searching through it (less, more etc...)
Its better than xterm -sl XYZ (set scroll lines to XYZ)
I used vi for 7 years and it took only 7 days to learn emacs. Since then, no turning back.. got it?
Yes! I read 2.0 and it is very good.
Hopefully I can get more out of 3.0 book.
Get this book, if you want to learn emacs. It's not a rocket science, but it is not less exiting one you learn it.
"Eight Megs And Constantly Swapping"
next to the "Over Eighty Megs And Constantly Swapping" of nowadays heavy-duty IDEs, Emacs is as feather-weigth as vi.
I don't feel like it...
*uses BBEdit*
"one time I had forgotten the key sequence to quit emacs"
That's not too hard:
Ctrl-X,Ctrl-C
Or the work around:
Ctrl-z (send it to the background)
ps|grep emacs
kill -9
Is it just me, or is the work around the only way to exit emacs when it's run inside cygwin?
There is no belief, however foolish, that will not gather its faithful adherents who will defend it to the death.-Asimov
Why buy a book when the solution to Emacs is right here:
get shovel, look shovel, e, e, dig, look, get cpu, look cpu, se, get
food, se, look bear, drop food, look, get key, sw, get bracelet, ne, nw,
nw, ne, ne, ne, e, look bins, w, w, put cpu in computer, type, toukmond,
robert, ls, uncompress paper.o.Z, exit, look paper, type, ftp gamma,
anonymous, toukmond, binary, send lamp.o, send shovel.o, send key.o, send
bracelet.o, send paper.o, quit, rlogin gamma, worms, get lamp, get
shovel, get key, get bracelet, get paper, e, n, e, drop shovel, drop key,
drop bracelet, drop paper, get weight, d, drop weight, nw, u, get
statuette, look statuette, get floppy, se, d, nw, ne, drop floppy, w, s,
e, turn dial clockwise, turn dial clockwise, turn dial clockwise, turn
dial counterclockwise, turn dial counterclockwise, turn dial
counterclockwise, w, n, e, get life, get shovel, get key, get bracelet,
get paper, get floppy, d, nw, u, se, d, nw, nw, s, s, s, s, put diamond
in chute, put bracelet in chute, s, get gold, e, e, s, d, look urinal,
put gold in urinal, flush, n, sleep, d, sw, e, u, dig, look, get
platinum, d, w, ne, u, s, put platinum in urinal, flush, n, d, sw, w, d,
e, get towel, look towel, d, s, s, s, look pc, put floppy in pc, reset, ,
dir, type foo.txt => xxx (combination), exit, n, n, n, n, n, u, look box,
put key in box, u, u, ne, ne, get axe, d, n, w, xxx (combination), cut
cable, exit, get key, e, n, get lamp, get license, get silver, w, put
silver in mail, n, n, e, e, e, e, e, get coins, get egg (in rooms 60 to
78), w, w, w, w, w, s, s, put egg in mail, put coins in mail, n, n, n, n,
e, e, e, e, e, look bus, in, s, s, s, w, w, w, w, w, nw, out, n, get
bone, e, e, get nitric, press switch, n, get glycerine, w, look bone, get
jar, get ruby, s, w, s, in, se, out, e, e, e, e, n, n, put nitric in jar,
put glycerine in jar, drop jar, in, n, n, put ruby in disposal, d, get
amethyst, u, put amethyst in disposal, d, ne, sw, u, u, w, w, s, w, s,
se, s, e, s, w, type, rlogin endgame, drop license, drop bone, drop key,
get diamond, get gold, get platinum, get amethyst, n, n, n, n, get bill,
n, get mona, s, drop bill, drop mona, drop diamond, drop gold, drop
platinum, drop amethyst, s, s, s, s, get silver, get egg, get coins, get
ruby, get bracelet, n, n, n, n, n, drop silver, drop egg, drop coins,
drop ruby, drop bracelet, n, quit,
I'm afraid I can't help you with Emacs Tetris.
Slashdot - Mutual Assured Discussion
Maybe I CAN do more stuff in this GNU Emacs thingy, and maybe I CAN use Vi bindings with it.
But I'm a stubborn guy who likes Notepad and Vi. I figured out Vi when I dl'ed the Windows version (and tried Cygwin's too). Didn't take me long. Emacs is one of those non-conformist, odd things (a right-facing mouse pointer? kill/yank?) that make me go "Huh?" like Jessica Simpson in a fish market...but I have the first edition (with "minor corrections") of this book, so I might learn it someday...
(As for Notepad, I just felt right at /home/gamekid with it from the get-go...)
You can hold down the "B" button for continuous firing.
I used gnu emacs all throughout and college and thought it was the best thing since sliced bread.
Then a boss introduced me to slickedit.
It is EXPENSIVE, but it is worth every penny.
Imagine the power of emacs, more power, and an elegant, easy interface.
No offense to anyone, just my two cents worth.
Steve
Ed, the Standard Text Editor, needs no such frivilous documentation!
Emacs shell mixes up too much command input and output to my taste...
Then most shells (and every program using the readline library) support the Ctrl-R function to search through command history, just like emacs.
For searching through command outputs there are terminal emulators like konsole that provide such functions...
Check man readline you'll be surprised how much of emacs functionality you have in your daily shell!
If you need a 500 page manual to use it, especially a text editor. If you can't type and save text without a manual, then what good is the software?
I haven't thought of anything clever to put here, but then again most of you haven't either.
Aquamacs (Carbon Emacs with settings to make it more Mac-like) cleans up a lot of that stuff. If you map meta to option, you can even use standard Mac keystrokes (command-S -> C-X C-S, command-Q -> C-X C-C, etc.). And SLIME works well under it - Aquamacs + Lisp-in-a-box without Emacs worked for me right out of the box (so to speak).
And, its default font is so much prettier...
To a Lisp hacker, XML is S-expressions in drag.
Emacs has a feature where it can save it's entire state to disk as an executable binary. If you subsequently invoke this binary, Emacs starts up extremely quickly with the restored state, bypassing the usual initialisation and dot-emacs processing. A very neat feature IMO.
one problem with non-visual editors, you hands can fly quite fast and all of a sudden ^cg^s^x-o oops, was that ^c-s^s^g^x-o or something else?
d spacespacespace^xs^xo!!
whoops, where is half my document gone? what button did I push?
I know, why don't I royally arse my document up by using undo/redo snaking biting its own tail HACK of an undo system.
Unable to work out how to do a real undo, they hacked it 100% using basic hackery of adding and removing key codes to a stack.
This means that when you undo, you are ADDING to your history.
This is like a brokwn temporal back button, becuase it doesn't actually work like one and can quickly destroy any semblance of data it held.
Anyway, Emacs is an ok editor, it does the job, it can be improved, and those proponents who like simple keyboard only editors, and like to ^xo!!^xo^xbTtabenter^sremove^s^sescqremoveenterad
that is fine - but there are even better ways.
So that is my rant, and I realise that flaming anything vi or emacs is dumb, so here is a bunos, M$ suck! yeah.
To confirm you're not a script,
please type the word in this image: culpable
random letters - if you are visually impaired, please email us at pater@slashdot.org
#hostfile 0.0.0.0 primidi.com 0.0.0.0 www.primidi.com 0.0.0.0 radio.weblogs.com
Yes, because typing L to go right, K to go up, J for down and H for left is so much more logical than ^F for forward, ^B for backward, ^N for the next line and ^P for the previous line! (I realize non-English speakers will be hosed either way.) Or that a linefeed character has a special status in vi, so you can't just delete it, you have to "join" the lines it separates. Or having to switch constantly between "navigating" and "inserting text," instead of just doing whichever you need to do right away.
This argument has been going on almost as long as the Catholic/Protestant thing. It seems once people get the habit of doing things one way, the other way is "strange" and "counterintuitive." Kind of like every other UI debate.
To answer the GP question: you can get by with about 10-15 basic commands. Open up emacs or xemacs, then type control-H followed by a t (no control). This gets you into the tutorial. Learn the basic navigation, editing and file commands. This will enable you to do all you need to do. Get comfortable with these first, because most of the special modes (like Dired, which lets you navigate directories) use the same keys for analogous operations). Also learn how to do M-x commands, like query-replace. After that, just learn new things a few at a time. The ones that are most useful to whatever you're doing will be the ones you remember.
It also helps to fix your keyboard. Try swapping cntl and caps lock if you're on a PC keyboard (the bane of emacs users), and using Alt as the meta key (great for the meta-based navigation).
I happen to like emacs as my text editor for text-type things like email and prose, but I use vim exclusively for editing config files. I'm an editor junky though, so I've tried just about every editor I could find out there. I love Jed because it's quicker than emacs to start up and has a nice LaTeX environment. My biggest complaint is how much work it takes to get a good console environment configured in order to write using accented characters. The combination of console, framebuffer, and text editor eccentricities drive me to a macintosh more often than not. This review seems like as a good a place as any to post a link to one of my creations, the Woodnotes Guide to Emacs for Writers, by yours truly. It covers using emacs for writing and editing text/fiction/prose, not for programming. Available in PDF at http://www.therandymon.com/papers/emacs-for-writer s.pdf (HTML version: http://www.therandymon.com/linux/woodnotes/emacswr iter/emacs-for-writers.html). A corresponding reference card (PDF) is at http://www.therandymon.com/papers/emacs-writers-ch eatsheet.pdf. Be kind - I'm on a limited bandwidth host and it's the beginning of the month.
If this were Usenet, I'd killfile the lot of you.
Yes that was the beginings of a flamewar.
Are they saying that GNU emacs (which has at least two mail clients, a news reader, an IRC client, debugger, shell-buffer and terminal emulator, Towers of Hanoi and goodness knows what else) is too universal to do one thing and do it well?
-- Ed Avis ed@membled.com
$ cat > /usr/src/myapp/myapp.c
... /* What else do you need? */
#include
int main () {
}
when drunk off my ass.
I invite everybody here on slashdot to try this. And you will see that it's true.
Sorry about the writing. Robot fingers, you know? Cliff Steele in DOOM PATROL #23
It's nice to see they have a download for the windows version of ispell to make M-$ work. I wrote the original M-$ code in TECO for the PDP-10 in 1981, and it used ISPELL (ITS SPELL) for ITS, the PDP-10 OS, which itself came from some other TOPS-10 SPELL program. The Lisp EMACS implementation is wholly new, though, and I had nothing to do with writing it. (My M-X command for the buffer was m-x Check Buffer Spelling, which I think is less awkward than M-X spell-buffer).
just type : man emacs
word.
The email client and many of the non programming features were covered in earlier editions.
You run GNU Emacs you're getting the fat lady, use vi and you've got her crazy sister.
MicroEmacs loads as quickly as vi and it is very powerful. I've tried others, but I keep coming back to what has always worked the best.
I am very easy to get along with, but I don't have time to waste being nice to people who are being stupid. -Theo
But what exactly is the incentive to learn Emacs anymore?
There used to be a set of alternate key bindings for emacs called HierarKeys. That was back in the late 80s...
It seems as though HierarKeys disappeared. I know that once I was faced with the normal Emacs key bindings, I quickly switched to vi.
GCHQ Quantum Insert installed. If only our tongues were made of glass, how much more careful we would be when we speak
On page 498 the headmaster dies.
If you didn't know Richard Stallman originally created emacs because vi was non-free propreitary software.
There's no reason why learning Emacs has to be intimidating, but it's misleading comments like this that make people believe that they don't understand Emacs.
Do us all a favor and compare the Emacs Manual Table of Contents with the Learning GNU Emacs Table of Contents.
The Emacs manual begins with an encyclopedic glossary of Emacs terms. 17 pages of terms, according to "Print Preview" in Firefox. Afterwards, you get index pages: a list of all the default keys, a list of all the default options (without even a link to a chapter explaining how to tweak an option), a command index (again, no info on how to run a command), a variable index (same deal), and a "concept index" full of links all over the manual. Finally you get to a very abstract section about how to interpret what's on the Screen, but still no information on how to actually use Emacs.
The O'Reilly book begins with "Emacs Basics", an easy-to-follow guide to the beginnings of Emacs. It looks more like the Emacs tutorial in a plain text format.
The Emacs "Manual" is a gigantic man page. It's not a "manual" in the sense that you're supposed to sit down and read it as a first introduction to Emacs. It's not a guide for people to read. It's a reference guide for you to go find information you already knew was there.
I'll admit, the built-in tutorial is a much better introduction, but it leaves you at the novice level. You know how to push the cursor around, but you know *nothing* about how to set options, what a variable is, how to set them, etc. To get from here to there requires hours of reading random info pages to try to find what you're looking for. Nothing like reading a clear manual.
Never recommend that a newbie to Emacs read the Emacs Manual. The Manual is for Intermediate users wishing to become Advanced. The Tutorial is for novices. For those wishing to get to the Intermediate level, this O'Reilly book isn't a half bad choice.
When I moderate, I only use "-1, Overrated". That way, I never get meta-moderated!
vi users, please, I beg you, read this: http://en.wikipedia.org/wiki/Mode_error
(For the record, I don't use emacs or vi anymore. They're both obnoxious in their own ways.)
But no other editor even comes close. If you are an electrical engineering using VHDL, you need EMACS.
I really wanted to give emacs a try, but it doesn't seem to be possible to edit utf-8 content, so i stick with eclipse.
For those who will fall for this: emacs was written in 1975, vi in 1976. So its very unlikely that emacs was written in response to vi, unless the MIT dudes had a time machine working. And vi was always free, it was written as part of BSD.
I would probably say that this book would be for advanced users.(and as well it should be)
When I checkout or buy a linux/bsd book, I am looking to get my hardward working. I am trying to get Xwindows up, or understand how to get an InkJet printer, or internal dhcp working to an outside DSL line. I see alot of "Beginner" linux books out there spending time on old *nix lore, shell scripting in VI, etc. Its nice to see that they are lumping all this emacs knowlege into an emacs book. now maybe they will keep emacs paper documentation out of (insert your favorite distro here)
Well, I use emacs at work, but I don't really like it. I've used VI a lot too. The diffrence is that emacs can be used as a real programmers editor (by definition a programmers editor needs a built in scripting language). I can make it do anything I can imagine and then bind those things to any key I want. In VI I end up writting lots of bash/perl/awk/etc scripts, and shelling out to perform some task. Plus the vi key bindings drive me crazy. I expect certain keys to behave certain ways. In emacs I just remap them to do what I think they should do.
In truth, As I pointed out in an erlier post, emacs lost a lot of its following to the IDE crowd. People who wanted a programmers editor discovered that editors tailor made for particular languages with built in utilities and real syntatic parsing were easier to use. Especially when they are bound to GUI toolkits like Borland C++ and Netbeans. Emacs was a general purpose editing enviroment that takes a bit of pain to setup as a programmers editor but is functional. The IDE's just tend to work, and the good ones have macro languages, and key rebinding just like emacs. I still run GDB from emacs, but the integration isn't nearly as nice as visual studio and its debugger, even with my hacks. With an IDE the fact that your editing or debugging your code is transparent. Given the choice I would bail from emacs and use a real IDE. Given my mostly unix enviroment (all the major unix's with some driver development mixed in), things like kdevelop still doesn't work for me. So I have emacs, and probably will, until I start doing more regular windows programming again, in which case I will use the IDE that comes with whatever development enviroment I'm using.
Oh, and I will continue to show off to vi users when they come in my office by doing fancy reformats and moving around our CVS repository like file boudaries and diffrent cvs versions don't exist. I know enough about vi to know what it can't do and its not hard to find things that are easier in emacs. My .emacs file will also continue to grow as I add cool new things I think up each day while programming my fingers off enough to produce more code than all our vi users here put together.
emacs - Escape Meta Alt Control Shift
Anyone who uses emacs should have their head examined. Fortunately, that's built in.
And finally: M-x yow
Intron: the portion of DNA which expresses nothing useful.
1. I still don't see an obvious way to use WebDAV. Since much of my development involves hacking Zope over DAV, this is absolutely critical. Is there a nice, robust WebDAV package for Emacs?
2. After several years, I still don't know how to set the Emacs fonts and hate the defaults on my system. Where, oh where, do I configure that? Do I need to hack .Xdefaults or is there something a little more click-and-drool friendly?
Dewey, what part of this looks like authorities should be involved?
At least they dont be nano or pico users
Good for him. What kind of idiot would post an Amazon link without a referral code? Some kind of Tibetan monk with a poverty vow?
What kind of idiot Slashdotter would want Amazon to keep the money rather than have it to go to a compadre?
Amazon sells every book known to man, so this isn't a sign of bias, it's a sign of intelligence.
My God, it's Full of Source!
OUTSIDE_IP=$(dig +short my.ip @outsideip.net)
I don't, because the referrer system is crap and I want them to stop it. It encourages spam referrer links.
I quit!
In the GNU/Linux world there are two major text editing programs: the minimalist vi (known in some implementations as elvis) and the maximalist emacs. I use emacs, which might be thought of as a thermonuclear word processor. It was created by Richard Stallman; enough said. It is written in Lisp, which is the only computer language that is beautiful. It is colossal, and yet it only edits straight ASCII text files, which is to say, no fonts, no boldface, no underlining. In other words, the engineer-hours that, in the case of Microsoft Word, were devoted to features like mail merge, and the ability to embed feature-length motion pictures in corporate memoranda, were, in the case of emacs, focused with maniacal intensity on the deceptively simple-seeming problem of editing text. If you are a professional writer--i.e., if someone else is getting paid to worry about how your words are formatted and printed--emacs outshines all other editing software in approximately the same way that the noonday sun does the stars. It is not just bigger and brighter; it simply makes everything else vanish. For page layout and printing you can use TeX: a vast corpus of typesetting lore written in C and also available on the Net for free.
For all you VI whiners out there, just shut your stupid traps and learn a real editor. Or you can go back to writing Visual Basic where you belong.
It looks like a Harry Potter spoiler.
"...we should just trust our president in every decision that he makes and we should just support that." B.Spears 2003
Admittedly shameless plug: I have written an article about making Emacs work with (and better than) Visual Studio 7. If you're stuck with developers who use this environment, check it out:
Emacs vs Visual Studio
I don't use Emacs because I don't like vim; I love vim and I absolutely adore its keybinding. However, vim does not have anything nearly as powerful as Emacs Lisp. With Elisp, I can modify my work environment easily and quickly. That for me is worth the weird key bindings.
You can also try eshell (emacs shell) and py-shell (python shell). Where else do you have reusability like the following?
And consider that all of the elisp commands have command completion, so that typing longer commands:
...aren't such a big chore.
While it's kind of neat to have an i-searchable buffer, be able to attach pipes to all kinds of things you didn't know existed, eshell is still a bit green (at least in my version of it). There are a few defaults that I (and apparently a sibling post) found annoying.
First, when you try to edit a command you had previously typed (e.g. command line editing, ^P) it instead moves you up a line in the (fully editable) buffer, so that you find yourself in the output of the previous command. So, you soon learn to use esc-P instead. Then, if you go to the start of a line with ^A, instead of going to the start of the command line as usual, it puts you at the start of your shell prompt (ugh -- how often do I want to edit that?) I realize this keeps things more or less generalized, but these defaults are apparently there to motivate people to customize their copy of emacs.
With enough customization, eventually we'll be watching ascii movies in an emacs pane and be able to use vi keys to fast-forward past the commercials :) But don't say it too loud, as the RIAA might
put this on their emerging threat list, along with that internet 3
thing that we were supposed to keep hushed up about.
what the hell the /. icon for GNU topics is supposed to be? It looks like a little penis with a silly hat and a security blanket. WTF is it?
"Encyclopedia" is to "Wikipedia" what "Library" is to "Some people at a bus stop"
it would be cool if text editors could handle unicode - or if not, then at least support the tone marks for pinyin ABOVE the characters instead of folliwing them.
possible?
Which is the bigger flamewar topic, Linux vs. BSD or emacs vs. vi?
Clearly the latter is a bigger flamewar topic. Only Nazis would believe otherwise.
(And yes, it's a joke.)
You are the greatest! A million blessings upon you!
I will say, that Emacs (and Vi) are like Zen - you either get them or you don't. Yeah, and I like them both, for they are Two Different Programs, and vi is good for banging out the World's Fastest Edit from the command-line, and Emacs (formerly criticized for it's bloat, but on today's hardware and environment, one of the lightest running processes when considering all it can do), is good for playing with the one program that comes the closest to being a full operating system in itself.
I think Emacs is single-handedly keeping the Lisp language alive. With the extensions for it that keep popping up, and the many reincarnations of it in different environments, it is feasible to ask: Will Emacs go on expanding forever, like a Big Bang Universe?
Why I Started:
.emacs configuration from my university days and have transmuted from apollo Domain to SunOS to HP/UX to VMS and finally to Windoze XP with linux slotted in there for home use.
1. I was forced to learn EMACS as the *only* text editor for CPSC200 by a Nazi like professor and his TA henchmen eons ago.
1a. I was a unix newbie, so when told to use emacs and told nothing about vi... guess which one I'll use. Anyways when one is clueless [ESC]:q! is as incomprehensible as [CTRL]x-c. (Anyways cursor movement without using cursor keys sucked with both vi and emacs: the vi "hjkl" movement keys that worked only in certain modes vs. emacs' mnemonic [CTRL]bnpf movement keys... thank {place a deity here, or "DEC" you're athiest or an uber gEEk} for creating VT100 terminals and with it the defacto standard for cursor keycodes, and full screen cursor placement.)
2. I actually used Wordstar before learning emacs, so incomprehensible control key commands were nothing new.
Why I Continued to Use EMACS after CPSC 200 while in University:
1. Unix boxes actually had a control button in a place that made control commands almost ergonomic.
2. One only has so much time to learn other editors when one's busy trying to avoid studying by playing/tweaking MUD's, xtrek, xtank, compiling and trying out beta versions of NCSA Mosaic.
Why I Still Use Emacs Today in an Embedded Development Environment Hosted Off MS Windoze:
1. Same reason I use Linux, Firefox, etc: It's Open Source software so there are alot of gEEks smarter and have more spare time than me developing plugins, extensions, Emacs major modes, etc, etc, so as a result
a) I have access to extensions that would take me forever to write myself, that's assuming I could even come close to implementing such feats of software prowess even if given an infinite number of monkeys to work with,
b) I have the source code for the tool and the extensions, so I can modify and reconfigure them as I like if they don't exactly fit my needs,
c) I don't have to beg to get some purchase order from the accountants to avoid getting the company into trouble with lawsuits for using *my* favourite commercial editor and conversely can use the same editor at home.
2. I have the evolved my
3. It's entertaining watching your coworkers get all pissed off when trying to cut and paste on your Windoze computer because you've swapped the key mapping for CAPS LOCK and CTRL on the Windoze Keyboard and didn't bother to relabel the keys. Note it can get dangerous if your coworkers are near the end of their ropes because everybody's been working way too many hours to meet some artificial deadline that management has decreed upon the peons.
4. Last but not least, Has anybody mentioned the easy macro programming? Without learning a line of lisp, one can create complex macros... and by just learning a smattering of lisp, make macros that will amaze your co-workers (except the unix gods that use only "ed" because they believe that "vi" is not light weight enough, let alone an editor that includes a lisp interpreter and many megabytes of elisp scripts... anyways who needs to see more than one line of text at a time.)
5. Anyways it's gEEky to use Gnu Emacs ([flame suit on] not XEmacs, only weirdo's use that [flame suit off]). What other reason does a nerd need to do anything?
I read the 2nd edition of this book, and it helped me a lot.
I learned commands I never knew about, like all the rectangle copy-cut-paste commands that are so helpful with tables of numeric data.
Emacs is my editor of choice (without making a religion out of it), and this book is a great way to start liking it.
Chapter One: How to exit vi without rebooting the system.
Chapter Two: Learn how to put all your C++ programs and LaTeX documents in a single file.
Chapter Three: How to copy a block of text without having to count the number of lines.
that he'll post the review to Eclipse (http://www.oreilly.com/catalog/eclipse/index.html released a year ago) around Xmas.
One thing that I always find so strange, is how people focus on the difficult learning aspect of the editor.
I understand that such usability is important for a web application users are going to access once/week or month or so, they have to be able to guess their way around, but for a programmer, your text editor is where you spend 10 hours/day. Who cares if it's a little hard to learn? Soon enough it'll be in your fingers anyway.
Learning emacs is the best practical investment I have ever done in my career, and it is the best computer program I have ever used! People who diss emacs invariably show lack of knowledge of it, and I have yet to meet a competent emacs user who was willing to change to something else.
Make the effort, it's definitely worth it.
But as an _environment_ Emacs kicks ass. I've got a headless box I never bothered to get X running on. I just run emacs on it within 'screen'. That lets me connect and disconnect from different computer and pickup right where I left off. I've got 4 shells, and about 20 other buffers open, including a few which are effectively editing files on a remote FTP server.
But if I'm on another machine and I'm not already running emacs there, I'll use vi to just do a quick edit.
Awesome furniture, accessories and cabinetry in Santa Rosa, CA: http://humanity-home.com/
Aqua, Brushed Metal, whatever - I need an emacs that works well with OS X. For me, that means:
Trivial install and update
Control and meta work right, and don't interfere with command
Fonts that don't burn my eyes
Non-trivial elisp (like SLIME, that does sockets) just works
Aquamacs works for me. At least, the Aquamacs guys credit Andrew Choi for doing the original Carbon port - from looking at his blog, some people don't do that.
To a Lisp hacker, XML is S-expressions in drag.
Try the latest version (0.4) of Moe here.
Yes, because typing L to go right, K to go up, J for down and H for left is so much more logical than ^F for forward, ^B for backward, ^N for the next line and ^P for the previous line! (I realize non-English speakers will be hosed either way.)
They're nicely lined up around the right-hand home key, whereas the Emacs movement keys are all over the place and require you to hold down ctrl.
Maybe this is why RMS got crippled by RSI?
Admittedly the normal cursor keys work in every version of Emacs I've tried. I tried to learn using CTRL-L/R/N/P because I assumed they'd been chosen for a reason, and maybe that was my mistake.
"So can vim, and it does it better."
Nope. Both vim and emacs don't know anything about the semantics of the underlying code. If it knew, once you typed "foo." For a struct, for instance, it could prompt you for the member variables of such struct. Both editors offer syntax highlighting, which has nothing to do with semantics.
"an annoying and useless 'feature' for someone like me who's been programming enough years to know what most of the functions are by now"
Yes, i see what you're problem is: you seemingly only use standard lib functions, never used functions from another lib for the first time and most likely never ever touched object-oriented code.
Code-completion ( semantic completion ) does show you in a very handy popup all the functions a module exports or all the member variables and methods for a class, in a glance, for you to choose from.
But, yeah, vi is ok for shell scripts or low-level C plumbering...
Emacs has a number of experimental code-completion elisp code that promise a lot but still are pretty unsubstantial...
Of course, superior general-purpose text-editing and quick source navigation features are something that places emacs high above any other IDE's editors i know of...
I don't feel like it...