.el File Extension

Learn what a .el file contains, how to open and run Emacs Lisp source, how Poly supports it, and how it differs from compiled Emacs files.

File extension details for .el

Full Support
File typeEmacs Lisp source code
MIME type
EncodingUnicode plain text, UTF-8 by default in current Emacs conventions
Operating systemsWindows, macOS, Linux
Opens withGNU Emacs, Visual Studio Code, Vim or Neovim, Any text editor
Poly supportYes. Poly recognizes .el as readable Emacs Lisp source code.
Indexed by PolyYes. Poly indexes readable source for exact and semantic search.
Preview in PolyYes. Emacs Lisp source opens in Poly's code editor with syntax highlighting.
Poly agentYes. The Poly agent can read and reason about the source text.

What kind of file is a .el?

A .el file contains Emacs Lisp source code. Emacs uses these readable text files for libraries, packages, configuration, commands, and editor modes. When Emacs loads one, it reads and evaluates its top-level Lisp forms, which commonly define functions and variables.1

There are no fixed magic bytes. Software normally identifies the language from the .el suffix, a supplied media type, or Lisp syntax. IANA has no registered Emacs Lisp media type. Tools such as Apache Tika use the unregistered text/x-emacs-lisp and treat it as a subtype of text/plain.2 Poly classifies the suffix as readable text/plain. GNU's current coding convention makes UTF-8 the default for Emacs Lisp source.3

Renaming another Lisp dialect's source to .el does not translate it into Emacs Lisp. Renaming a compiled .elc or .eln file to .el does not restore readable source.

How do I open a .el on my computer?

GNU Emacs is the natural choice on Windows, macOS, and Linux. Visiting a .el file automatically selects Emacs Lisp mode, with language-aware indentation, navigation, and evaluation tools.4 Visual Studio Code, Vim, Neovim, and any plain-text editor can also open the source.

Use M-x load-file in Emacs when you intentionally want to load a file. Use M-x byte-compile-file to check and compile it; the output name changes from .el to .elc.5

Viewing a .el file as text does not run it. Loading, evaluating, or installing it can execute arbitrary code with your Emacs process's permissions. Review unfamiliar source and package instructions first.

Poly support for .el

Poly opens .el files in a read-only, code-friendly viewer with syntax highlighting, word wrap, and in-file search. It indexes readable source for exact and semantic search, so you can find a function by name or locate code by what it does.

The Poly agent can summarize a library, explain a form, or help trace likely behavior. Poly does not evaluate the code, load dependencies, expand macros, or reproduce an active Emacs session. Keep related libraries, tests, and documentation together when project context matters.

History of .el

GNU Emacs was originally written in 1984, building on the earlier Emacs tradition.6 Its programmable environment made Emacs Lisp source central to editor features and user customization. The .el convention has remained the editable source form as the implementation gained faster compiled representations.

Current Emacs prefers native .eln or byte-compiled .elc libraries over .el source when suitable compiled versions are available. Source remains important because it is portable, inspectable, editable, and can be compiled for the installed Emacs version.4

Working with .el and alternatives

Choose the file form that matches the job:

ExtensionTypical roleHuman-readable
.elEditable Emacs Lisp sourceYes
.elcPortable Emacs byte-code produced from sourceNo
.elnNative code built for a compatible Emacs and systemNo
.lispCommon Lisp sourceYes, but not interchangeable
.scmScheme sourceYes, but not interchangeable

Keep .el source in version control. Treat .elc and .eln as generated outputs unless a project's distribution policy says otherwise. Byte-code is generally portable across machines, while native code depends much more closely on the Emacs version and system.7

Footnotes

  1. GNU Project. GNU Emacs Lisp Reference Manual: Loading.
  2. Internet Assigned Numbers Authority. Media Types Registry. Apache Software Foundation. Tika MIME Types maps *.el to the unregistered text/x-emacs-lisp subtype of text/plain.
  3. GNU Project. GNU Emacs Lisp Reference Manual: Coding Conventions.
  4. GNU Project. GNU Emacs Manual: Lisp Libraries. 2
  5. GNU Project. GNU Emacs Lisp Reference Manual: Compilation Functions.
  6. GNU Project. GNU Emacs: Further Information.
  7. GNU Project. GNU Emacs Lisp Reference Manual: Byte Compilation and Native Compilation.
© Poly Corp. 2026