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

Be more strict about affixation functions #351

Open
clemera opened this issue Jan 10, 2021 · 8 comments
Open

Be more strict about affixation functions #351

clemera opened this issue Jan 10, 2021 · 8 comments

Comments

@clemera
Copy link
Collaborator

clemera commented Jan 10, 2021

See minad/marginalia#46 (comment). It seems Emacs 28 does has problems with nil values in the results and Selectrum ignores those.

minad added a commit to minad/marginalia that referenced this issue Mar 10, 2021
@clemera clemera closed this as completed Mar 10, 2021
@minad
Copy link
Contributor

minad commented Mar 10, 2021

Why did you close it? Selectrum should be more strict and not accept nil values from affixations. My Marginalia fix ensures that we are always returning strings.

@clemera
Copy link
Collaborator Author

clemera commented Mar 10, 2021

Thanks, I wasn't looking closely but it appeared to me nil values are accepted

@clemera clemera reopened this Mar 10, 2021
@clemera
Copy link
Collaborator Author

clemera commented Mar 10, 2021

Isn't your fix handling the situation when the affixation function returns nil? So upstream Emacs affixation functions return nil values no?

@minad
Copy link
Contributor

minad commented Mar 10, 2021

No, my fix fixes the marginalia annotation functions which may return nil. The marginalia affixation function is a small wrapper function.

@clemera
Copy link
Collaborator Author

clemera commented Mar 10, 2021

What does happen with default completion when there the affixation returns a nil value, is there an error?

@clemera
Copy link
Collaborator Author

clemera commented Mar 10, 2021

I haven't followed how the issue evolved on the Marginalia side, sooner or later I should install Emacs 28 do be able to check such things myself. I'm still waiting for the native compile branch to get merged into master :)

@jakanakaevangeli
Copy link
Contributor

jakanakaevangeli commented Mar 10, 2021 via email

@clemera
Copy link
Collaborator Author

clemera commented Mar 11, 2021

Okay, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants