GNU Emacs packages

ID

emacs

Links

Home page · Documentation · Repository · Wikipedia

Upstream stars

⭐ 5,212

Last commit

2026-10-06

Platforms

🐧 Linux · 🍎 macOS · 🪟 Windows

Operations

installed · install · remove · sync

purl types

pkg:emacs/ · pkg:melpa/

CLI name

emacs

Issues and PRs

📦 manager: emacs

Source

emacs.toml

GNU Emacs’s own package manager, package.el, driven headlessly (https://www.gnu.org/software/emacs/).

A package is a symbol from an ELPA archive, and every verb takes that symbol: the inventory prints it, and install and removal both accept it. The archives are the registry, GNU ELPA and NonGNU ELPA being configured out of the box.

Every operation is one emacs --batch --eval invocation, so the output format is chosen here rather than parsed out of whatever the tool prints. The inventory’s format string and the pattern below are therefore written together, and neither can drift without the other.

Parsing notes, verified against GNU Emacs 31.1 on macOS:

  • package-initialize is mandatory in batch mode. emacs --batch skips the init file, so package-alist is empty until it runs, and the inventory would report nothing at all rather than failing.

  • The inventory holds only what package.el installed. Emacs’s own bundled libraries are not in package-alist, which is the right scope: they are part of the editor rather than packages a user manages.

  • An empty inventory prints nothing and exits 0, so mpm reports no packages and no error.

  • Removal takes the package description rather than the symbol, hence the alist-get lookup: package-delete refuses a bare symbol.

  • sync is package-refresh-contents, which contacts every configured archive and is the only read that reaches the network.

Todo

Declare outdated, upgrade_all and search. All three are expressible as further --eval forms, comparing package-alist against package-archive-contents, but none was captured on the drive that produced the samples below and no operation is declared from a form that was not run.

What mpm adds to emacs

mpm reaches across every manager at once, not emacs alone: mpm installed and mpm outdated cover emacs alongside every other manager you run in one table, mpm upgrade --all updates them together, and mpm sbom exports the whole machine as one bill of materials.

Every mpm command also gains --dry-run and --plan previews, cross-scheme version comparison and purl identifiers. See manager augmentations for how each one is built.

Your emacs commands, in mpm

You already know emacs: each operation maps one-to-one onto mpm, in an interface shared by every manager.

To…

With emacs

With mpm

List what’s installed

emacs --batch --eval (progn (require (quote package)) (package-initialize) (dolist (p package-alist) (princ (format "%s %s\n" (car p) (package-version-join (package-desc-version (cadr p)))))))

mpm --emacs installed

Install a package

emacs --batch --eval (progn (require (quote package)) (package-initialize) (package-install (quote <package_id>)))

mpm install pkg:emacs/(progn (require (quote package)) (package-initialize) (package-install (quote <package_id>)))

Remove a package

emacs --batch --eval (progn (require (quote package)) (package-initialize) (package-delete (car (alist-get (quote <package_id>) package-alist))))

mpm remove pkg:emacs/(progn (require (quote package)) (package-initialize) (package-delete (car (alist-get (quote <package_id>) package-alist))))

Prefix any command above with --dry-run to simulate the underlying manager calls without touching the system: the safe way to watch what mpm would do before trusting it.

Operations

Operation

Supported

installed

✅

outdated

orphans

search

install

✅

upgrade

upgrade_all

remove

✅

sync

✅

cleanup

doctor

Configuration

  • Ignore emacs on the mpm CLI by passing the --no-emacs option.

  • Ignore it for every run in your configuration:

    [mpm]
    emacs = false
    
  • Raise the timeout of all emacs calls:

    [mpm.overrides.emacs]
    timeout = 900
    
  • Run mpm config-template emacs to print all overridable settings for your configuration file:

    [mpm.overrides.emacs]
    cli_names = [
        "emacs",
    ]
    cli_search_path = []
    dry_run = false
    ignore_auto_updates = true
    plan = false
    post_args = []
    pre_args = []
    pre_cmds = []
    stop_on_error = false
    unmaintained = false
    version_cli_options = [
        "--version",
    ]
    version_regexes = [
        "GNU Emacs\\s+(?P<version>\\S+)",
    ]
    

Recipes

A few jobs you would otherwise script around emacs, one mpm command each:

  • Snapshot and clone a machine: mpm --emacs dump emacs.toml, then mpm restore emacs.toml on the next one.

  • Export a compliance SBOM: mpm --emacs sbom (CycloneDX by default, --spdx for SPDX).

Privilege escalation

mpm runs this manager as the current user and never prepends sudo by default. Flip the policy for its privileged operations with --sudo or the per-manager sudo override.

None of its operations is privileged.

See privilege escalation for the full policy.

Cooldown

State of GNU Emacs packages’s release-age gating, from the cooldown support table:

Status: ❌ None (ELPA archives publish versions, never dates)

A cooldown only pays off where a compromised release can be withdrawn while the clock runs, and can only be emulated where the registry dates its releases. From the retraction table:

  • Registry: ELPA archives

  • Retraction: Archive drop: a package lives in an archive index its maintainers regenerate, so a version is withdrawn by the archive ceasing to list and serve it

  • Publish date: ❌ an archive entry carries a version and its dependencies, never a publication date

With --cooldown set, mpm skips this manager’s install and upgrade operations rather than run them unguarded (fail-closed); --cooldown best-effort opts back in.

Reference traces

A collection of raw native outputs captured from the manager’s own CLI and recorded in the bundled definition. If you know GNU Emacs packages well and a transcript below looks wrong, or a newer release changed its output format, report it.

$ emacs --batch --eval (progn (require (quote package)) (package-initialize) (dolist (p package-alist) (princ (format "%s %s\n" (car p) (package-version-join (package-desc-version (cadr p)))))))
queue 0.2

Version check

The version is probed by running:

$ emacs --version
GNU Emacs 31.1
Copyright (C) 2026 Free Software Foundation, Inc.
GNU Emacs comes with ABSOLUTELY NO WARRANTY.

and extracted with:

r"GNU Emacs\s+(?P<version>\S+)"

Upstream project

Metrics

emacs-mirror/emacs

Activity

commit activity open issues open pull requests

Popularity

forks watchers contributors

Metadata

latest tag license main language

Changelog

  • 8.0.0 (2026-09-20)

    • Resolve pkg:alpm, pkg:conda, pkg:deb, pkg:melpa, pkg:pypi and pkg:rpm pURLs to these managers too, alongside the ones already handling each type.

    • Add the GNU Emacs package manager, driving package.el headlessly for inventory, install, remove and archive refresh.