Skip to content
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

Ledger Reconcile Can't Find Included Files #427

Open
sdubinsky opened this issue Jun 2, 2024 · 14 comments
Open

Ledger Reconcile Can't Find Included Files #427

sdubinsky opened this issue Jun 2, 2024 · 14 comments

Comments

@sdubinsky
Copy link

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.

@sdubinsky
Copy link
Author

@Mikeledger I have no idea what that means.

@sdubinsky
Copy link
Author

Hi @tbm I think you're the most active support guy? I'm pretty sure this is spam.

@ledger ledger deleted a comment Jun 3, 2024
@ledger ledger deleted a comment Jun 3, 2024
@tbm
Copy link
Contributor

tbm commented Jun 3, 2024

@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(?).

@sdubinsky
Copy link
Author

@tbm Oh yes, you're right. I'll put it there.

@tbm
Copy link
Contributor

tbm commented Jun 3, 2024

I can move it there

@tbm tbm transferred this issue from ledger/ledger Jun 3, 2024
@sdubinsky
Copy link
Author

Oh oops, that works too.

@sdubinsky sdubinsky reopened this Jun 3, 2024
@enderw88
Copy link
Member

enderw88 commented Jun 3, 2024 via email

@sdubinsky
Copy link
Author

Oh ok, fair enough.

For anyone else, my workaround is just to comment that line out before i do a reconcile.

@bcc32
Copy link
Collaborator

bcc32 commented Jun 4, 2024

@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 2681836 in my personal fork, but that's based on a recent master-branch commit c66e3e9.

@sdubinsky
Copy link
Author

sdubinsky commented Jun 4, 2024 via email

@bcc32
Copy link
Collaborator

bcc32 commented Jun 6, 2024

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?

@sdubinsky
Copy link
Author

Yes. As I said, my files work in ledger itself, they only break in ledger-mode.

@bgainor
Copy link

bgainor commented Jun 7, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants
@enderw88 @bcc32 @bgainor @tbm @sdubinsky and others