Xah Emacs Lisp Tutorial

Buy Xah Emacs Tutorial. Master emacs benefits for life.
LISP logo

This is a example based tutorial, with focus on practical needs. I assume you already know a scripting language (⁖ Python, Ruby, Perl, JavaScript).

Each page is self-contained. However, it is recommened you read all numbered items in the Elisp Basics section. Use the search box at top to find things. For daily tips, subscribe Xah Emacs Blog.

Emacs Lisp Basics

  1. Elisp Basics
  2. Elisp Text Processing Overview
  3. Simple Elisp Examples!
  4. How to Evaluate Elisp Code
  5. Finding Functions and Documentation Lookup
  6. How to Edit Lisp Code with Emacs

Elisp Language Detail

Writing Interactive Commands

Batch Text Processing

Writing a Major Mode


Practical Examples

Function as Replacement String

Examples of using regex with custom elisp function for the replacement string on current buffer or multiple files.

Multi-Pair Find/Replace

Transform Text Under Cursor

Commands that act on the current {word, line, region} and transform them in some way.

First, see: Emacs Lisp: Write Emacs Commands Using {Perl, Python, Ruby, …}.

The following acts on the current {word, line, file, …}, and do several things. ⁖ updating files, lookup web, ….

Batch Text Processing Examples

In the following examples, typically a function is applied to thousands of files, either to generate a report or modify each file.

Transform HTML

Misc

blog comments powered by Disqus