branch: elpa/csv2ledger commit c93fb442bb54aadccdceac9d122758e7e307a1af Author: Joost Kremers <joostkrem...@fastmail.com> Commit: Joost Kremers <joostkrem...@fastmail.com>
Provide full code snippet for c2l-matcher-regexps example --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 26f8abc0a7..9fc7e95ab5 100644 --- a/README.md +++ b/README.md @@ -113,8 +113,8 @@ Set the option `c2l-account-matchers-file` to point to this file. With the examp The matchers are simple substrings, not regular expressions. I have not found the need to use regular expressions for account matching, and prefer the simplicity of not having to worry about the special meaning of certain characters in them. Internally, however, the matchers are turned into regular expressions and stored in the variable `c2l-matcher-regexps`. If you prefer to use regular expressions, you can set this variable yourself. Its value should be an alist mapping regular express [...] ``` -(("\\(?:aldi\\|lidl\\)" . "Expenses:Groceries") - ("\\(?:restaurant\\)" . "Expenses:Leasure:Restaurant")) +(setq c2l-matcher-regexps '(("\\(?:aldi\\|lidl\\)" . "Expenses:Groceries") + ("\\(?:restaurant\\)" . "Expenses:Leasure:Restaurant"))) ``` `c2l-matcher-regexps` is not a customisable option. If you set it to a value yourself though, `csv2ledger` will not overwrite it (and ignore the value of `c2l-account-matchers-file`). Just make sure that the value is set before calling any functions from `csv2ledger` (but after loading the library), and keep in mind that if you have multiple regexps matching a transaction, the first regex that matches wins out.