this post was submitted on 29 Nov 2023
1 points (100.0% liked)
Emacs
310 readers
2 users here now
A community for the timeless and infinitely powerful editor. Want to see what Emacs is capable of?!
Get Emacs
Rules
- Posts should be emacs related
- Be kind please
- Yes, we already know: Google results for "emacs" and "vi" link to each other. We good.
Emacs Resources
Emacs Tutorials
- Beginner’s Guide to Emacs
- Absolute Beginner's Guide to Emacs
- How to Learn Emacs: A Hand-drawn One-pager for Beginners
Useful Emacs configuration files and distributions
Quick pain-saver tip
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
I’d also worry that an eq test is a bit fragile, and could go mysteriously wrong if any step in the chain decided down the road to copy or duplicate the string.
Actually, I forgot how this works in most cases X-D.
And it happens through text properties, which backends add to their completion strings. Then the
annotation
andkind
operations look them up.Makes sense. I thought in the past the default completion system stripped out text properties? But I dimly recall that situation changed recently (v29?).
It is not only fragile, it is also wrong, since the default completion UI even deletes duplicate candidates.
Something like that would be generally easy to see very soon (completion popup without both icons and annotations). This approach has worked for years for both Emacs's default UI and company-mode, so it's hard to call it fragile.
I suppose it might have been a cause for investigation for some backend authors at some point, but backends would generally avoid internal copying anyway, for performance reasons if nothing else.