emacs-devel
[Top][All Lists]
Advanced

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

Re: Stepping Back: A Wealth Of Completion systems Re: [ELPA] New package


From: Eric Abrahamsen
Subject: Re: Stepping Back: A Wealth Of Completion systems Re: [ELPA] New package: vertico
Date: Fri, 09 Apr 2021 21:20:53 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Thierry Volpiatto <thievol@posteo.net> writes:

> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>
>> We've all written this a million times:
>>
>> (let* ((choices (mapcar (lambda (elt)
>>                        (cons (make-string-from-thing elt)
>>                              elt))
>>                      my-list-of-things))
>>        (choice (completing-read "Choose: "
>>                              choices)))
>>   (cdr (assoc-string choice choices)))
>
> Sorry, I didn't follow the whole thread (too long), here some Helm
> features you may not be aware of:
>
>
> (helm-comp-read "test: " '(("un" . 1) ("deux" . 2) ("trois" . 3)))
> => 1
> (helm-comp-read "test: " '(("un" . 1) ("deux" . 2) ("trois" . 3)) :alistp nil)
> => "un"
> (helm-comp-read "test: " '(("un" . 1) ("deux" . 2) ("trois" . 3)) 
> :marked-candidates t)
> => (1)
> (helm-comp-read "test: " '(("un" . 1) ("deux" . 2) ("trois" . 3))
> :marked-candidates t :alistp nil)
> => ("un")
>
> Hope that helps.

Thanks! I think this is mostly about improvements/additions to vanilla
Emacs, though...




reply via email to

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