Browse devdocs.io documents inside Emacs!
- Browse API documentations provided by devdocs.io inside Emacs using EWW, with:
- Specifically improved formatting, including highlighted code blocks
- Extra commands like "jump to other sections", "open in default browser"
- Manage (install, upgrade, uninstall, etc.) docsets
- Optionally download full content for offline usage
- Install package from MELPA. This package does not depend on other libraries and should work with emacs >= 27.1.
- Invoke
M-x devdocs-browser-install-doc
to install some docs. - Invoke
M-x devdocs-browser-open
orM-x devdocs-browser-open-in
to browse some entry.
- Why browsing the doc inside Emacs instead of opening the page in the web browser?
Less navigation, consistent theme/color, consistent keybindings.
-
Why using EWW instead of XWidget, emacs-webkit or EAF?
- EWW is a builtin package and written in elisp: works across platforms, well supported, customizable.
- EWW is text-based: consistent theme/color, consistent keybindings, copiable and searchable, faster and use less resources.
-
Why Devdocs.io instead of Dash docs?
Devdocs.io provides all API documentations converted to plain HTML content without custom styling, scripting, headers or footers, which makes it very suitable for EWW.
All public functions and variables are documented in the code. Here list some common used ones.
Useful functions:
devdocs-browser-list-docs
devdocs-browser-update-docs
devdocs-browser-install-doc
devdocs-browser-uninstall-doc
devdocs-browser-upgrade-doc
devdocs-browser-download-offline-data
devdocs-browser-remove-offline-data
Each docset have a SLUG and a NAME.
SLUG is the unique id (e.g. python~3.8
) and NAME is a human-readable string (e.g. Python
).
Pay attention to the type of the arguments (usually slug
or slug-or-name
) of each functions.
Useful functions:
devdocs-browser-open
devdocs-browser-open-in
devdocs-browser-open-in
accept a list of devdocs as parameter
(or read from minibuf when called interactively),
while devdocs-browser-open
will use the current active docsets by default.
The current active docsets are determined by current major mode
(see devdocs-browser-major-mode-docs-alist
), or by a buffer-local variable devdocs-browser-active-docs
.
devdocs-browser-eww-open-in-default-browser
(C-c C-o
): open current page in devdocs.io using default browser
The devdocs buffer also has imenu
integration to allow jumping to sections in current buffer.