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

Ledger won't visit the correct place in source file from the Ledger Check buffer

Open enderw88 opened this issue 4 months ago • 1 comments

Using the freshest ELPA version, run the ledger check function from the menu. You should be able to hit <RET> and have it go to that place in the buffer. If will go nearly to the beginning of the buffer

This is because the Ledger Check report uses EMACS markers while the visit source code expect line numbers, which is what the various ledger reports will put out.

I have a fix ready, but i have just move to a new machine and haven't gotten my GITHUB authentication working yet.

enderw88 avatar Aug 10 '25 01:08 enderw88

I see that this particular issue was resolved in #452. I was spending some time refactoring ledger-check.el and modernizing the Elisp when I noticed that it seems like the ledger-report functionality should just subsume it?

The latter already supports:

  1. Refreshing the output (including automatically when saving the ledger source buffer)
  2. The major mode derives from special-mode as is appropriate

And does not have some of the following bugs I noticed:

  1. "No errors" is inserted in the buffer even when there are errors, if those errors could not be parsed
  2. ledger-check does not respect the ledger-binary-path customization.

What are your thoughts on making ledger-check be basically a wrapper around ledger-report which simply passes in some special report command that just outputs any errors? (E.g., we can move the error-parsing logic to ledger-report which seems like a nice thing to have there anyway).

bcc32 avatar Dec 05 '25 06:12 bcc32