2015-12-02 14:23:39 +00:00
|
|
|
#+TITLE: Finance layer
|
2016-03-31 02:59:55 +00:00
|
|
|
|
2019-05-02 21:49:30 +00:00
|
|
|
#+TAGS: layer|tool
|
|
|
|
|
2018-02-01 20:25:36 +00:00
|
|
|
[[file:img/ledger.png]]
|
|
|
|
|
2019-05-07 20:05:06 +00:00
|
|
|
* Table of Contents :TOC_5_gh:noexport:
|
2017-05-22 14:16:12 +00:00
|
|
|
- [[#description][Description]]
|
2018-02-01 20:25:36 +00:00
|
|
|
- [[#features][Features:]]
|
2017-05-22 14:16:12 +00:00
|
|
|
- [[#install][Install]]
|
|
|
|
- [[#layer][Layer]]
|
|
|
|
- [[#configuration][Configuration]]
|
|
|
|
- [[#ledger][Ledger]]
|
|
|
|
- [[#key-bindings][Key bindings]]
|
|
|
|
- [[#ledger-1][Ledger]]
|
|
|
|
- [[#ledger-reconcile][Ledger-Reconcile]]
|
2015-06-10 16:44:30 +00:00
|
|
|
|
|
|
|
* Description
|
2018-02-01 20:25:36 +00:00
|
|
|
This layer integrates a full fledged accounting system into Spacemacs.
|
2015-06-10 16:44:30 +00:00
|
|
|
|
2018-02-01 20:25:36 +00:00
|
|
|
** Features:
|
|
|
|
- Support for maintaining a double-entry accounting system run by text files via [[https://www.emacswiki.org/emacs/LedgerMode][ledger-mode]].
|
2019-06-01 17:13:30 +00:00
|
|
|
- Display of finance reports directly within Emacs.
|
|
|
|
- Integration of Emacs calculator mode for editing post amounts.
|
2018-02-01 20:25:36 +00:00
|
|
|
- Support for easy account reconciliation via =Ledger-Reconcile=.
|
2018-07-22 14:30:02 +00:00
|
|
|
- Extended support for ~evil~ style editing with [[https://github.com/atheriel/evil-ledger][evil-ledger]].
|
2015-06-10 16:44:30 +00:00
|
|
|
|
|
|
|
* Install
|
2015-06-15 03:35:47 +00:00
|
|
|
** Layer
|
2016-01-06 05:21:55 +00:00
|
|
|
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
|
2018-02-01 20:25:36 +00:00
|
|
|
file.
|
|
|
|
|
|
|
|
For this layer to work properly you also need to install the native package [[https://github.com/ledger/ledger][ledger]].
|
2015-06-10 16:44:30 +00:00
|
|
|
|
2015-06-15 03:35:47 +00:00
|
|
|
* 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
|
2018-10-23 14:18:21 +00:00
|
|
|
your =dotspacemacs/user-config=. The default value, set in the layer, is =62=.
|
2015-06-15 03:35:47 +00:00
|
|
|
|
|
|
|
#+BEGIN_SRC emacs-lisp
|
2015-09-28 06:05:18 +00:00
|
|
|
(defun dotspacemacs/user-config ()
|
2015-06-15 03:35:47 +00:00
|
|
|
(setq ledger-post-amount-alignment-column 68))
|
|
|
|
#+END_SRC
|
|
|
|
|
2015-06-10 16:44:30 +00:00
|
|
|
* Key bindings
|
|
|
|
** Ledger
|
|
|
|
|
2018-12-05 03:03:03 +00:00
|
|
|
| Key binding | Description |
|
2015-06-10 16:44:30 +00:00
|
|
|
|-------------+-----------------------------------------------|
|
|
|
|
| ~SPC m a~ | add a transaction |
|
|
|
|
| ~SPC m b~ | edit a post amount with Emacs Calculator mode |
|
2019-05-26 20:58:52 +00:00
|
|
|
| ~SPC m c~ | toggle 'cleared' flag on transaction or post |
|
2015-06-10 16:44:30 +00:00
|
|
|
| ~SPC m C~ | sort and align the entire buffer |
|
|
|
|
| ~SPC m d~ | delete current transaction |
|
|
|
|
| ~SPC m p~ | display balance at point |
|
2019-05-26 20:58:52 +00:00
|
|
|
| ~SPC m q~ | align a single transaction's posts |
|
2015-06-10 16:44:30 +00:00
|
|
|
| ~SPC m r~ | reconcile an account |
|
|
|
|
| ~SPC m R~ | display a report |
|
|
|
|
| ~SPC m t~ | append an effective date to a post |
|
2018-07-22 14:30:02 +00:00
|
|
|
| ~g j~ | go to the next transaction |
|
|
|
|
| ~g k~ | go to the previous transaction |
|
|
|
|
|
|
|
|
evil-ledger additionally adds a transaction text object, bound to ~x~, so you
|
|
|
|
can for example use ~dix~ or ~vax~ to delete or mark the transaction at point.
|
2017-01-04 10:15:39 +00:00
|
|
|
|
|
|
|
** Ledger-Reconcile
|
|
|
|
|
2018-12-05 03:03:03 +00:00
|
|
|
| Key binding | Description |
|
2017-01-04 10:15:39 +00:00
|
|
|
|-------------+---------------------------------------------------------------------------|
|
|
|
|
| ~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 |
|