-
-
Notifications
You must be signed in to change notification settings - Fork 327
Parsing of .timeclock files is different from Ledger's #2365
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
See #2362 merged yesterday :) |
Specifically, hledger's o with no account name closes the most recent (by time) unclosed i. In my testing I thought that's what Ledger does. more details |
That's the fastest ever fixing of a bug that I've seen: it was fixed even before it was reported! I ran into this ambiguity today when improving my But, yes, I should have checked #2141 and #2142 before opening this issue.
Here's what I found:
|
If there's no ambiguity,
Had |
Thanks for the testing @sol. I edited my comment to add a "more details" link as well.
That's right, isn't it @reesmichael1 ? most recent by time, not most recent parsed ? |
Ambiguity only arises in 1 case: In case there's exactly 1 unclosed Ledger applies the
In any other case (multiple unclosed
|
hledger's usual behaviour is to prioritise dates/times rather than parse order, so I guess that will be preferable here, and hopefully we do that.
|
Sounds good. Given that this difference between hledger and ledger could only arise in an edge case (where parse order differs from time order) of an edge case (where there's exactly 1 open |
Sorry, I was away for a few days!
Yes, this should be how the new feature works. I think this thread sums up the difference well--I'll admit this particular edge case isn't something I anticipated! |
Uh oh!
There was an error while loading. Please reload this page.
This is a valid timeclock file for ledger (and presumably emacs):
However, this file cannot be parsed by hledger:
hledger presumably does this because a
o [date-time]
entry by itself is ambiguous if there are multiplei
entries: Which of the multiplei
entries are you trying to close?ledger enforces 2 rules:
i
consecutive entries, then theo
entry must disambiguate by mentioning the account.i
consecutive entries for the same account.hledger ought to do the same unless there are compelling reasons not to.
The text was updated successfully, but these errors were encountered: