- Emacs Lisp 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| .gitignore | ||
| README.md | ||
| um-mode.el | ||
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-modeis the emacs mode for managing*.umfiles.um-minor-modeis an emacs minor mode meant to enhancemarkdown-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:
-
um-find-file-at-pointis hooked intofind-fileby default vianext-history-element, which will work asC-x C-f M-nout of the box. -
um-target-file-at-point-adviceviaemark-dwimon any filename. Requiresembarkand theadvice-addshown above.