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-complete: Read flycheck-ledger-pedantic in addition to ledger-flymake-be-pedantic #378

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

bcc32
Copy link
Collaborator

@bcc32 bcc32 commented Dec 4, 2023

No description provided.

@purcell
Copy link
Member

purcell commented Dec 5, 2023

Hmm, it remains extremely hacky to be modifying the results returned by this function based on globals.

@bcc32
Copy link
Collaborator Author

bcc32 commented Dec 6, 2023

I pushed a new commit that proposes the following change:

The following functions now take an optional argument include-postings, which, when non-nil, requests that accounts in postings are included:

  • ledger-accounts-in-buffer
  • ledger-accounts-list-in-buffer
  • ledger-accounts-list
  • ledger-find-accounts-in-buffer
  • ledger-accounts-tree

And now, ledger-complete-at-point simply passes in the argument based on the values of ledger-flymake-be-pedantic and flycheck-ledger-pedantic as before.

However, this change is potentially breaking since the optional argument's default may not coincide with the corresponding setting of ledger-flymake-be-pedantic in any given user's config. Using required arguments would also not work since existing callsites would not pass the argument.

bcc32 added 2 commits July 9, 2024 14:19
The fact that ledger-accounts-in-buffer, even when called from Lisp, depends on
a user customization related to flymake, is kind of an ugly hack.  Here, we move
it to the completion function instead, which at least has a better excuse for
its behavior to depend on customizations.
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.

2 participants