auto-mode-alist should be set up with :mode
This commit is contained in:
parent
747db090e5
commit
315cbb7884
2 changed files with 20 additions and 28 deletions
44
README.md
44
README.md
|
|
@ -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".
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
"t" 'um-tag-dwim-inhibit-read-only
|
||||
)
|
||||
|
||||
;;;###autoload
|
||||
(define-derived-mode um-mode special-mode "um-mode"
|
||||
"major mode for *.um file lists. Mostly `special-mode' with a few more commands.
|
||||
|
||||
|
|
@ -30,7 +31,4 @@
|
|||
(read-only-mode)
|
||||
)
|
||||
|
||||
;;;###autoload
|
||||
(add-to-list 'auto-mode-alist '("\\.um\\'" . um-mode))
|
||||
|
||||
(provide 'um-mode)
|
||||
|
|
|
|||
Loading…
Reference in a new issue