Skip to content

blahgeek/emacs-devdocs-browser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

65 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Emacs Devdocs Browser

Browse devdocs.io documents inside Emacs!

MELPA

Features

  • 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

Quick Start

  1. Install package from MELPA. This package does not depend on other libraries and should work with emacs >= 27.1.
  2. Invoke M-x devdocs-browser-install-doc to install some docs.
  3. Invoke M-x devdocs-browser-open or M-x devdocs-browser-open-in to browse some entry.

FAQ

  • 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?

    1. EWW is a builtin package and written in elisp: works across platforms, well supported, customizable.
    2. 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.

References

All public functions and variables are documented in the code. Here list some common used ones.

Docsets Management

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.

Open Docset Entry

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.

Commands in devdocs buffer

  • 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.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published