johnson brings the functionality of desktop dictionary programs like GoldenDict and StarDict into Emacs. You point it at your dictionary files, index them once, and then look up words across all your dictionaries simultaneously with dynamic completion. Results appear in a dedicated buffer with collapsible sections, one per dictionary, rendered with full formatting.
The package is implemented entirely in Emacs Lisp with no external dependencies. It relies on Emacs 30.1's built-in sqlite support for efficient headword indexing and parses all dictionary formats natively.
Supported formats:
- DSL (ABBYY Lingvo) — including dictzip-compressed
.dsl.dzfiles and abbreviation tables - StarDict —
.ifo/.idx/.dictwith dictzip support and synonym files - MDict —
.mdx/.mddwith HTML+CSS rendering and encrypted dictionary support - BGL (Babylon) —
.bglfiles with automatic format detection - DICT protocol (RFC 2229) — for querying remote dictionary servers
The architecture is modular: each format is handled by a separate backend that registers itself with the core via a plist-based format registry. You can use only the formats you need.
Beyond basic lookups, johnson provides wildcard search (? and *), full-text search within definitions, eldoc integration, a scan-popup mode that shows definitions on selection or idle, bookmarking, persistent history, inline images, and a completion-at-point backend.
Requires Emacs 30.1 or later.
package-vc (built-in):
(package-vc-install "https://github.com/benthamite/johnson")Elpaca:
(use-package johnson
:ensure (johnson :host github :repo "benthamite/johnson"))straight.el:
(straight-use-package
'(johnson :type git :host github :repo "benthamite/johnson"))(use-package johnson
:vc (:url "https://github.com/benthamite/johnson")
:custom
(johnson-dictionary-directories '("~/dictionaries/"))
:bind
("C-c d" . johnson-lookup))- Set
johnson-dictionary-directoriesto where your dictionary files live. - Run
M-x johnson-indexto scan and index all discovered dictionaries. - Run
M-x johnson-lookup(orC-c dwith the config above) to look up a word.
Results appear in a *johnson* buffer. Press n/p to move between dictionary sections, TAB to collapse or expand a section, RET to follow cross-references, and l/r to navigate back and forward through lookup history.
For a comprehensive description of all user options, commands, and functions, see the manual.
- v0.1 — DSL format: encoding detection, headword alternation, full markup rendering, cross-reference navigation, dictionary groups, completion-at-point
- v0.2 — StarDict format, dictzip compression, audio pronunciation, table of contents, dictionary priority reordering
- v0.3 — MDict format (including encrypted dictionaries), DSL abbreviation tables
- v0.4 — BGL format, DICT protocol client, inline images, wildcard search, full-text search, eldoc, scan-popup mode, bookmarks, history buffer
- EPWING format

