ledger-mode icon indicating copy to clipboard operation
ledger-mode copied to clipboard

Ledger Reconcile Can't Find Included Files

Open therobotreader opened this issue 1 year ago • 14 comments
trafficstars

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.

therobotreader avatar Jun 02 '24 07:06 therobotreader

@Mikeledger I have no idea what that means.

therobotreader avatar Jun 02 '24 14:06 therobotreader

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

therobotreader avatar Jun 02 '24 18:06 therobotreader

@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 avatar Jun 03 '24 01:06 tbm

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

therobotreader avatar Jun 03 '24 07:06 therobotreader

I can move it there

tbm avatar Jun 03 '24 07:06 tbm

Oh oops, that works too.

therobotreader avatar Jun 03 '24 07:06 therobotreader

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: @.***>

enderw88 avatar Jun 03 '24 13:06 enderw88

Oh ok, fair enough.

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

therobotreader avatar Jun 04 '24 07:06 therobotreader

@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.

bcc32 avatar Jun 04 '24 16:06 bcc32

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: @.***>

therobotreader avatar Jun 04 '24 20:06 therobotreader

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?

bcc32 avatar Jun 06 '24 00:06 bcc32

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

therobotreader avatar Jun 06 '24 07:06 therobotreader

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.

bgainor avatar Jun 07 '24 15:06 bgainor