[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [External] : Re: Stepping Back: A Wealth Of Completion systems Re: [

From: Drew Adams
Subject: RE: [External] : Re: Stepping Back: A Wealth Of Completion systems Re: [ELPA] New package: vertico
Date: Mon, 12 Apr 2021 19:21:51 +0000

> > I already mentioned that you can put the _full_ candidate
> > -- whatever Lisp object it might be -- on the _display_
> > candidate, which is just a string.
> I missed that the first time around! That's an interesting approach, and
> one that hadn't occurred to me. In the simplest case it ends up being
> way, way more code than just referencing the alist again, 

Why do you think so?  You have the string; you just use
`get-text-property' to get from it anything you need.

(Not to mention that looking up a key in an alist (1)
takes time and (2) doesn't allow for duplicate keys.)

All you're storing is a pointer.  The "object" you're
pointing to exists anyway, and needs to continue to exist
for you to do something with it.  You're adding nothing,
really, but a pointer. 

> but I can imagine it coming in handy in a larger system
> where the string travels through many moving parts.

I can't imagine what you're imagining. ;-)  It's about
`completing-read' only, however small your "system" is.

It requires that `completing-read' that doesn't strip
properties; that's all.

> Thanks.

You're welcome.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]