auto-mode-alist should be set up with :mode

This commit is contained in:
bth 2026-05-19 13:35:58 -07:00
commit 315cbb7884
2 changed files with 20 additions and 28 deletions

View file

@ -43,32 +43,13 @@ This "database" depends on a few simple ideas:
# installation
Clone it:
```sh
git clone https://git.bth.moi/bth/um.git ~/.emacs.d/um
```
Build the `um` binary:
```sh
cd ~/.emacs.d/um/go
go build -o um .
```
Symlink somewhere in your `PATH`:
```sh
ln -s ~/.emacs.d/um/go/um /usr/local/bin/um
```
## config
My config looks like this:
Install with use-package:
```elisp
(use-package um
:after (project embark)
:vc (:url "https://git.bth.moi/bth/um" :rev :newest)
:after (markdown-mode embark)
:mode ("\\.um\\'" . um-mode)
:custom (um-root-glob ".*/writing/journal")
@ -78,13 +59,26 @@ My config looks like this:
:config
(advice-add 'embark-target-file-at-point :around 'um-target-file-at-point-advice)
:load-path "um/elisp"
)
```
Note the optional setup of `embark`, which allows us to find files intelligently, explained below.
## CLI binary
Build the `um` binary:
```sh
cd ~/.emacs.d/elpa/um/go
go build -o um
```
Symlink somewhere in your `PATH`:
```sh
ln -s ~/.emacs.d/elpa/um/go/um /usr/local/bin/um
```
# 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 filenames, which I do to compose larger pieces. A simple filename anywhere can also serve as a "link".