From: Jean Louis <bugs@gnu.support>
To: Yuri Khan <yuri.v.khan@gmail.com>
Cc: carlmarcos@tutanota.com, Help Gnu Emacs <help-gnu-emacs@gnu.org>
Subject: Re: result of completing-read contradicting require-match
Date: Sun, 3 Jul 2022 00:58:30 +0300 [thread overview]
Message-ID: <YsC/hgHye1QHD28M@protected.localdomain> (raw)
In-Reply-To: <CAP_d_8W6c33bq==fhOUFmRYRJ4vc9gXU_hfZe8YoZBKZRdLwfQ@mail.gmail.com>
* Yuri Khan <yuri.v.khan@gmail.com> [2022-07-02 23:39]:
> I meant a closure over the list of valid strings, something like this:
(let* ((choices '("name" "name-mode"))
(is-valid (lambda (s) (member s choices)))
(choice (completing-read "Type: " choices nil is-valid)))
choice) ⇒ results with ""
So it did not work in my development version of Emacs.
> I took the liberty to give variables sane names.
> I did not test this as my currently installed Emacs does not accept
> functions as the REQUIRE-MATCH argument. (Or, rather, it does but
> treats them as the “anything else” case.)
--
Jean
Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns
In support of Richard M. Stallman
https://stallmansupport.org/
next prev parent reply other threads:[~2022-07-02 21:58 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-02 18:58 result of completing-read contradicting require-match carlmarcos--- via Users list for the GNU Emacs text editor
2022-07-02 19:20 ` Jean Louis
2022-07-02 19:54 ` Yuri Khan
2022-07-02 20:07 ` Jean Louis
2022-07-02 20:38 ` Yuri Khan
2022-07-02 21:58 ` Jean Louis [this message]
2022-07-09 13:17 ` Jean Louis
2022-07-10 14:36 ` [External] : " Drew Adams
2022-07-10 17:56 ` Jean Louis
2022-07-02 21:13 ` carlmarcos--- via Users list for the GNU Emacs text editor
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YsC/hgHye1QHD28M@protected.localdomain \
--to=bugs@gnu.support \
--cc=carlmarcos@tutanota.com \
--cc=help-gnu-emacs@gnu.org \
--cc=yuri.v.khan@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.