Skip to main content

The Craft of Emacs

What’s inside

  1. Emacs Lisp

    1. Emacs Lisp development

      • Windows and buffers
      • Using keybindings
      • The *scratch* buffer
      • Deciphering error messages
      • Exploring documentation with describe and Info
      • Interactive commands
      • Writing and calling functions
      • The Emacs Lisp Interpreter
      • The interpreter’s environment
      • Loading code on startup
    2. The Emacs Lisp Interpreter

      • Reading and evaluation
      • S‑expressions: symbols, numbers, strings and lists
      • Special forms
      • Defining local variables with let and let*
      • Obtaining user input with read
      • Calculations and arithmetic
      • Manipulating buffers and text
      • Debugging with the *scratch* buffer
      • Booleans and predicates
      • The if , and and or special forms
      • Types and data
    3. Advanced Evaluation

      • Defining anonymous functions with lambda
      • Calling functions with funcall and apply
      • Closing over the environment
      • The quote special form
      • Apostrophe syntax
      • Symbol manipulation with quote
      • Defining lists with quote
      • Pairs and lists
      • Accessing elements with car and cdr
      • Constructing static pairs with dot syntax
      • Building lists dynamically with cons
      • List manipulation with seq
  2. Building an editor

    1. Working with buffer text

      • Reading text from buffers
      • Representing text: strings, lists and characters
      • String manipulation with subr
      • Advanced list manipulation with seq
      • Debugging buffer-specific code using with‑current‑buffer
    2. Global variables

      • Defining global variables with set and setq
      • Documenting variables with defvar
      • Documenting constants with defconst
      • Exploring variable documentation with describe
      • The challenges of mutable programming
      • Working with large Elisp files: comments and organization
    3. Marking up buffers

      • Manipulating the point
      • Searching for strings within buffers
      • Propertizing strings
      • Adding text properties to buffer text
      • Manipulating the header line
    4. Text properties in depth

      • List data structures: property and association lists
      • Using keyword symbols
      • Understanding face: foreground, background and font
      • Examining text properties with describe
      • Replacing text with the display property
      • Character literals and the question mark syntax
      • The while special form
      • Types of equality
    5. Major modes

      • Exploring major modes
      • Defining major modes with define‑derived‑mode
      • Controlling buffer initialization with auto‑mode‑alist
      • Matching file names with regular expressions
      • Resetting buffers with M‑x normal‑mode
    6. Buffer‑local variables

      • The buffer environment
      • Defining buffer‑local variables with defvar‑local
      • Modifying buffer‑local variables with setq‑local
      • Variable precedence
    7. Keymaps

      • Key sequence syntax
      • Defining key sequences with kbd
      • The global and major mode maps
      • Manipulating keymaps with define‑key
  3. Richer displays

    1. The Emacs data model

      • Buffers, text and overlays
      • Creating and manipulating overlays
      • String manipulation with temporary buffers
    2. Minor modes

      • Controlling features with minor modes
      • The minor mode keymap
      • Keymap precedence
    3. Customization

      • The customization menu
      • Defining custom variables with defcustom
      • Grouping custom variables with defgroup