Resources for learning Emacs [duplicate] - emacs

This question already has answers here:
Good Resources For Emacs [closed]
(9 answers)
What to teach a beginner in Emacs? [closed]
(13 answers)
Closed 9 years ago.
I'd like to learn Emacs, and was wondering if anyone had any good resources (free or otherwise) to recommend. I'm mostly interested in programming Emacs, starting from the basics, and lots of "exercises". I have used Emacs and most of its editing features, although I'm a bit rusty so a very quick refresher on that would be useful as well.
Thanks
Edit: Thanks for the suggestions. I'll have a look and update with what I liked...

GNU Emacs manual
GNU Emacs lisp reference
emacswiki

Programming in Emacs Lisp (Second Edition) - free online book

One thing to bear in mind is that all emacs configuration is programming.
PlanetEmacsen is a good RSS feed with lots of tips.
Xah Lee although he is apparently considered a bad troll, has some great emacs programming stuff.
Also whenever there's a function or keyboard shortcut you're not sure of, try C-h f and C-h k respectively, then follow the link to the source code for that command.
For exercises, Lair of the DustBunny did a very long series on rewriting python mode from scratch.
You could also try writing the PLEAC elisp section. That's a very good way to compare elisp to your favourite language.

Emacs itself includes a tutorial with exercises that guides you through the basic features and editing commands. You can find it in the Menu under 'Help' or by pressing C-h t (i.e. press Control and 'h' together and then 't' alone).

Last week I purchased this Peepcode screencast and really liked it. It walks you through the basic features (editing, loading saving, buffers) but also dives into some advances topics, like programming emacs lisp:
http://peepcode.com/products/meet-emacs

Definitely the best book about Emacs is Bob Glickstein's "Writing GNU Emacs Extensions".
Really informative. Really good examples. And, for a technical book a pleasure to read. It is one of the best computer books I have. (Thereunder are such treasures like my "VIC-20 Technical Manual" from 1982 :-)
Some PDFs are available online, but for the full fun I suggest purchasing a hard-copy.

Emacs's own help system is your friend --- ask Emacs. Learn the main C-h keys and apropos.
These too can help:
http://www.emacswiki.org/emacs/HelpPlus
http://www.emacswiki.org/emacs/EmacsNewbieWithIcicles

Related

Where I can find the most popular Emacs settings?

While it is fun to customize, the Emacs has 100s of mode and there is lots of customization. I like to find popular choices, so it makes my life easier and I can spend time productively. It could be about hooks, registers, buffers, keybindings,bookmarks etc..
If such a thing does not exist, I am still happy to customize in my way.
Have a look at the Emacs Prelude.
A very popular compilation of popular default settings is the Emacs Starter Kit, originally developed by Phil Hagelberg, then by Eric Schulte and finally updated for emacs-24. It mentions:
The main advantage of this Emacs Starter Kit are
better default settings
inclusion of many useful libraries and configurations
"literate" customization embedded in Org-mode files
an organizational directory structure
git provides for version control, backup, and sharing
Then there are some specialized extensions of it:
the starter kit for social sciences
the emacs kicker
the emacs expert kick
For most popular "aha" settings, the Emacs NiftyTricks page from the emacs wiki has already been linked to in another question.
I don't know a single collection of settings, but Emacs nifty tricks can be a good starting place to pick up useful customizations and features you may not know.
It's not strictly customization, but this stackoverflow question list useful features of Emacs.
I personally advise:
Link - how to make Emacs settings compatible with modern conventions
Link - ergonomic keybinding scheme
There is also Emacs Prelude - a set of customization to make Emacs learning curve more gradual.
I also recommend going through Mastering Emacs - it has many of customizations, that may improve your productivity.
I tried the starter some time ago, but I found that I got better results by writing my own init.el so that I actually know what each line of cod e does. Emacs Fu is the best resource that I know, because it has blog posts about many different modes instead of just code: http://emacs-fu.blogspot.com/. And there is also sample .emacs based on the posts.
I think maintainer of Emacs rocks series ended up with a good .emacs settings and a useful start-up-kit for newbies to help them morph their finger habits quickly into Emacs'.
https://github.com/magnars/.emacs.d. The better-defaults package lives up to its title.

Scheme dialect of Lisp in Emacs [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
How do I get the EMACS lisp interpreter use the Scheme dialect of LISP. I am going over the SICP book and am new to EMACS (just finished learning the navigation and file access commands)?
To do SICP, you should use an external scheme interpreter as Emacs Lisp is different from Scheme and no correct implementation of scheme has been created on top of Emacs Lisp. One other reason you should use an external scheme interpreter is for speed of execution.
The simple solution is to use PLT Scheme now called Racket :
Download and Install scheme from Racket site.
Then configure the variable scheme-program-name to the value mzscheme
Finally run the command run-scheme : it will run mzscheme process into a *scheme* buffer.
The *scheme* buffer use the inferior-scheme-mode major mode which defines the following keys :
C-c C-k scheme-compile-file
C-c C-l scheme-load-file
C-x C-e scheme-send-last-sexp
C-M-x scheme-send-definition
Jerome's answer is a good simple way to get started. If you plan on working through longer exercises in SICP, I strongly suggest installing Quack, which is an Emacs package that provides many useful features for formatting, editing, and running Scheme code. It's the de facto standard.
You'll still have to install your preferred dialect of Scheme (I also suggest Racket here) independently, and then use Emacs to communicate with it.
This page and this other page might help you with some other resources for setting up and using Emacs for this purpose.
You don't, at least not directly. What people generally do is spawn a scheme process and communicate directly with that.
See external-lisp documentation for how to do that, as well as the Emacs Wiki page for Scheme.
Ok, I was a little wrong, it looks as though a couple of people have written Scheme interpreters on top of Emacs Lisp (see the Wiki link above), though they are not fully featured Schemes.
You don't. GNU Emacs LISP is built into GNU Emacs, and much of GNU Emacs is written in GNU Emacs LISP. You can't change the built-in LISP interpreter without massively breaking Emacs.
GNU/MIT Scheme includes the Edwin editor, an Emacs-like editor written in Scheme. You might be able to use that instead of GNU Emacs.
The other guy's recommendation of spawing a scheme process and communicating with that seems like the better idea.
I found it was easiest to use MIT scheme in Emacs with M-x run-scheme - instructions for setting this up are here:
http://praveen.kumar.in/2011/03/06/gnu-emacs-and-mit-scheme-on-mac-os-x/

Looking for good Lisp code to read [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Examples of excellent Common Lisp code?
I'm currently trying to get proficient in Common Lisp and to learn some of the tricks for writing compact, clear and beautiful code in it.
So, I want to know if you have any sources of good Common Lisp, preferably free and online but books are also OK.
The most admirable modern Common Lisp I've seen is in Edi Weitz's libraries. (Look within the outline area NerdStuff/Common Lisp/Code available on this server.) His CL-PPCRE library is worth studying in depth.
Large codebases can be schizophrenic, because there are often many contributors to the project. I would also say that contributors tend to want to add new features rather than re-write some code because it could be coded in a slightly more elegant way.
Paul Graham is attributed with good coding style. The link points to pages where his coding style in ANSI Common Lisp is commented upon.
Peter Norvig has also written about good Lisp coding style here.
Practical Common Lisp
Complete book (HTML) is free.
http://www.gigamonkeys.com/book/
Most open source Common Lisp (CL) environments ship with a lot of CL source code.
Take a look at CMUCL, CLISP and SBCL.
Cliki (the Common Lisp Wiki) has many open source CL packages.
Google Code Search is another large repository of CL code. Setting the language to "Lisp" will return both CL and non-CL files, like Emacs Lisp (.el) files. To narrow the results, set the Files text box to .lisp$ so only file names that end in .lisp are returned.
Paradigms of AI Programming. The code is online, though the book itself is not to be missed.
On Lisp is also very fine.

Emacs without Lisp [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 1 year ago.
Improve this question
Should I learn to use Emacs with no intention to learn Lisp, if my other option is to get familiar with vi?
Yes. With all the resources out there (FAQ, Emacs wiki, and the Stack Exchange Emacs site) and custom (M-x custom). You don't need to know Lisp. You just cut/paste what you find.
You can drive a Ferrari/Yugo without knowing the internals of the combustion engine or how a Formula One transmission works...
Why not?
You can still learn vi (probably Vim or Elvis).
You can learn jEdit. Or nano and Pico. Or whatever other editor, environment, and language-host you fancy.
Why put such an arbitrary restriction on things? While your Emacs experience will be better if you learn at least basic Emacs Lisp (a .. derelict .. Lisp implementation), it's not required. But at the end of the day, it's a tool. Get as many useful tools as you can. "Useful" also really depends on context.
I have used Emacs for several years with next to no knowledge of Lisp and it served me well for all of the projects I used it for.
You can always simply assume that the configuration you're writing is not in Emacs Lisp and that it is just some funny configuration format - there a lot stranger examples out there (such as Sendmail).
I should warn you though that once I started learning Emacs Lisp my Emacs mastery expanded extremely rapidly - now that I understand the details of the language I can easily bend any configuration to my needs and more importantly I started writing my own extension to Emacs, which add to it even more capabilities.
If you decided to start with Emacs, I recommend to read first this great book - it taught me a lot of things for Emacs at the beginning and it assumes no Lisp knowledge. It won't teach you any Lisp either. Afterwards my advice would be read the official Emacs manual and start exploring the Emacs Wiki and #emacs on Freenode.
Learning Emacs truly is a journey that is not for the faint of heart, but it is journey that is most certainly worth it...
Configuring Emacs is a journey, and it's something that you're going to want to do. Being able to customize your developing environment is one of Emacs' greatest strengths. It's almost unavoidable. You pick up bits and pieces just by looking at other people's .emacs files.
Knowing just a little bit of Lisp goes a long way in Emacs.
You don't need to learn Lisp to use Emacs. Even basic customization of Emacs works fine without Lisp knowledge. If you need something beyond your capabilities, there are many helpful Emacs users.
Learning a bit Emacs Lisp will later enhance your understanding of Emacs.
Emacs Lisp is a relatively simple Lisp dialect. Basic Emacs Lisp is not that difficult to learn. As an experienced Lisp user I have to say that Emacs is available quite some time and the users have written some amazing things in Emacs (like Org-mode). Some of the Emacs extensions are very very well written and it is a pleasure to read the code.
Well, if you don't want to customize your Emacs, you won't need Lisp, either. And you can also do some basic modifications using the build-in customize functionality and by copy&pasting code of others. But truth being: I have written several hundreds of lines of code to customize Emacs to suit my needs. On the other side, as far as I know, vi is not as customizable as Emacs, so in the end it is probably more about what editor you like more and you should try both.
I know little Lisp and use Emacs to edit my C and OCaml programs on Windows and Linux.
I've been using Emacs for a year and a half, and really only picked up whatever Emacs Lisp came without trying. I have a heavily extended set of configurations (first in a .emacs file, and now in ~/.emacs.d/init.el and friends), which are totally a result of cutting and pasting from the excellent resources found online.
Aside from, of course, the EmacsWiki, you should see the fine Emacs Starters Kit and subscribe to Planet Emacsen --- preferably in a feed reader. It's prettier.
Having said that, after you have a working setup you might yield to the temptation to learn a little Emacs Lisp. I've just started the free Introduction to Programming In Emacs Lisp, which comes with Emacs and is best read from within Emacs Info. It assumes neither programming ability nor Lisp knowledge, and is a friendly introduction to the 'vibe' of Emacs Lisp which I find to be well-written in the extreme, friendly and concise, and worth 10x every minute I have spent with it.

Best Common Lisp IDE [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
I've used Slime within Emacs as my primary development environment for Common Lisp (or Aquamacs on OS X), but are there other compelling choices out there? I've heard about Lispworks, but is that [or something else] worth looking at? Or does anyone have tips to getting the most out of Emacs (e.g., hooking it up to the hyperspec for easy reference)?
Update: Section 7 of Pascal Costanza's Highly Opinionated Guide to Lisp give one perspective. But to me, SLIME really seems to be where it's at.
More resources:
Video of Marco Baringer showing SLIME
Videos of Sven Van Caekenberghe showing the LispWorks IDE
Video of Rainer Joswig using the LispWorks IDE to create a DSL
Blog post by Bill Clementson discussing IDE choices
There are some flashier options out there, but I don't think anything's better than Emacs and SLIME. I'd stick with what you're using and just work on pimping your Emacs install.
A very minimalistic but useful Lisp IDE for Windows is "LispIDE" available from:
http://www.daansystems.com
Supports CLISP and SBCL.
Starts up with REPL very quickly.
Syntax highlighting.
Download includes CLHS and CLtL2 as CHM help files.
Press F1 to bring up CLHS help. CLtL2 under Help menu.
Keyboard shortcuts for "Send to Lisp" and "Macro Expand".
Simple, effective and free.
I'm very late on this, but it's strange that nobody has mentioned the LispWorks IDE here, and it even has some GUI-Builder, which is portable across platforms (minus Mac OS X).
Also if you want a whole operating system for your Lisp programming undertaking, there still does exist Open Genera (which just runs on Dec Alphas (who is currently the owner of DEC ;-(), it's a complete OS written in Lisp and even has a C compiler, implemented in Lisp AFAIK, targeting the OS. It's very strange. You'll find a few things which we nowadays take for granted. E.g hyper referenced documents (but this was before the Web). It has a few "Lisp" dialects and the base is ZetaLisp, but Common Lisp works. All the tools and things can be introspected during runtime. It's a very strange feeling.
However, I just mentioned it. I guess nobody here will ever have touched OpenGenera....
The most pleasant way I have found of accessing the Common Lisp standard is through Info. Build and install the Info files as described on http://www.phys.au.dk/~harder/dpans.html. Then add the following to your ~/.emacs.el:
(require 'info-look)
(info-lookup-add-help
:mode 'lisp-mode
:regexp "[^][()'\" \t\n]+"
:ignore-case t
:doc-spec '(("(ansicl)Symbol Index" nil nil nil)))
You can look up the symbol at point with C-h S.
There is a Lisp IDE available with Clozure Common Lisp (née OpenMCL). It looks fine, although I like SLIME better. Clozure, however, is the bees knees: an order of magnitude faster compilation and execution on a 64 bit Intel Mac, and a better "user experience" in general. Look around on common-lisp.net for Rittweiler's new slides on using SLIME, they're very helpful.
I'll second the clozure common lisp IDE on MacOS/X. You'll remember it fondly if you ever used Macintosh Common Lisp. They are working to improve it, and, bonus, you get compete source.
In addition, if you just want lispish, dr-scheme has quite the IDE as well.
look for Allegro CL at FRANZ.COM
Eclipse also has a development environment for Lisp called Cusp.
IBM DeveloperWorks Open Source Technical Library: Cusp
I believe this question may help you find your answer.
I use Vim, the Ion3 window manager and terminal windows and enjoy it very much.