5b70ac5009
The ledger-mode maintainers removed ledger-set-month and ledger-set-year to fix https://github.com/ledger/ledger-mode/issues/36. This was done in commit 782014ae. The finance layer still had key-bindings pointing to these functions, that are no longer defined, leading to errors when executing one of those bindings. This simply removes the bindings to avoid confusion.
69 lines
2.9 KiB
Org Mode
69 lines
2.9 KiB
Org Mode
#+TITLE: Finance layer
|
|
|
|
[[file:img/ledger.png]]
|
|
|
|
* Table of Contents :TOC_4_gh:noexport:
|
|
- [[#description][Description]]
|
|
- [[#features][Features:]]
|
|
- [[#install][Install]]
|
|
- [[#layer][Layer]]
|
|
- [[#configuration][Configuration]]
|
|
- [[#ledger][Ledger]]
|
|
- [[#key-bindings][Key bindings]]
|
|
- [[#ledger-1][Ledger]]
|
|
- [[#ledger-reconcile][Ledger-Reconcile]]
|
|
|
|
* Description
|
|
This layer integrates a full fledged accounting system into Spacemacs.
|
|
|
|
** Features:
|
|
- Support for maintaining a double-entry accounting system run by text files via [[https://www.emacswiki.org/emacs/LedgerMode][ledger-mode]].
|
|
- Display of finance reports directly within emacs.
|
|
- Integration of emacs calculator mode for editing post amounts.
|
|
- Support for easy account reconciliation via =Ledger-Reconcile=.
|
|
|
|
* Install
|
|
** Layer
|
|
To use this configuration layer, add it to your =~/.spacemacs=. You will need to
|
|
add =finance= to the existing =dotspacemacs-configuration-layers= list in this
|
|
file.
|
|
|
|
For this layer to work properly you also need to install the native package [[https://github.com/ledger/ledger][ledger]].
|
|
|
|
* Configuration
|
|
** Ledger
|
|
You can set what column transaction posts are aligned to on
|
|
the right by setting the variable =ledger-post-amount-alignment-column= in
|
|
your =dotspacemacs/user-config=. The default value, set in the layer, is =62=.
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
|
(defun dotspacemacs/user-config ()
|
|
(setq ledger-post-amount-alignment-column 68))
|
|
#+END_SRC
|
|
|
|
* Key bindings
|
|
** Ledger
|
|
|
|
| Key Binding | Description |
|
|
|-------------+-----------------------------------------------|
|
|
| ~SPC m a~ | add a transaction |
|
|
| ~SPC m b~ | edit a post amount with Emacs Calculator mode |
|
|
| ~SPC m c~ | toggle 'cleared' flag on transaction or post |
|
|
| ~SPC m C~ | sort and align the entire buffer |
|
|
| ~SPC m d~ | delete current transaction |
|
|
| ~SPC m p~ | display balance at point |
|
|
| ~SPC m q~ | align a single transaction's posts |
|
|
| ~SPC m r~ | reconcile an account |
|
|
| ~SPC m R~ | display a report |
|
|
| ~SPC m t~ | append an effective date to a post |
|
|
|
|
** Ledger-Reconcile
|
|
|
|
| Key Binding | Description |
|
|
|-------------+---------------------------------------------------------------------------|
|
|
| ~SPC m ,~ | toggle the current transaction pending |
|
|
| ~SPC m a~ | quickly add a transaction, without exiting the reconciliation buffer |
|
|
| ~SPC m t~ | change the target amount for the selected account |
|
|
| ~SPC m q~ | quit reconciliation |
|
|
| ~SPC m RET~ | finalize the reconciliation, changing all pending transactions to cleared |
|