landakram / org-z

Lightweight, Org-mode flavored zettelkasten links.
GNU General Public License v3.0
43 stars 4 forks source link

selectrum-read has been deprecated #8

Closed minad closed 3 years ago

minad commented 3 years ago

You may want to use the internal selectrum--read API since you use the dynamic candidate feature. Note that the internal API will guarantee a bit less stability in the future, since the main focus of Selectrum is on providing a completing-read backend.

II-H commented 3 years ago

Can submit a suspicion that this matter is affecting Org-z. Inserting a link displays the warning that selectrum is selected as a backend but it isn’t installed (it is). Hope that this package is still being developed behind the scenes.

landakram commented 3 years ago

@II-H, This should be working on master now. I neglected to follow up here earlier because of a bug I found when using vanilla selectrum (without prescient). As of https://github.com/landakram/org-z/commit/8061763162c8fbd02532a184a7b6bfd7daad4511 this should be fixed.

@minad, thank you for raising the original issue. Ideally I would not use selectrum--read at all, but if I recall, I couldn't get dynamic completion tables with completing-read to work well with selectrum and prescient. I noticed your comment here on how consult handles things: https://github.com/raxod502/selectrum/issues/114#issuecomment-753441336. My use-case is dynamic but not necessarily asynchronous -- would you still recommend manually refreshing selectrum as an approach?

minad commented 3 years ago

@landakram I am not sure what to recommend honestly. The situation is a bit unclear. Maybe Selectrum will fully support dynamic tables at some point (https://github.com/raxod502/selectrum/pull/532), then you should use plain completing-read. Plain completing-read dynamic tables should already work with Icomplete and Vertico. Going the route via Consult is not a good idea since this use case is specifically targeted at asynchronous usage, which you don't have here. I would say the best strategy is to go with selectrum--read for now and maybe adjust to plain completing-read later on.