# Hue MD for Emacs (`hue-markdown-mode.el`) A minor mode for [Hue Markdown](https://spingras.github.io/hue-md/) in one Emacs Lisp file. It needs no Node.js and no other package, so it also works in Android Emacs (`org.gnu.emacs` and Termux). - Colors Hue spans and drawn boxes in the buffer, with the light or dark Hue palette to match the frame background. - Shows a colored view of the source that follows your edits, and converts the buffer to GitHub Markdown. - Adds a **Hue** menu, so every command is one tap on a phone. Support is partial: the mode does not yet do everything that the parser does. ## Install Get `hue-markdown-mode.el` from `emacs/` in [`hue-md-snippets.zip`](https://github.com/spingras/hue-md/releases/latest/download/hue-md-snippets.zip), or from this folder. Put it in `~/.emacs.d/lisp/`, then add this to `~/.emacs.d/init.el`: ```elisp (add-to-list 'load-path (expand-file-name "lisp" user-emacs-directory)) (require 'hue-markdown-mode) (add-hook 'markdown-mode-hook #'hue-markdown-mode) ``` With `use-package`: ```elisp (use-package hue-markdown-mode :load-path "~/.emacs.d/lisp" :mode "\\.hue\\.md\\'" :hook (markdown-mode . hue-markdown-mode)) ``` On Android GUI Emacs, `~` is `/data/data/org.gnu.emacs/files`. ## Commands All commands are also in the **Hue** menu. | Key | Command | Does | | :--- | :--- | :--- | | `C-c C-h s` | `hue-markdown-insert-span` | Wraps the region or word in `{spec: ...}` | | `C-c C-h x` | `hue-markdown-insert-box` | Draws a box around the region or line | | `C-c C-h p` | `hue-markdown-preview-buffer` | Shows the source with Hue colors and hidden delimiters in `*Hue Preview*`; it follows your edits | | `C-c C-h c` | `hue-markdown-toggle-conceal` | Hides or shows the `{spec: ` and `}` markup | | `C-c C-h d` | `hue-markdown-downgrade-buffer` | Converts the buffer to GitHub Markdown | | `C-c C-h b` | `hue-markdown-preview-browser` | Opens an HTML preview in the browser (uses `hue-markdown-cli-command`) | | `C-c C-h r` | `hue-markdown-fontify-buffer` | Colors the buffer again |