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-report] Delay report command expansion #326

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kevinjfoley
Copy link
Contributor

Delays the expansion of the report command until execution time. This leaves
the command in `ledger-report-cmd' unexpanded, which prevents the expanded
version of the command from being edited / saved by the user.

Resolves #325

@enderw88
Copy link
Member

Good idea

Delays the expansion of the report command until execution time.  This leaves
the command in `ledger-report-cmd' unexpanded, which prevents the expanded
version of the command from being edited / saved by the user.

Resolves ledger#325
@kevinjfoley kevinjfoley force-pushed the report-delay-cmd-expansion branch from 0573def to 7746467 Compare February 4, 2022 00:33
@kevinjfoley
Copy link
Contributor Author

Good idea

Thanks! Anything else needed? I'm not sure what's wrong with the CI, I tried rebasing on the latest changes from master but it looks like it still isn't working.

@bcc32
Copy link
Collaborator

bcc32 commented Mar 17, 2024

I think this PR breaks a couple things. For one thing, it causes the user to be re-prompted for any format specifiers that imply a prompt, such as %(account), every time the report is run (e.g., if they modify and save the journal file). Maybe the most robust way to address that issue would be to cache the expansion of each format specifier in some buffer-local alist or something, or maybe the expanded and unexpanded commands should both be saved so that the appropriate one can be used at each call site.

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

Successfully merging this pull request may close these issues.

Editing a Report Command Edits the Expanded Form
3 participants