[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[emacs-wiki-discuss] Patch for Planner Ledger
From: |
Travis B. Hartwell |
Subject: |
[emacs-wiki-discuss] Patch for Planner Ledger |
Date: |
Thu, 27 Jan 2005 02:03:43 -0600 |
User-agent: |
Gnus/5.1007 (Gnus v5.10.7) Emacs/21.3 (gnu/linux) |
Hey all,
Planner ledger is horribly broken (at least on my system) for recent
versions of ledger. (If you want a simple but feature rich accounting
package, check out ledger at http://ledger.sf.net. It's written by
John Wiegley, the original author or emacs-wiki mode and planner
mode.) I have attached a diff for the changes I have made.
I added a new custom variable, planner-ledger-balance-args, which is a
list of strings of the arguments to ledger. By default, I have the
arguments being -s -e "next month" balance, which gives me the balance
of the accounts from the planner-ledger-balance-accounts variable up
through next month.
Perhaps a better alteration would be that the end date would be the
date of the planner page or something similar. I'm thinking about
what I would like and how to approach that.
Please comment and perhaps I'll be hacking some changes as I find more
ledger info I want on my planner pages!
Travis
--- orig/planner-ledger.el
+++ mod/planner-ledger.el
@@ -43,11 +43,17 @@
:group 'planner-ledger)
(defcustom planner-ledger-balance-accounts
- '("-Car" "-Loan")
+ '("Assets" "Liabilities" "-Equity")
"Accounts to include or exclude from ledger balance overview."
:type '(repeat string)
:group 'planner-ledger)
+(defcustom planner-ledger-balance-args
+ '("-s" "-e" "\"next month\"" "balance")
+ "Command line arguments for ledger balance."
+ :type '(repeat string)
+ :group 'planner-ledger)
+
(defcustom planner-ledger-payment-task-regexp
(concat planner-task-regexp
"payment\\s-+due:\\s-+\\([^,]+?\\),\\s-*\\([[:graph:]]+\\)")
@@ -65,8 +71,8 @@
(interactive)
(apply 'planner-ledger-insert-section-maybe
planner-ledger-balance-regexp
- "balance" "--" "-.*" "+Assets" "+Liabilities"
- planner-ledger-balance-accounts)
+ (append planner-ledger-balance-args
+ planner-ledger-balance-accounts))
(planner-ledger-insert-section-maybe planner-ledger-pending-regexp
"-U" "register" "."))
- [emacs-wiki-discuss] Patch for Planner Ledger,
Travis B. Hartwell <=