An efficient public store of tasks/changes/design notes, mostly from SM’s private backlog; things that I/we feel would be nice to have, or investigate further. Here, they all compost nicely in the sun. Some items are out of date and just need to be re-tested and discarded. All help is welcome.
See also:
- http://wishes.hledger.org and http://bugs.hledger.org
- https://hledger.org/mockups.html
- https://hledger.org/ROADMAP.html
Some items may render best when viewed in Emacs org mode.
Most of these are long, and best viewed with a pager, eg: hledger -h | less
hledger -h|--help hledger-ui -h|--help hledger-web -h|--help General usage and command line flags for the main hledger UIs. hledger hledger CLI's commands list. hledger COMMAND -h|--help COMMAND's usage, flags, and manual section.
hledger help [-i|-m|-p] [TOPIC] View hledger user manual with info, man or pager, positioned at TOPIC. Good for jumping to a known (or guessed) topic. Good for viewing the manual if you don't have info or man. This is the main manual, covering the CLI, file formats, and concepts. hledger --info hledger-ui --info hledger-web --info hledger, hledger-ui or hledger-web's builtin user manual, viewed with info. Best for exploring the topic tree. hledger --man hledger-ui --man hledger-web --man hledger, hledger-ui or hledger-web's builtin user manual, viewed with man. Quick and searchable. info hledger, man hledger info hledger-ui, man hledger-ui info hledger-web, man hledger-web hledger, hledger-ui, or hledger-web installed user manuals. Same as above, if the manuals are properly installed on your system. https://hledger.org/hledger.html https://hledger.org/hledger-ui.html https://hledger.org/hledger-web.html hledger, hledger-ui and hledger-web manuals, viewed on the web. Best for comfortable viewing and navigation when online.
Financial reports: aregister (areg) show an account’s transactions and running balance register (reg) show postings in all/matched accounts and their total balancesheet (bs) show assets, liabilities and net worth balancesheetequity (bse) show assets, liabilities and equity cashflow (cf) show changes in liquid assets incomestatement (is) show revenues and expenses balance (bal) show custom balance reports, budgets, gains.. roi show a return on investment report
`–alias expenses:personal:=expenses:`
shell completion might wrongly add a trailing slash, eg as with this symlink, resulting in this unclear error: ~/notes$ stats -f current.journal/ hledger: SourcePos {sourceName = ”Users/simon.sm/notes/current.journal/”, sourceLine = Pos 9, sourceColumn = Pos 1} reading Users/simon.sm/notes/current.journal/2018.prices: /Users/simon/current.journal/2018.prices: openFile: inappropriate type (Not a directory)
$ hledger -f examples/sample.journal reg -w 80,-1 hledger: could not parse width option: ParseErrorBundle {bundleErrors = TrivialError 3 (Just (Tokens (‘-’ :| “”))) (fromList [Label (‘d’ :| “igit”)]) :| [], bundlePosState = PosState {pstateInput = “80,-1”, pstateOffset = 0, pstateSourcePos = SourcePos {sourceName = “(unknown)”, sourceLine = Pos 1, sourceColumn = Pos 1}, pstateTabWidth = Pos 8, pstateLinePrefix = “”}} (use -h to see usage)
hledger: balance assertion error in “/Users/simon/notes/2018.journal” (line 4949, column 54):
in transaction:
Transaction {tindex = 976, tsourcepos = JournalSourcePos “/Users/simon/notes/2018.journal” (4948,4950), tdate = 2018-09-01, tdate2 = Nothing, tstatus = *, tcode = “5VN72122C99690620”, tdescription = “add funds to paypal”, tcomment = “for:, time:06:53:51, type:Bank Deposit to PP Account , status:Pending, balance:6.99, gross:6.99, fee:0.00\n”, ttags = [(“for”,”“),(“time”,”06:53:51”),(“type”,”Bank Deposit to PP Account”),(“status”,”Pending”),(“balance”,”6.99”),(“gross”,”6.99”),(“fee”,”0.00”)], tpostings = [PostingPP {pdate=”Nothing”, pdate2=”Nothing”, pstatus=”“, paccount=”assets:personal:online:paypal”, pamount=Mixed [Amount {acommodity = “$”, aquantity = 6.99, aprice = NoPrice, astyle = AmountStylePP “L False 2 Just ‘.’ Nothing..”, amultiplier = False}], pcomment=”“, ptype=RegularPosting, ptags=[], pbalanceassertion=Just (Amount {acommodity = “$”, aquantity = 6.99, aprice = NoPrice, astyle = AmountStylePP “L False 2 Just ‘.’ Nothing..”, amultiplier = False},GenericSourcePos “/Users/simon/notes/2018.journal” 4949 54), ptransaction=Just “<txn>”, porigin=Nothing},PostingPP {pdate=”Nothing”, pdate2=”Nothing”, pstatus=”“, paccount=”assets:personal:bank:wf:checking”, pamount=Mixed [Amount {acommodity = “$”, aquantity = -6.99, aprice = NoPrice, astyle = AmountStylePP “L False 2 Just ‘.’ Nothing..”, amultiplier = False}], pcomment=”“, ptype=RegularPosting, ptags=[], pbalanceassertion=Nothing, ptransaction=Just “<txn>”, porigin=Nothing}], tpreceding_comment_lines = “”}
after posting:
assets:personal:online:paypal
http://no-color.org/ color should not be added by default if the `NO_COLOR` environment variable is present.
non-project-specific yaml configuration parameter `color:`.
Adopt the standard proposed at http://no-color.org/, that color should
not be added by default if the `NO_COLOR` environment variable is present.
‘ANSI’ control character sequences that stack uses to color some of its output. See `stack ls stack-colors –help` for more information.
non-project-specific yaml configuration parameter, allows a stack user to redefine the default styles that stack uses to color some of its output. See `stack –help` for more information.
`–color`, `–stack-colors`, `stack ls stack-colors` at the command line and for `color:` and `stack-colors:` in yaml configuration files.
$ bal –budget ^sm:exp date:jan -M cur:\$ –tree Budget performance in 2019/01:
hledger: Prelude.maximum: empty list
Two commands:
$ hledger bal –drop ‘-999999999999999’ $ hledger bal –drop=’-999999999999999’
Current output: hledger: could not parse drop number: –depth=999999999999999 (use -h to see usage) hledger: argument to drop must lie in the range 0 to 9223372036854775807, but is -999999999999999 (use -h to see usage)
My proposal would look like: hledger: drop’s argument ‘–depth=999999999999999’ must be a positive integer less than 9223372036854775807 hledger: drop’s argument ‘-999999999999999’ must be a positive integer less than 9223372036854775807
Variations: hledger: drop’s argument ‘-999999999999999’ must be a positive integer less than 2^63 hledger: drop’s argument ‘-999999999999999’ must between 0 and 2^63 hledger: drop’s argument ‘-999999999999999’ should be 0 <= N < 2^63 **
ie, change: $ hledger check-tag-files # compiles if there’s no compiled version
get actions from https://medium.com/@jdxcode/12-factor-cli-apps-dd3c227a0e46
hledger: balance assignments cannot be used with accounts which are posted to by transaction modifier rules (auto postings). Please write the posting amount explicitly, or remove the rule.
“` Guest72 Hi, does anybody know how to change the negative value color in powershell. It’s drakred and almost not readable on the dark blue background f-a not sure, but meanwhile using –color=never could help Guest72 better than dark red ;) “`
$ bal –alias a hledger: parse error at ParseErrorBundle {bundleErrors = TrivialError 1 (Just EndOfInput) (fromList [Tokens (‘=’ :| “”)]) :| [], bundlePosState = PosState {pstateInput = “a”, pstateOffset = 0, pstateSourcePos = SourcePos {sourceName = “–alias a”, sourceLine = Pos 1, sourceColumn = Pos 1}, pstateTabWidth = Pos 8, pstateLinePrefix = “”}}
ghci> :main areg sm.*foo -w 350,50,50 Transactions in sm:assets:foo and subaccounts: 2020-01-01 *** Exception: could not parse width option: ParseErrorBundle {bundleErrors = TrivialError 6 (Just (Tokens (‘,’ :| “”))) (fromList [Label (‘d’ :| “igit”),EndOfInput]) :| [], bundlePosState = PosState {pstateInput = “350,50,50”, pstateOffset = 0, pstateSourcePos = SourcePos {sourceName = “(unknown)”, sourceLine = Pos 1, sourceColumn = Pos 1}, pstateTabWidth = Pos 8, pstateLinePrefix = “”}} (use -h to see usage)
so eg both revenues and expenses sections of income statement are positive
~$ hledger-0.27.1 -f src/hledger/data/sample.journal -D date:2008/01 hledger-0.27.1: Unknown flag: -D
2016/04/01 * refill negative budget envelopes (personal)
[assets:personal:bank:wf:checking:month:gifts] $69.56 = 0
[assets:personal:bank:wf:checking:month:food] $97.58 = 0
[assets:personal:bank:wf:checking:month:personal care] $80.00 =
2016/04/01 * refill negative budget envelopes (personal)
[assets:personal:bank:wf:checking:month:gifts] $69.56 = 0
[assets:personal:bank:wf:checking:month:food] $97.58 = 0 <- failed, calculated: $7.12 (difference: +$7.12)
[assets:personal:bank:wf:checking:month:personal care] $80.00 =
1/1 a E4 @ $1 b ; <- should fill in -E4 @ $1 instead of -$4
reports should indicate whether each item has hidden subitems (and possibly include them in the report)
Chris Leyon, Ledger list 2021:
The entry for my house purchase looks like this:
2014-12-18 Buy house
Assets:Fixed:House $445,000.00 ; Selling price of house
Assets:Current:XYZ Bank:Checking $455.76
Expenses:Interest:Mortgage Interest $390.60
Expenses:Taxes:Property Tax $282.49 ; Current qtr taxes
Expenses:Taxes:Property Tax $2,154.00 ; Next qtr taxes
Expenses:Utilities:Sewer $18.45 ; Current qtr sewer
Expenses:Utilities:Sewer $141.48 ; Next qtr sewer
Expenses:House:Warranty
This establishes the “Liabilities:Loans:Mortgage Principal” account which tracks the loan balance. “Assets:Fixed:House” can be used to calculate your equity (as in home equity, not an equity account type). Various charges need to be paid at closing time: title fees, current and next quarter taxes, utility services, etc. It also categorizes “Expenses:Interest:Mortgage Interest” as a separate category from other types of interest, for tax purposes. Finally, it also seeds the “Assets:Current:Escrow” account which is the source account for paying all sorts of property tax and insurance expenses.
A monthly mortgage payment might look like this:
2015-03-23=2015-04-01 (1000) Loan Servicing Company
Liabilities:Loans:Mortgage Principal $585.63
Liabilities:Loans:Mortgage Principal $100.00 ; Pay a little extra principal every month
Expenses:Interest:Mortgage Interest $909.08
Assets:Current:Escrow
This set up has tracked my mortgage payments and balances for several years, down to the penny.
a convenient non-interactive version of hledger add; and an extension point for data entry validations/automations
hledger entry [ONELINEENTRY]
ONELINEENTRY is a single argument, in quotes: a journal entry using double-space instead of newlines
hledger entry ‘2021-01-01 * (123) farmers market expenses:food $10 assets:checking ; date:1/3’
hledger entry ‘farmers market expenses:food $10 assets:cash’
These will match the txn above, and make the postings shown: hledger entry ‘farmers’ # expenses:food $10, assets:cash -$10 hledger entry ‘farmers expenses:food $11’ # expenses:food $11, assets:cash -$11 hledger entry ‘farmers $11’ # same hledger entry ‘farmers 11’ # same hledger entry ‘farmers expenses:food 6 expenses:snacks 5’ # expenses:food $6, expenses:snacks $5, assets:cash -$11
hledger entry ‘farmers food 6 snacks 5’ # same
cf haskell/cabal#5867 (comment)
bal -YH -e tomorrow would be titled with tomorrow’s date instead of 12-31
hledger: clock-out time less than clock-in time in: 2021-09-17 * 12:00-06:00 (no-electronics) -6.00h
hledger: line 6: expected timeclock code o but got i CallStack (from HasCallStack): error, called at ./Hledger/Data/Timeclock.hs:85:32 in hledger-lib-1.22.99-HCWXy7WanhBI3o1AfvBpXy:Hledger.Data.Timeclock