Emacs is an extensible text editor that can be customized by writing Lisp code.

Emacs community logo.

Why is Emacs a good choice for Python coding?

Emacs is designed to be customized via the built-in Lisp interpreter and package manager. The package manager, named package.el, has menus for handling installation. The largest Lisp Package Archive is Melpa, which provides automatic updates from upstream sources.

Macros are useful for performing repetitive actions in Emacs. A macro is just a recording of a previous set of keystrokes that can be replayed to perform future actions.

Hooks, which are Lisp variables that hold lists of functions to call, provide an extension mechanism for Emacs. For example, kill-emacs-hook runs before exiting Emacs so functions can be loaded into that hook to perform necessary actions before the exiting completes.

Emacs is an implementation of the text editors and IDEs concept. Learn how these parts fit together in the development environments chapter or view all topics.

General Emacs resources

Notable Elisp Packages

  • Magit allows the user to inspect and modify Git repositories from within Emacs.

  • company-mode creates a modular in-buffer completion framework.

  • Flycheck provides syntax checking.

  • anaconda-mode is specific to Python development and allows code navigation, documentation lookup and code completion.

  • Tern is a stand-alone code-analysis engine for JavaScript. It can be integrated within a Django project via the tern-django package.

Popular user configurations

  • Prelude is an enhanced Emacs version 24 distribution.

  • A reasonable Emacs config shows a batteries-includes Emacs configuration bundle.

  • Emacs settings is a repository of configurations used in the Emacs Rocks screencasts.

  • Spacemacs mashes together Emacs' extensibility and Vim's ergonomic text editing features.

What's next once your development environment is set up?

Tell me about using the Vim editor for Python development.

I want to learn how to code a Python web application using a framework.

I want to know about working with data in Python.

Sign up for a monthly email with Full Stack Python tutorials. No spam ever.

Matt Makai 2012-2018