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: result of completing-read contradicting require-match Date: Sun, 3 Jul 2022 02:54:50 +0700 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19177"; mail-complaints-to="usenet@ciao.gmane.io" To: carlmarcos@tutanota.com, Help Gnu Emacs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jul 02 21:55:41 2022 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 1o7jDQ-0004oA-W2 for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 02 Jul 2022 21:55:41 +0200 Original-Received: from localhost ([::1]:48852 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o7jDP-0003en-D2 for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 02 Jul 2022 15:55:39 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39968) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o7jCq-0003eO-Qh for help-gnu-emacs@gnu.org; Sat, 02 Jul 2022 15:55:04 -0400 Original-Received: from mail-il1-x134.google.com ([2607:f8b0:4864:20::134]:45616) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o7jCp-0006Fw-CR for help-gnu-emacs@gnu.org; Sat, 02 Jul 2022 15:55:04 -0400 Original-Received: by mail-il1-x134.google.com with SMTP id i17so3368833ils.12 for ; Sat, 02 Jul 2022 12:55:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=ADOgjmFwM8DF+g8fRgeFoNLYLVhF5YLy+ESJOmdSajg=; b=a/eLwMTtp9LniHzxwNOGBMXEJhwWnlezyWLlnLiZZ8ZcdmT1kJFlrSMm3iEuH/WrXe OptxAhtTpN4dI5c4ks7k9U+kL+iisdMb9pmiFGChbfWWoiNipNwXt+X8WJezVLmVtjCr Nx6QqfpaS6mnzOFXwZBr8OzEWuThuR1pFbOoictyODAQVJxTCEQ+wdtPL2NuTAUHceZ6 ASrL/8M2LeW9ZRmFTEqn470DpyZAuksl7tGvk1fnTR2IRFRPbT0wbYOiZfw0Lg8TGftR Qw6C0iEo/01kCW+T6D3huJl3sFu6xmHskLyoO07b/+jjAxObE7wg/UItIdLTrxo/52mC +DLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=ADOgjmFwM8DF+g8fRgeFoNLYLVhF5YLy+ESJOmdSajg=; b=gtCfg2NaZd894lBQTZZMNHJcorw1QI5YcrYgIu+FRdslsZo9DGCiNF+AhWXgD7DJ3D bmHPLB4SBBW0C2+fSTuGj96Ds/eBtUVzT+EiuLWOHpxpBKgV1dw0hI6psmYH90leoHzd o9ogzLLcnlT0PrlXVd9eTRAdUvTZ58ekCvQ+8IhSGxXPjYWh+aCwM+1VRdV7hU8/qbCq nZzcTiRl0oE+6wWPN7Ut7U6rNAqWwj0/HO5TKPnWelkDW9vL3nwadEnjclppU4khigUh hryGbPY/GNNm9x19Rq/U55js09XtM5mobPZskVvLx8ItpXxnLOj2dwsM/NWHCiiz6CL5 jjFw== X-Gm-Message-State: AJIora/M4Y7FTRgFCwdkHlLtpme40zHH9BOVS0Y8WhEKMhuKzBwx/w6K hj0ubIdDx8vElsIqIFAOpSmtf1r0BNvtyD31FyU= X-Google-Smtp-Source: AGRyM1v3fj6ZUX/Z9Xjut69+EpqCKw0J+Y5NxlMTTTXmSMuhwJ6O6xACfYH1JuUQrNovotC9N7YwEw4Uth529E7K4YY= X-Received: by 2002:a92:c544:0:b0:2d9:57b4:be08 with SMTP id a4-20020a92c544000000b002d957b4be08mr11746937ilj.312.1656791701368; Sat, 02 Jul 2022 12:55:01 -0700 (PDT) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::134; envelope-from=yurivkhan@gmail.com; helo=mail-il1-x134.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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 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:138264 Archived-At: On Sun, 3 Jul 2022 at 02:29, Jean Louis wrote: > REQUIRE-MATCH can take the following values: > - a function, which will be called with the input as the parameter. > If it returns a non-nil value, the minibuffer is exited with that value. > other way to persist asking until you get the true result is here: > > (defun rcd-repeat-until-not-empty-string (function &rest args) > "Repeat FUNCTION with optional ARGS until result is not empty string." > (let ((result)) > (while (string-empty-p (setq result (apply function args)))) > result)) Based on the quoted part of the docstring, you could probably pass a function that returns t for an allowed value, and nil for disallowed values, including an empty string or nil.