help-gnu-emacs
[Top][All Lists]
Advanced

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

Going through a list using the minibuffer


From: arvid-harnack
Subject: Going through a list using the minibuffer
Date: Sun, 13 Jun 2021 17:39:49 +0200 (CEST)

>From: Yuri Khan <yuri.v.khan@gmail.com>
>To: arvid-harnack@lavache.com
>Subject: Re: Going through a list using the minibuffer
>Date: 13/06/2021 17:09:45 Europe/Paris
>Cc: Emanuel Berg <moasenwood@zoho.eu>;
>   help-gnu-emacs <help-gnu-emacs@gnu.org>

>On Sun, 13 Jun 2021 at 20:55, <arvid-harnack@lavache.com> wrote:

>> Suppose I define a list namely '("alpha" "beta" "gamma")
>>
>> I would like to get the minibuffer to show me the options one by
>> one as the down and up arrow keys are pressed. Then in my
>> function I get the equivalent position "k" of the string in the
>> list.

>You basically want ‘(completing-read "Choose a Greek letter: "
>'("alpha" "beta" "gamma") nil t)’, except that it will give you the
>selected option value rather than its index.

You are right.  Yes.



reply via email to

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