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

Piping input to ledger program instead of providing a filename #290

Open
errge opened this issue Feb 16, 2021 · 0 comments
Open

Piping input to ledger program instead of providing a filename #290

errge opened this issue Feb 16, 2021 · 0 comments

Comments

@errge
Copy link
Contributor

errge commented Feb 16, 2021

This ticket is a feature request, not a bug report.

When using ledger-mode together with an encrypted (GPG) file, the mode is trying to run ledger -f foobar.gpg, which will obviously not work, since the file is encrypted. An alternative would be to provide an option (or maybe even make it default?) that would cause ledger-mode to communicate using stdin instead of a file.

So when any operation that requires a ledger-file (e.g. account listing, reports, check, etc.) is ran, it's standard input would be provided with all the text between (point-min) and (point-max). On the ledger side, the command line has to be modified to be ledger -f - instead of ledger -f filename.

This would solve other similar use-cases (not just encryption): e.g. editing a remote file over TRAMP, or a file inside a ZIP, it would be cool to use the locally installed ledger binary with a pipe.

Sorry for not providing a pull request right now, but I still wanted to log this idea, in the hopes that somebody else will work on it.

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

1 participant