From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuri Khan Newsgroups: gmane.emacs.help Subject: Re: Going through a list using the minibuffer Date: Sun, 13 Jun 2021 22:09:45 +0700 Message-ID: References: <87fsxmmxh8.fsf@zoho.eu> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40223"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs , Emanuel Berg To: arvid-harnack@lavache.com Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jun 13 17:10:25 2021 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lsRkm-000AEB-UR for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 13 Jun 2021 17:10:24 +0200 Original-Received: from localhost ([::1]:60924 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lsRkm-0004Zf-0X for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 13 Jun 2021 11:10:24 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46600) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lsRkN-0004XT-68 for help-gnu-emacs@gnu.org; Sun, 13 Jun 2021 11:09:59 -0400 Original-Received: from mail-ua1-x929.google.com ([2607:f8b0:4864:20::929]:38769) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lsRkL-0004Ga-H9 for help-gnu-emacs@gnu.org; Sun, 13 Jun 2021 11:09:58 -0400 Original-Received: by mail-ua1-x929.google.com with SMTP id d13so4511417uav.5 for ; Sun, 13 Jun 2021 08:09:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=ojofqW9UXPgpCPq9NLXJg8QKLLjgrwsYCgxr4U+QYQY=; b=JihameVJL9nYNeWScIfzy8C2B61AWmOHWD8uhiPYFVuEpbj/HrLd/NgFKp50wokQ6j yqP/UPcKggjLdF1ZWeKIcY5tbLH06qGE62sCs44n7kgEbtPmBt/kFJIB2RVYQshqDx48 /pov7YfCgiFgPJzxo9GkbZYhmcMRlv9occqdphEppmi0xvfCERoCimsqBnMs7ejewqPt L3Wie7HQ7Qyvuo6zDNwJFS7zAKfubaWsoAOU9oO+O/ngHXT+pxkU5gptucInootxuT5P 0D04vmKIhHlfoMvjpVts48uB+7HB8AFrv1C+mJCxSpovfHxIJoGKbMSnuDm7YV2SH9qf BGPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=ojofqW9UXPgpCPq9NLXJg8QKLLjgrwsYCgxr4U+QYQY=; b=CG16t2JDdmAeRghl7/muRHd/B+W5WK/dW0bg/tYpSBcXaSEyz2zZrwRDjTi84KfEUv G2FHsTWz+3RAbV1Afm0ZcBCp2r2Y36IRKKzwP5uLgvL1qyjjSbqjMavXV4KzqxfN1ijE zcE2T8B7mR/tP1u9nPfsMAPLmSZTKfz4hx8qC0NV5Jv6LhgY4jibPFGlwer3zo9wNliv YxtRTkPSbqENOh1rGlmZZr4MBC5GNAHPCGiAaaIhE1kjbqdlV3sI1CIG6z+JIFU9u1nn qbhIJK9axQcY4AkV+IwgcURZhWXiuy5BqXoRVxPGMF4o+byJNIK/VC9u+1qOhaFsRcUn nzhA== X-Gm-Message-State: AOAM533EqdjOqQ6BtS3aKs9tDuuHjpCq0oOSr9rrHjl+5tWlqIjiTizc T9UtxNorYpJj9uGxQztHpjANq3iQDnxk/2+RuKI= X-Google-Smtp-Source: ABdhPJyxhwZrmdIVAcA2a28Vb+KGHMMOG8Dp61UrA9WD7do3sWcgaSoFDdILLIeyaKdCvsygzyL0pNd4XFuxQ9sI7cw= X-Received: by 2002:ab0:60d9:: with SMTP id g25mr1030397uam.102.1623596996353; Sun, 13 Jun 2021 08:09:56 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::929; envelope-from=yurivkhan@gmail.com; helo=mail-ua1-x929.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:130793 Archived-At: On Sun, 13 Jun 2021 at 20:55, 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 =E2=80=98(completing-read "Choose a Greek letter: " '("alpha" "beta" "gamma") nil t)=E2=80=99, except that it will give you the selected option value rather than its index.