Difference between revisions of "Emacs Lisp Ressources"

From WikEmacs
Jump to navigation Jump to search
(my favourite elisp ressources, somewhat sorted)
(No difference)

Revision as of 15:15, 7 May 2014

This page presents links to noticeable online resources about Emacs Lisp. They are somewhat sorted by difficulty.

Bastien Guerry's beginners tutorial

I think you should read Bastien Guerry's Emacs_Lisp_in_15_minutes. It is targeted at newbies. In the end you know how to write functions, move around and search regexps.

Did I say Bastien was the mainainer of org-mode for many years ?

Xah Lee's code snippets

Xah Lee has a number of very useful lisp tutorials that show many practical aspects of the language, with a down-to-earth attitude. They are concise and ready to use.

In elisp-basics he covers the basics of the language: printing, arithmetics, true and false, global and local variables, tests, iterations, blocks of expressions, data structures, the concept of symbol.

But we wouldn't know what to do with the basics of the language without the basics of Emacs functions: how do we build useful functions ? In "common elisp functions" he covers:

  • getting the cursor position
  • moving the cursor and searching,
  • text editing,
  • grabbing text,
  • strings,
  • preserving point and mark,
  • buffers and files basics.


An introduction to Emacs Lips by cjohansen

This tutorial is written by a beginner and may not be beautiful or concise elisp (it received a couple of contributions from readers though), but it is then super suited for a beginner who wants to extend emacs. Cjohansen wants to write elisp code to help him do an editing task. He uses the classical approach of searching text around and applying changes. Thus he shows how to:

  • define variables
  • move and restore point
  • looking around without moving the point (save-recursion)
  • check that the current line contains what we want
  • find the closing bracket
  • write interactive functions (to call with M-x)
  • define local variables (the let construct)

and in the end we have well constructed code and I think all the concepts of lisp were introduced (conditions, loops, predicates, etc).


Official tutorials

The official tutorial is located here: https://www.gnu.org/software/emacs/manual/html_node/eintr/

You can read it inside Emacs with C-h i m Emacs Lisp Intro RET (all in one go).

Wikemacs

Don't forget to check wikemacs' pages on Elisp !