ledger-mode
ledger-mode copied to clipboard
Ledger Reconcile Can't Find Included Files
Emacs version: 29.3 ledger version: 3.2.1-20200518 ledger-mode version: 20240537.2134
When I try to reconcile a file that includes another file, it errors out with: While parsing file "", line 5: Error: File to include was not found: "reconcile2.dat"
I ran this under emacs -Q to be sure.
reconcile1.dat:
include ./reconcile2.dat
2024-01-01 test
Test1 $1
Test3
reconcile2.dat:
2024-01-01 test2
Test3 $3
Test4
I tried it both with and without the ./ in the pathname.
@Mikeledger I have no idea what that means.
Hi @tbm I think you're the most active support guy? I'm pretty sure this is spam.
@sdubinsky some people confuse ledger-cli with Ledger the hardware crypto wallet; anyway, I deleted the comments.
Regarding your issue, should that be moved to https://github.com/ledger/ledger-mode ? If I understand right, it's an issue with the Emacs mode and not with ledger itself(?).
@tbm Oh yes, you're right. I'll put it there.
I can move it there
Oh oops, that works too.
This is not a bug. Just a feature I never implemented. It requires a lot more work than it’s worth to me. No one has ever wanted to tackle it.
Craig, Corona De Tucson, AZ [image: missile_flyout] enderw88.wordpress.com
On Mon, Jun 3, 2024 at 01:10 S Dubinsky @.***> wrote:
Oh oops, that works too.
— Reply to this email directly, view it on GitHub https://github.com/ledger/ledger-mode/issues/427#issuecomment-2144438750, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGWWLGLIOUX5M2TJHV34ITZFQJHZAVCNFSM6AAAAABIV4K6GWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNBUGQZTQNZVGA . You are receiving this because you are subscribed to this thread.Message ID: @.***>
Oh ok, fair enough.
For anyone else, my workaround is just to comment that line out before i do a reconcile.
@sdubinsky does it look like you might have the issue in #329? Maybe you just need to upgrade ledger itself?
I can't reproduce the issue you described:
$ ledger --version
Ledger 3.3.2-20230330
My ledger-mode is at 2681836ca2d5515827e8f5bb72d84ac54b2e2a3d in my personal fork, but that's based on a recent master-branch commit c66e3e9adfb5d91f83a401387fad345f12004c8a.
No, it works in ledger itself.
On Tue, Jun 4, 2024 at 7:25 PM Aaron Zeng @.***> wrote:
@sdubinsky https://github.com/sdubinsky does it look like you might have the issue in #329 https://github.com/ledger/ledger-mode/issues/329? Maybe you just need to upgrade ledger itself?
— Reply to this email directly, view it on GitHub https://github.com/ledger/ledger-mode/issues/427#issuecomment-2147942140, or unsubscribe https://github.com/notifications/unsubscribe-auth/AANHTMY2SC242S7N2INLP2TZFXS6VAVCNFSM6AAAAABIV4K6GWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNBXHE2DEMJUGA . You are receiving this because you were mentioned.Message ID: @.***>
Sorry, I'm not sure I understand your last comment. Just to clarify, the issue in #329 is that (the bad version of) ledger doesn't handle include properly when called like so:
ledger b -f - <reconcile1.dat
whereas the buggy build of ledger still behaves properly when running:
ledger b -f reconcile1.dat
Does your version of ledger behave properly when running the above commands?
Yes. As I said, my files work in ledger itself, they only break in ledger-mode.
I'm the reporter of #329, and FWIW this was fixed for me when I upgraded ledger to 3.3.2. I had a similar problem, where the file was being correctly included when I ran ledger from the command line, but not from ledger-reconcile in Emacs. It's worth noting that my include statement doesn't have the ./; I'm just including the basename of the file (which is in the same directory as my main ledger file), so if upgrading still doesn't fix it for you, you might try that.