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

Fixes in completion and interactive specs #52

Merged
merged 2 commits into from
Jun 15, 2024

Conversation

vkazanov
Copy link
Contributor

@vkazanov vkazanov commented Jun 6, 2024

Fixes extrated from #51:

  1. Fix completion by using new functions.
  2. Silence the compiler on 26.1 by fixing the interactive spec.

I feel that the completion-at-point logic is too fragile and needs more unit tests.

Thanks!

@vkazanov vkazanov mentioned this pull request Jun 6, 2024
@vkazanov
Copy link
Contributor Author

vkazanov commented Jun 7, 2024

Having looked at (beancount-completion-at-point) I am not even sure that tag and link completion can work at all.

The code in the completion function does roughly the following:

  1. go to beginning of line
  2. check if the line matches a regexp

The branch in cond that matches for tags and links has the following check:

(beancount-looking-at (concat "[ \t]+#\\\\([" beancount-tag-chars "]*\\\\)") 1 pos)

Note how this is describing a whitespace followed by a tag. But tags can only happen at the end of a transaction-defining line.

@blais blais merged commit 0a242af into beancount:main Jun 15, 2024
10 checks passed
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