purcell / emacs.d

An Emacs configuration bundle with batteries included
BSD 2-Clause "Simplified" License
6.82k stars 2.04k forks source link

Advice for ledger to work from direnv using envrc #825

Closed tesujimath closed 1 year ago

tesujimath commented 1 year ago

Not completely sure if this is the right place for this, but it works for me, enabling the ledger binary to be found via direnv and shell.nix, locally.

purcell commented 1 year ago

Hmm, weird that this would be required, actually.

tesujimath commented 1 year ago

Without this, on opening my ledger file I get

File mode specification error: (error ‘ledger-binary-path’ (value: ledger) is not executable)

Whereas with this, all is well and flymake (I think) can find ledger. :shrug:

purcell commented 1 year ago

Thanks, I can reproduce this. What's happening here is that ledger-mode invokes the executable before any mode hooks run, and ultimately mode hooks are what cause the local environment to be established by envrc. I believe I've fixed this by instead setting ledger-mode-should-check-version.

tesujimath commented 1 year ago

Yes, that works, thanks!