- Emacs Lisp 100%
| .gitignore | ||
| .mise.toml | ||
| Eask | ||
| klog-mode.el | ||
| klog.el | ||
| README.org | ||
klog.el
Klog from the comfort of Emacs
Installation
At the moment, klog.el is not on any package archive. (I have plans to add it after it has been used a bit more.) You can install it using package-vc-install or the use-package equivalent.
Usage
[!NOTE] klog.el depends on klog's bookmark system, so only bookmarked klog files will be recognized by klog.el.1
klog.el assumes that you do not multitask, so only one bookmark at a time can be active. To select a bookmark, use klog-select-bookmark. Once selected, use klog-start and klog-stop to add new entries under the current bookmark. You can switch activities using klog-switch.
If you want to edit the klog file directly, use klog-find-bookmark.
You may find klog-mode helpful.
Major mode
klog.el comes with a major mode, klog-mode. klog-mode requires this Tree-sitter grammar. Add ("\\.klg\\'" . klog-mode) to auto-mode-alist. If you use use-package, then the following works:
(use-package klog-mode
:mode "\\.klg\\'")
You may wish to change the amount of indentation. To do so, customize klog-indent-offset. Use customize-group klog to see a full list of customizations (faces etc.. If you want to modify fontification or indentation, occur defvar in klog-mode.el to see what you can modify.
I recommend enabling auto-revert-mode in klog buffers. You can add auto-revert-mode to klog-mode-hook to do so.
Outline
klog-mode works with outline.el so that you can hide/show a record. Simply enable outline-minor-mode in a klog-mode buffer or add outline-minor-mode to klog-mode-hook.
Extending
klog.el is designed to be extensible. Use klog-command or klog-bookmark-command to build custom functions. If you want to work only with a specific bookmark, wrap relevant forms within klog-with-bookmark.
Contributing
I am an amateur hobbyist lisper, and my code probably reflects that. If you have suggestions or bugfixes, please open an issue or a PR. Collaboration is always welcome!
Gratitude
- Ansimorph's tree-sitter-klog
- Mickey Petersen's “Let's Write a Tree-Sitter Major Mode”
I hope to integrate klog with project.el and friends eventually.