emacs um-mode for um
  • Emacs Lisp 100%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-09-09 13:39:34 -07:00
.gitignore move elisp into main dir for the sake of package.el 2026-05-19 10:58:54 -07:00
README.md mirror notice 2026-09-09 13:39:34 -07:00
um-mode.el um-mode is the featurep and filename, no more CLI hook 2026-08-26 12:54:35 -07:00

um-mode

Important

This repo lives on git.bth.moi.

Elsewhere it's a mirror. PRs are accepted via mirror until forgejo gets federation.

Um is an (U)ltralight zettelkasten for (M)arkdown composition.

  • um-mode is the emacs mode for managing *.um files.
  • um-minor-mode is an emacs minor mode meant to enhance markdown-mode.

um is a zettelkasten specification, a CLI for creating compositions, and an emacs toolkit. It uses unique filenames, plaintext tags, the builtin emacs project package, and simple commandline conventions.

install

(use-package um-mode
  :vc (:url "https://git.bth.moi/bth/um-mode" :rev :newest)
  :mode ("\\.um\\'" . um-mode)
  :hook (markdown-mode-hook . um-minor-mode)

  :custom (um-root-glob ".*/writing/journal")

  :bind
  ("M-s t" . um-tag-grep)
  ("M-r t" . um-tag-dwim)

  :config
  (advice-add 'embark-target-file-at-point :around 'um-target-file-at-point-advice)
)

um-mode

This:

  :mode ("\\.um\\'" . um-mode)

Enables um-mode for *.um files, which are treated as lists of Markdown content files.

um-minor-mode

This:

  :hook (markdown-mode-hook . um-minor-mode)

Hooks um-minor-mode into markdown-mode to get um-minor-mode-map bindings and font locking for the header fields.

embark-dwim

This:

  :config (advice-add 'embark-target-file-at-point :around 'um-target-file-at-point-advice)

Sets up embark-dwim to find files intelligently, explained below.

ultralight "database"

What I consider the killer feature of um is the ability to jump to files from filenames listed in any "child" project back to the "source" project, defined via um-root-glob. This means that child projects can be initially defined as simple lists of *.um filenames, which I do to compose larger pieces. A simple filename anywhere can also serve as a "link".

There are a few ways this is accessed:

  1. um-find-file-at-point is hooked into find-file by default via next-history-element, which will work as C-x C-f M-n out of the box.

  2. um-target-file-at-point-advice via emark-dwim on any filename. Requires embark and the advice-add shown above.