GNU bug report logs - #65459
completing-read INITIAL-VALUE unaware of COLLECTION and REQUIRE-MATCH

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Heime <heimeborgia@HIDDEN>; dated Tue, 22 Aug 2023 22:05:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 65459 <at> debbugs.gnu.org:


Received: (at 65459) by debbugs.gnu.org; 5 Sep 2023 13:15:05 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Sep 05 09:15:05 2023
Received: from localhost ([127.0.0.1]:55068 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qdVtZ-00032S-4z
	for submit <at> debbugs.gnu.org; Tue, 05 Sep 2023 09:15:05 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:51350)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1qdVtW-00031R-A2
 for 65459 <at> debbugs.gnu.org; Tue, 05 Sep 2023 09:15:03 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1qdVtQ-0002ZG-6f; Tue, 05 Sep 2023 09:14:56 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=6tsMBpTGMic07hftN+3vI2eDVJQ5xGbaNRbxZrCHRH0=; b=PtjKdSeEqC9w
 5Av4Zj1qjzPHYyDphm3HkyyJk+8sxSjBYtpD20enhRh5K77EQink/BILHIzqZY9eERrSzE+liCi+X
 WEsPxjWQz40H9NQT9qh2h6N665sIUHa1vap+F46VvjIJePVjV84EEe0KPnflzSvC6EWaYRnXdMN7I
 Joho+9qOpjB2D3RUM0HQJBDirV9As5HTeoKWIhysBk+yOBjYpUGfQg8YKQfO99EpW4nGci+8uM4DN
 IedvoN9n1IcPC2Umx2hZHC4A2MUZyNxrsxRfQDUtt9S7qVu2cbvP+NbGi76OjL63ZM6Cw1NUQX8Yy
 vshiZWFX1aGWV2mFA58ABQ==;
Date: Tue, 05 Sep 2023 16:14:39 +0300
Message-Id: <83edjc4v9c.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
In-Reply-To: <jwvbkeglquw.fsf-monnier+emacs@HIDDEN> (message from Stefan
 Monnier on Tue, 05 Sep 2023 08:59:16 -0400)
Subject: Re: bug#65459: completing-read INITIAL-VALUE unaware of COLLECTION
 and REQUIRE-MATCH
References: <Z37akRtOZpCa8uyj_2oyIonmlmfE70EiqztTtZtYAVk_9eSK7BeC61kXORi4yHKRvkkF1Lnp87hvWQQ4ZnJ4TZr6Txhh3QgW-pfNAD2wSb0=@protonmail.com>
 <83jztmro8z.fsf@HIDDEN>
 <jVMlYwpHISTfEDJ7n7XwoXWq_e0TEmP6YI5KpgniW2tmVKr3POo7AKrr6-OXPn9bVWAH7XHPALB4dxrtLmZFBix-adNtRfPYZhre6rCE4zg=@protonmail.com>
 <jwvv8d57wdc.fsf-monnier+emacs@HIDDEN>
 <WGPneIBtyarvwY_U4xDeNuwtGXJIGuLxxvX2PFDeFHH01k8NRYg0fuQIEcrnkmGagCNWILPuTDtbh3tc1bqkp5DKdTEPolnkb_AgdJNfVa8=@protonmail.com>
 <jwv4jkpoj61.fsf-monnier+emacs@HIDDEN>
 <fvqSmekfcbFxYmnHMLbj8FTVXP7zY0afjAsxgtCMbZWeyhdTBWYa9g-R9nFxWBwZGeaZtUGJ9xYBIyYhdgAvqmrtY1G9w7dQnt6YAy2gGzs=@protonmail.com>
 <jwv7cpln1o8.fsf-monnier+emacs@HIDDEN>
 <b1bTYvprIGDrU8iKzoUE-JcUPusjV8zhTc34hcSS6CksX1VYMyHUTBQPX_XtjjE973BcbpdA8acOLsTUuSNV3ilEwtM9ZaRj25lzp7am7NM=@protonmail.com>
 <jwvedjt78ti.fsf-monnier+emacs@HIDDEN>
 <b63c3fe53037b9c4d8e8@HIDDEN>
 <jwvjztl5g5v.fsf-monnier+emacs@HIDDEN>
 <bb9dca5367728509e290@HIDDEN>
 <jwv1qfs5zol.fsf-monnier+emacs@HIDDEN>
 <596919925b3ff290adc3@HIDDEN>
 <jwvpm2xmxnx.fsf-monnier+emacs@HIDDEN> <83msy05182.fsf@HIDDEN>
 <jwvbkeglquw.fsf-monnier+emacs@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 65459
Cc: 65459 <at> debbugs.gnu.org, gregory@HIDDEN, heimeborgia@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Stefan Monnier <monnier@HIDDEN>
> Cc: gregory@HIDDEN,  heimeborgia@HIDDEN,  65459 <at> debbugs.gnu.org
> Date: Tue, 05 Sep 2023 08:59:16 -0400
> 
> [ I think it's the first time I send a manual change and you don't find
>   anything to improve in it.
>   Maybe you were just busy/tired, but I prefer to think that
>   I'm improving.  ]

I wasn't tired, FWIW.

> Thanks, pushed,

Thanks.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#65459; Package emacs. Full text available.

Message received at 65459 <at> debbugs.gnu.org:


Received: (at 65459) by debbugs.gnu.org; 5 Sep 2023 12:59:27 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Sep 05 08:59:27 2023
Received: from localhost ([127.0.0.1]:54989 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qdVeR-0002c9-JP
	for submit <at> debbugs.gnu.org; Tue, 05 Sep 2023 08:59:27 -0400
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:13818)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1qdVeP-0002bv-0b
 for 65459 <at> debbugs.gnu.org; Tue, 05 Sep 2023 08:59:25 -0400
Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1])
 by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 1AF524445C1;
 Tue,  5 Sep 2023 08:59:19 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1693918757;
 bh=TZ0MSaHiAmpomRNTBFuXnXwVeUw+esID1XD6eS72E1A=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=gaQtcvIeNUpWciN2FTF90vkrXcrc3UmYXzDbw6J5olNKdAQ64t01K8NY5n9z8uO7Y
 ocVf4GeDOoGldwQR0Gfr44N6k6/Gy/oZbYSliIgSh9LOoyLFBqbRIjMnupwGtNf3nc
 kx7OwuWpT83HS5Gpk6sOAUxPnrjPvsKi49sZgyumg0URKEj7s8UbcvRxJuQ8FCza67
 azUsmxV+VwG+H5h4T4xd50N6kSv1mxuEde5mPFJ19cXao7qJInq7sCNSqnJu8hanQ7
 FMENAOHxrqB7Z5vC2vWdzGnt1ClPlKyYn76Xr8m+b/Jzi7BqJ/rPaygl/PGD1FwsKC
 vFEFPp0mQcFrg==
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id BF2024445B2;
 Tue,  5 Sep 2023 08:59:17 -0400 (EDT)
Received: from pastel (69-165-136-223.dsl.teksavvy.com [69.165.136.223])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 778D312034B;
 Tue,  5 Sep 2023 08:59:17 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#65459: completing-read INITIAL-VALUE unaware of COLLECTION
 and REQUIRE-MATCH
In-Reply-To: <83msy05182.fsf@HIDDEN> (Eli Zaretskii's message of "Tue, 05 Sep
 2023 14:05:49 +0300")
Message-ID: <jwvbkeglquw.fsf-monnier+emacs@HIDDEN>
References: <Z37akRtOZpCa8uyj_2oyIonmlmfE70EiqztTtZtYAVk_9eSK7BeC61kXORi4yHKRvkkF1Lnp87hvWQQ4ZnJ4TZr6Txhh3QgW-pfNAD2wSb0=@protonmail.com>
 <83jztmro8z.fsf@HIDDEN>
 <jVMlYwpHISTfEDJ7n7XwoXWq_e0TEmP6YI5KpgniW2tmVKr3POo7AKrr6-OXPn9bVWAH7XHPALB4dxrtLmZFBix-adNtRfPYZhre6rCE4zg=@protonmail.com>
 <jwvv8d57wdc.fsf-monnier+emacs@HIDDEN>
 <WGPneIBtyarvwY_U4xDeNuwtGXJIGuLxxvX2PFDeFHH01k8NRYg0fuQIEcrnkmGagCNWILPuTDtbh3tc1bqkp5DKdTEPolnkb_AgdJNfVa8=@protonmail.com>
 <jwv4jkpoj61.fsf-monnier+emacs@HIDDEN>
 <fvqSmekfcbFxYmnHMLbj8FTVXP7zY0afjAsxgtCMbZWeyhdTBWYa9g-R9nFxWBwZGeaZtUGJ9xYBIyYhdgAvqmrtY1G9w7dQnt6YAy2gGzs=@protonmail.com>
 <jwv7cpln1o8.fsf-monnier+emacs@HIDDEN>
 <b1bTYvprIGDrU8iKzoUE-JcUPusjV8zhTc34hcSS6CksX1VYMyHUTBQPX_XtjjE973BcbpdA8acOLsTUuSNV3ilEwtM9ZaRj25lzp7am7NM=@protonmail.com>
 <jwvedjt78ti.fsf-monnier+emacs@HIDDEN>
 <b63c3fe53037b9c4d8e8@HIDDEN>
 <jwvjztl5g5v.fsf-monnier+emacs@HIDDEN>
 <bb9dca5367728509e290@HIDDEN>
 <jwv1qfs5zol.fsf-monnier+emacs@HIDDEN>
 <596919925b3ff290adc3@HIDDEN>
 <jwvpm2xmxnx.fsf-monnier+emacs@HIDDEN> <83msy05182.fsf@HIDDEN>
Date: Tue, 05 Sep 2023 08:59:16 -0400
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 AWL -0.118 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain
 DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from
 domain
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 65459
Cc: 65459 <at> debbugs.gnu.org, gregory@HIDDEN, heimeborgia@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

>> > Thanks, that clarifies that question!  Perhaps a paragraph along those lines
>> > could be added to "(elisp)Advising Functions"?
>> What about the following?
> LGTM, thanks.

[ I think it's the first time I send a manual change and you don't find
  anything to improve in it.
  Maybe you were just busy/tired, but I prefer to think that
  I'm improving.  ]

Thanks, pushed,


        Stefan





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#65459; Package emacs. Full text available.

Message received at 65459 <at> debbugs.gnu.org:


Received: (at 65459) by debbugs.gnu.org; 5 Sep 2023 11:06:19 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Sep 05 07:06:19 2023
Received: from localhost ([127.0.0.1]:54343 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qdTsw-0008QK-Ox
	for submit <at> debbugs.gnu.org; Tue, 05 Sep 2023 07:06:19 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:51692)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1qdTsq-0008Q0-V4
 for 65459 <at> debbugs.gnu.org; Tue, 05 Sep 2023 07:06:17 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1qdTsk-0001WO-V7; Tue, 05 Sep 2023 07:06:06 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=/TzRKd6ciecJEUYDdRqTkLwp1CpsNQ0f+BTQoE2sxJE=; b=a989mWi2N5iY
 /TjqRTO4HnTyvmO7iDF1nNwd5BipQB1wj9mhrE+Jkst/q0kO9xT8UmkKlbWldboeP26TqDb5iigCd
 5VEnnKsuAmD9PIVd4jmcEkIz8n5bphZ6QeMIm/J2JK9XK1QAsRNzGxLfeDSsivlc0gQ4HPLKLlubE
 qHyGHvvapRXHvN2rVZUERHxN4Q3O5nN3VwsnJKePbv5YJhNJDeNuPTttq9dhrqzJPzk9lEvGQey+A
 CY0ttHw3FSkihtWqvWHAjwUVRVychiQaLvgsfE7p/Ua3JAwNXY8KTlvh+BeFfr9BWFu9/hBYIC2rt
 /68Tz2i7rjy0DeAPa9uS/g==;
Date: Tue, 05 Sep 2023 14:05:49 +0300
Message-Id: <83msy05182.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
In-Reply-To: <jwvpm2xmxnx.fsf-monnier+emacs@HIDDEN> (message from Stefan
 Monnier on Mon, 04 Sep 2023 17:35:43 -0400)
Subject: Re: bug#65459: completing-read INITIAL-VALUE unaware of COLLECTION
 and REQUIRE-MATCH
References: <Z37akRtOZpCa8uyj_2oyIonmlmfE70EiqztTtZtYAVk_9eSK7BeC61kXORi4yHKRvkkF1Lnp87hvWQQ4ZnJ4TZr6Txhh3QgW-pfNAD2wSb0=@protonmail.com>
 <83jztmro8z.fsf@HIDDEN>
 <jVMlYwpHISTfEDJ7n7XwoXWq_e0TEmP6YI5KpgniW2tmVKr3POo7AKrr6-OXPn9bVWAH7XHPALB4dxrtLmZFBix-adNtRfPYZhre6rCE4zg=@protonmail.com>
 <jwvv8d57wdc.fsf-monnier+emacs@HIDDEN>
 <WGPneIBtyarvwY_U4xDeNuwtGXJIGuLxxvX2PFDeFHH01k8NRYg0fuQIEcrnkmGagCNWILPuTDtbh3tc1bqkp5DKdTEPolnkb_AgdJNfVa8=@protonmail.com>
 <jwv4jkpoj61.fsf-monnier+emacs@HIDDEN>
 <fvqSmekfcbFxYmnHMLbj8FTVXP7zY0afjAsxgtCMbZWeyhdTBWYa9g-R9nFxWBwZGeaZtUGJ9xYBIyYhdgAvqmrtY1G9w7dQnt6YAy2gGzs=@protonmail.com>
 <jwv7cpln1o8.fsf-monnier+emacs@HIDDEN>
 <b1bTYvprIGDrU8iKzoUE-JcUPusjV8zhTc34hcSS6CksX1VYMyHUTBQPX_XtjjE973BcbpdA8acOLsTUuSNV3ilEwtM9ZaRj25lzp7am7NM=@protonmail.com>
 <jwvedjt78ti.fsf-monnier+emacs@HIDDEN>
 <b63c3fe53037b9c4d8e8@HIDDEN>
 <jwvjztl5g5v.fsf-monnier+emacs@HIDDEN>
 <bb9dca5367728509e290@HIDDEN>
 <jwv1qfs5zol.fsf-monnier+emacs@HIDDEN>
 <596919925b3ff290adc3@HIDDEN> <jwvpm2xmxnx.fsf-monnier+emacs@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 65459
Cc: 65459 <at> debbugs.gnu.org, gregory@HIDDEN, heimeborgia@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Stefan Monnier <monnier@HIDDEN>
> Cc: Heime <heimeborgia@HIDDEN>,  Eli Zaretskii <eliz@HIDDEN>,
>   65459 <at> debbugs.gnu.org
> Date: Mon, 04 Sep 2023 17:35:43 -0400
> 
> > Thanks, that clarifies that question!  Perhaps a paragraph along those lines
> > could be added to "(elisp)Advising Functions"?
> 
> What about the following?

LGTM, thanks.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#65459; Package emacs. Full text available.

Message received at 65459 <at> debbugs.gnu.org:


Received: (at 65459) by debbugs.gnu.org; 4 Sep 2023 22:16:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 04 18:16:26 2023
Received: from localhost ([127.0.0.1]:52871 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qdHru-0004eb-1U
	for submit <at> debbugs.gnu.org; Mon, 04 Sep 2023 18:16:26 -0400
Received: from mail-lj1-x22f.google.com ([2a00:1450:4864:20::22f]:48285)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <stefankangas@HIDDEN>) id 1qdHrq-0004eN-Ku
 for 65459 <at> debbugs.gnu.org; Mon, 04 Sep 2023 18:16:24 -0400
Received: by mail-lj1-x22f.google.com with SMTP id
 38308e7fff4ca-2bcc4347d2dso27344031fa.0
 for <65459 <at> debbugs.gnu.org>; Mon, 04 Sep 2023 15:16:22 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20221208; t=1693865776; x=1694470576; darn=debbugs.gnu.org;
 h=cc:to:subject:message-id:date:mime-version:references:in-reply-to
 :from:from:to:cc:subject:date:message-id:reply-to;
 bh=zm3JHSAXaXfT8aPkLV1e4eNLxMh+/t+GgWX8NQ2oIT8=;
 b=rCbP3sGOhfhODdTqM/ih/qr77CH0TCuUxpPKIjYnstgqAsjdmM+/VTtEhOalQYx6lO
 YJA5q82uDJtHkNQBNi62lpKfRJumdWJmhVTSHCouzxDtxhuulv3D/p10TnjVxgqCUyJS
 HNZhT+EIO0oLdibs2R2jeAw23d73PMpHL4kfnEzRKRQyvJXlWogbIXP0sPzUtdW9ZblT
 ca+oXEWpZFL/AgyEZBzERvUKbQdYTXhTjEU2VPuQpZNbrQVHgl1OR04U/OP4isvJVRAE
 VuVWb7SODozqd6UpnseZ5K35lS0y1UVuZ/H7drgd8xBjxDdN2sTL16oViLsJNTduVJiT
 PXnw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20221208; t=1693865776; x=1694470576;
 h=cc:to:subject:message-id:date:mime-version:references:in-reply-to
 :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
 bh=zm3JHSAXaXfT8aPkLV1e4eNLxMh+/t+GgWX8NQ2oIT8=;
 b=B8te9olRrrKH5pCvjipVkBBem6vISe7fnL7PAgZZryl+cJrl45XjBWxj9ey7waoApb
 kqVVbhI8uePcaI7+Kjx1Hq7Qjjy6t6pQUzyRGQc+gmczYeDyEoCfEjLPCPW0L6SNH6FS
 lEC9FJGKGp+8MiaEIKMlPIuhcpy7rdOJK9vxVkCvYSFrCzBTHSLzJDh4HkJq31R12e4Z
 ChTYLcO9KRwMRam0FHXl/nJDIjCE5rjCBNDuFLDd4sBA9IpK4MFkWm5/mhGTyuejIrIN
 uWnEdKn5xPkiQSUA31kcwTuXc8rL3TDRLr9tFuyOskW/yDt7cgbZbYnxiAZREY3UBWCE
 AhZA==
X-Gm-Message-State: AOJu0YyIJ30lZHiCu9hM+Y2udtuZQUCg2q5E+gJOIV8edF4NIOkcQePW
 zpq6yG4hhNlsZfimVScUVv8GvPQy3sMvrXjwt9g=
X-Google-Smtp-Source: AGHT+IEhT8Flg1IysBrTm9VH0b8URCFHd89KOILgZHhPUyivaxp2CnGSdYNaio+WODA/gv/prtEQl7yPkBk3YUTsghE=
X-Received: by 2002:a05:6512:348b:b0:4f3:9136:9cd0 with SMTP id
 v11-20020a056512348b00b004f391369cd0mr6877594lfr.44.1693865776282; Mon, 04
 Sep 2023 15:16:16 -0700 (PDT)
Received: from 753933720722 named unknown by gmailapi.google.com with
 HTTPREST; Mon, 4 Sep 2023 15:16:15 -0700
From: Stefan Kangas <stefankangas@HIDDEN>
In-Reply-To: <jwvpm2xmxnx.fsf-monnier+emacs@HIDDEN>
References: <Z37akRtOZpCa8uyj_2oyIonmlmfE70EiqztTtZtYAVk_9eSK7BeC61kXORi4yHKRvkkF1Lnp87hvWQQ4ZnJ4TZr6Txhh3QgW-pfNAD2wSb0=@protonmail.com>
 <83jztmro8z.fsf@HIDDEN>
 <jVMlYwpHISTfEDJ7n7XwoXWq_e0TEmP6YI5KpgniW2tmVKr3POo7AKrr6-OXPn9bVWAH7XHPALB4dxrtLmZFBix-adNtRfPYZhre6rCE4zg=@protonmail.com>
 <jwvv8d57wdc.fsf-monnier+emacs@HIDDEN>
 <WGPneIBtyarvwY_U4xDeNuwtGXJIGuLxxvX2PFDeFHH01k8NRYg0fuQIEcrnkmGagCNWILPuTDtbh3tc1bqkp5DKdTEPolnkb_AgdJNfVa8=@protonmail.com>
 <jwv4jkpoj61.fsf-monnier+emacs@HIDDEN>
 <fvqSmekfcbFxYmnHMLbj8FTVXP7zY0afjAsxgtCMbZWeyhdTBWYa9g-R9nFxWBwZGeaZtUGJ9xYBIyYhdgAvqmrtY1G9w7dQnt6YAy2gGzs=@protonmail.com>
 <jwv7cpln1o8.fsf-monnier+emacs@HIDDEN>
 <b1bTYvprIGDrU8iKzoUE-JcUPusjV8zhTc34hcSS6CksX1VYMyHUTBQPX_XtjjE973BcbpdA8acOLsTUuSNV3ilEwtM9ZaRj25lzp7am7NM=@protonmail.com>
 <jwvedjt78ti.fsf-monnier+emacs@HIDDEN> <b63c3fe53037b9c4d8e8@HIDDEN>
 <jwvjztl5g5v.fsf-monnier+emacs@HIDDEN> <bb9dca5367728509e290@HIDDEN>
 <jwv1qfs5zol.fsf-monnier+emacs@HIDDEN> <596919925b3ff290adc3@HIDDEN>
 <jwvpm2xmxnx.fsf-monnier+emacs@HIDDEN>
MIME-Version: 1.0
Date: Mon, 4 Sep 2023 15:16:15 -0700
Message-ID: <CADwFkmkfYdNs5vSkbgt_T2ht22hTXkUzn7bpBmwBgnKbbTRJMg@HIDDEN>
Subject: Re: bug#65459: completing-read INITIAL-VALUE unaware of COLLECTION
 and REQUIRE-MATCH
To: Stefan Monnier <monnier@HIDDEN>,
 Gregory Heytings <gregory@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 65459
Cc: Heime <heimeborgia@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>,
 65459 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of
text editors" <bug-gnu-emacs@HIDDEN> writes:

>> Thanks, that clarifies that question!  Perhaps a paragraph along those lines
>> could be added to "(elisp)Advising Functions"?
>
> What about the following?

I think it's a good addition.

> diff --git a/doc/lispref/functions.texi b/doc/lispref/functions.texi
> index 53525e6b386..236b823e7e6 100644
> --- a/doc/lispref/functions.texi
> +++ b/doc/lispref/functions.texi
> @@ -1994,9 +1994,16 @@ Advising Named Functions
>  debugging does not notice or remember that the function has been modified
>  by advice.
>
> -  For these reasons, advice should be reserved for the cases where you
> -cannot modify a function's behavior in any other way.  If it is
> -possible to do the same thing via a hook, that is preferable
> +  Note that the problems are not due to advice per se, but to the act
> +of modifying a named function.  It is even more problematic to modify
> +a named function via lower-level primitives like @code{fset},
> +@code{defalias}, or @code{cl-letf}.  From that point of view, advice
> +is the better way to modify a named function because it keeps track of
> +the modifications, so they can be listed and undone.
> +
> +  Modifying a named function should be reserved for
> +the cases where you cannot modify Emacs' behavior in any other way.
> +If it is possible to do the same thing via a hook, that is preferable
>  (@pxref{Hooks}).  If you simply want to change what a particular key
>  does, it may be better to write a new command, and remap the old
>  command's key bindings to the new one (@pxref{Remapping Commands}).




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#65459; Package emacs. Full text available.

Message received at 65459 <at> debbugs.gnu.org:


Received: (at 65459) by debbugs.gnu.org; 4 Sep 2023 21:35:59 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 04 17:35:59 2023
Received: from localhost ([127.0.0.1]:52853 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qdHEl-0003aU-6X
	for submit <at> debbugs.gnu.org; Mon, 04 Sep 2023 17:35:59 -0400
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:61335)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1qdHEi-0003aH-GQ
 for 65459 <at> debbugs.gnu.org; Mon, 04 Sep 2023 17:35:58 -0400
Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1])
 by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id DBA3944452B;
 Mon,  4 Sep 2023 17:35:50 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1693863344;
 bh=ooa78AgcWmYHJucr5abnIZCQF+6gjOIRqGQxhkrzaMQ=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=nzyDNgkMU82lvRdJO+fFttTPr6RD+oeSk8FdFP4TwK9ExYVKodihlnBhjjkKeGg6U
 kaFz4Wc9mVR+LujC6G8VK+K/xlCUstMUQMdOLVFhnmDCDiTvd9uy04t3O2S+YX1pAv
 RjDmIuPbidk0YMTqJV1bTK1GYaMuusc45i/DwS5b0EGE0fWWaKFggNIo31z3gKr0eA
 5iyWSSGMF8/RTMtDaWWzA/go+0mMdT25Gz4wN+j+H+619sL1kHRXqplzIpjx0I512V
 qFYbtX+3H27lxCnKrrRc2+oktRRNyn5RHrlaxg5Fhv1GUnxbTP3pEWsnPDUks5Tkjb
 r/3NsDBb3r2qQ==
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id DB0434444F6;
 Mon,  4 Sep 2023 17:35:44 -0400 (EDT)
Received: from pastel (69-165-136-223.dsl.teksavvy.com [69.165.136.223])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 89BD51202AF;
 Mon,  4 Sep 2023 17:35:44 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Gregory Heytings <gregory@HIDDEN>
Subject: Re: bug#65459: completing-read INITIAL-VALUE unaware of COLLECTION
 and REQUIRE-MATCH
In-Reply-To: <596919925b3ff290adc3@HIDDEN> (Gregory Heytings's message
 of "Sat, 26 Aug 2023 08:06:39 +0000")
Message-ID: <jwvpm2xmxnx.fsf-monnier+emacs@HIDDEN>
References: <Z37akRtOZpCa8uyj_2oyIonmlmfE70EiqztTtZtYAVk_9eSK7BeC61kXORi4yHKRvkkF1Lnp87hvWQQ4ZnJ4TZr6Txhh3QgW-pfNAD2wSb0=@protonmail.com>
 <83jztmro8z.fsf@HIDDEN>
 <jVMlYwpHISTfEDJ7n7XwoXWq_e0TEmP6YI5KpgniW2tmVKr3POo7AKrr6-OXPn9bVWAH7XHPALB4dxrtLmZFBix-adNtRfPYZhre6rCE4zg=@protonmail.com>
 <jwvv8d57wdc.fsf-monnier+emacs@HIDDEN>
 <WGPneIBtyarvwY_U4xDeNuwtGXJIGuLxxvX2PFDeFHH01k8NRYg0fuQIEcrnkmGagCNWILPuTDtbh3tc1bqkp5DKdTEPolnkb_AgdJNfVa8=@protonmail.com>
 <jwv4jkpoj61.fsf-monnier+emacs@HIDDEN>
 <fvqSmekfcbFxYmnHMLbj8FTVXP7zY0afjAsxgtCMbZWeyhdTBWYa9g-R9nFxWBwZGeaZtUGJ9xYBIyYhdgAvqmrtY1G9w7dQnt6YAy2gGzs=@protonmail.com>
 <jwv7cpln1o8.fsf-monnier+emacs@HIDDEN>
 <b1bTYvprIGDrU8iKzoUE-JcUPusjV8zhTc34hcSS6CksX1VYMyHUTBQPX_XtjjE973BcbpdA8acOLsTUuSNV3ilEwtM9ZaRj25lzp7am7NM=@protonmail.com>
 <jwvedjt78ti.fsf-monnier+emacs@HIDDEN>
 <b63c3fe53037b9c4d8e8@HIDDEN>
 <jwvjztl5g5v.fsf-monnier+emacs@HIDDEN>
 <bb9dca5367728509e290@HIDDEN>
 <jwv1qfs5zol.fsf-monnier+emacs@HIDDEN>
 <596919925b3ff290adc3@HIDDEN>
Date: Mon, 04 Sep 2023 17:35:43 -0400
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 AWL -0.127 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain
 DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from
 domain
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 65459
Cc: 65459 <at> debbugs.gnu.org, Eli Zaretskii <eliz@HIDDEN>,
 Heime <heimeborgia@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Thanks, that clarifies that question!  Perhaps a paragraph along those lines
> could be added to "(elisp)Advising Functions"?

What about the following?


        Stefan


diff --git a/doc/lispref/functions.texi b/doc/lispref/functions.texi
index 53525e6b386..236b823e7e6 100644
--- a/doc/lispref/functions.texi
+++ b/doc/lispref/functions.texi
@@ -1994,9 +1994,16 @@ Advising Named Functions
 debugging does not notice or remember that the function has been modified
 by advice.
 
-  For these reasons, advice should be reserved for the cases where you
-cannot modify a function's behavior in any other way.  If it is
-possible to do the same thing via a hook, that is preferable
+  Note that the problems are not due to advice per se, but to the act
+of modifying a named function.  It is even more problematic to modify
+a named function via lower-level primitives like @code{fset},
+@code{defalias}, or @code{cl-letf}.  From that point of view, advice
+is the better way to modify a named function because it keeps track of
+the modifications, so they can be listed and undone.
+
+  Modifying a named function should be reserved for
+the cases where you cannot modify Emacs' behavior in any other way.
+If it is possible to do the same thing via a hook, that is preferable
 (@pxref{Hooks}).  If you simply want to change what a particular key
 does, it may be better to write a new command, and remap the old
 command's key bindings to the new one (@pxref{Remapping Commands}).





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#65459; Package emacs. Full text available.

Message received at 65459 <at> debbugs.gnu.org:


Received: (at 65459) by debbugs.gnu.org; 31 Aug 2023 09:43:27 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Aug 31 05:43:27 2023
Received: from localhost ([127.0.0.1]:54886 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qbeD1-000333-F5
	for submit <at> debbugs.gnu.org; Thu, 31 Aug 2023 05:43:27 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:42678)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1qbeCz-00032p-Dq
 for 65459 <at> debbugs.gnu.org; Thu, 31 Aug 2023 05:43:26 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1qbeCm-0007sU-1x; Thu, 31 Aug 2023 05:43:12 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=HBHUpkFVKQB/sygCFr8UU7IjWNRqtpeZxc8hLRVT0Bc=; b=gpouuj5zyUTH
 Dql1pJhf1WTAfQvYJYupYHPW5hysybOUSOas2Y7l8qaPuk0bazg9Yi1lMpXnl/+bAcwp/ZteoaZLu
 YBE0vvluTQdVTPtBDO13veB+61YuIdIMcN/NIbYynNP9VGtmm2xagc9ILrmvX/TwNRvL8m43feOrC
 /ArGx1zptIknRIdRzsOmdyVvrZeVMeReyCRC7UnxU8Qng1SLL7xAuGtyyAoA58Qx2aC9WCjc+k1fW
 BWjfOZRE0rkESvedVA/tjGPbmMKYiABEKbjVhrFkvDNjIktCHPcHoo7OsBUrP/S/GudBZcW7fN6om
 l4u4LraSSWVVgP82/Br1mw==;
Date: Thu, 31 Aug 2023 12:42:54 +0300
Message-Id: <83il8veee9.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Gregory Heytings <gregory@HIDDEN>
In-Reply-To: <596919925b3ff290adc3@HIDDEN> (message from Gregory
 Heytings on Sat, 26 Aug 2023 08:06:39 +0000)
Subject: Re: bug#65459: completing-read INITIAL-VALUE unaware of COLLECTION
 and REQUIRE-MATCH
References: <Z37akRtOZpCa8uyj_2oyIonmlmfE70EiqztTtZtYAVk_9eSK7BeC61kXORi4yHKRvkkF1Lnp87hvWQQ4ZnJ4TZr6Txhh3QgW-pfNAD2wSb0=@protonmail.com>
 <83jztmro8z.fsf@HIDDEN>
 <jVMlYwpHISTfEDJ7n7XwoXWq_e0TEmP6YI5KpgniW2tmVKr3POo7AKrr6-OXPn9bVWAH7XHPALB4dxrtLmZFBix-adNtRfPYZhre6rCE4zg=@protonmail.com>
 <jwvv8d57wdc.fsf-monnier+emacs@HIDDEN>
 <WGPneIBtyarvwY_U4xDeNuwtGXJIGuLxxvX2PFDeFHH01k8NRYg0fuQIEcrnkmGagCNWILPuTDtbh3tc1bqkp5DKdTEPolnkb_AgdJNfVa8=@protonmail.com>
 <jwv4jkpoj61.fsf-monnier+emacs@HIDDEN>
 <fvqSmekfcbFxYmnHMLbj8FTVXP7zY0afjAsxgtCMbZWeyhdTBWYa9g-R9nFxWBwZGeaZtUGJ9xYBIyYhdgAvqmrtY1G9w7dQnt6YAy2gGzs=@protonmail.com>
 <jwv7cpln1o8.fsf-monnier+emacs@HIDDEN>
 <b1bTYvprIGDrU8iKzoUE-JcUPusjV8zhTc34hcSS6CksX1VYMyHUTBQPX_XtjjE973BcbpdA8acOLsTUuSNV3ilEwtM9ZaRj25lzp7am7NM=@protonmail.com>
 <jwvedjt78ti.fsf-monnier+emacs@HIDDEN> <b63c3fe53037b9c4d8e8@HIDDEN>
 <jwvjztl5g5v.fsf-monnier+emacs@HIDDEN> <bb9dca5367728509e290@HIDDEN>
 <jwv1qfs5zol.fsf-monnier+emacs@HIDDEN> <596919925b3ff290adc3@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 65459
Cc: 65459 <at> debbugs.gnu.org, heimeborgia@HIDDEN, monnier@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Date: Sat, 26 Aug 2023 08:06:39 +0000
> From: Gregory Heytings <gregory@HIDDEN>
> cc: Heime <heimeborgia@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>, 
>     65459 <at> debbugs.gnu.org
> 
> 
> >
> > The issue is not "don't use `(n)advice.el`", but "don't modify functions 
> > on the sly".  And by "functions" this refers to those things stored in 
> > the `symbol-function` slot of symbols in the global obarray.  This is 
> > because code that does `(my-foo ...)` usually expects to execute the 
> > code found in `(defun my-foo ...)` and not something else, and readers 
> > of that code often make the same assumption, so it can make debugging 
> > really nasty.
> >
> > Changing a function with `fset` (or `cl-letf` or `defalias`) is worse 
> > than using `advice-add`, for that reason: at least `advice-add` sets up 
> > the help system such that `C-h f` will (hopefully) warn you about the 
> > presence of an advice.
> >
> > For variables containing functions (such as 
> > `minibuffer-default-add-function`), there is no such expectation that 
> > calling this function will run some known piece of code, on the 
> > contrary: the whole point of the variable is to run difference pieces of 
> > code in different contexts, so modifying the function is perfectly OK, 
> > regardless whether you do it with `setq` or `add-function`.  Here I'd 
> > use `add-function` because it's simpler.
> >
> 
> Thanks, that clarifies that question!  Perhaps a paragraph along those 
> lines could be added to "(elisp)Advising Functions"?

Feel free to suggest a clarification for the manual, and thanks in
advance.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#65459; Package emacs. Full text available.

Message received at 65459 <at> debbugs.gnu.org:


Received: (at 65459) by debbugs.gnu.org; 28 Aug 2023 13:13:55 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Aug 28 09:13:55 2023
Received: from localhost ([127.0.0.1]:47382 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qac43-0004r2-3r
	for submit <at> debbugs.gnu.org; Mon, 28 Aug 2023 09:13:55 -0400
Received: from mail-4325.protonmail.ch ([185.70.43.25]:17523)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <heimeborgia@HIDDEN>) id 1qac40-0004qp-RB
 for 65459 <at> debbugs.gnu.org; Mon, 28 Aug 2023 09:13:53 -0400
Date: Mon, 28 Aug 2023 13:13:23 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com;
 s=protonmail3; t=1693228420; x=1693487620;
 bh=rIsrrEQVHYYWlU2D1tfoNJb3Q/Qb/TQpVKv6a5YGwKg=;
 h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References:
 Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID:
 Message-ID:BIMI-Selector;
 b=ZPjYrJLK7xodjKaGIgjou0bP/X7+AlwQqYrgLHLX9FEpAQHTHgZ+qkHRjNLWfzjiK
 dM55JQ7i+54qFYXHolDb2mKD9/cgg8nwZ2XJhJALQN8n3Gm3zkvlRMYhKjlYL8/g5W
 JK9N5SOGUkX72jCCILtC8f/STM4ErcKibYjhyWwwr/Xn14c8r+I5tz16e3cRhINFzA
 eMbB6DTTxfhbU91fHf0UUSYSD32Ui61QabkrOYtXHh8vYo02Kr/DImYkXci8XFaTQa
 SoD45pHtV3fULbj5JFMEXu8kyaZA+8elW1yPlNft+lgRtAoKvcURpo/2ojJKkjwhTN
 xgLgRhHXwzqUw==
To: Stefan Monnier <monnier@HIDDEN>
From: Heime <heimeborgia@HIDDEN>
Subject: Re: bug#65459: completing-read INITIAL-VALUE unaware of COLLECTION
 and REQUIRE-MATCH
Message-ID: <lJZUmAqBIkzvpoRB132KAFQUZc7WJulcofgZ4QyWEcB4MeAtrkwWaYTING9VH3eeRIn9mkVnB9Lo37LZThfazea-8MMacxQHiOHrC8yqpEc=@protonmail.com>
In-Reply-To: <jwv4jkj48wb.fsf-monnier+emacs@HIDDEN>
References: <Z37akRtOZpCa8uyj_2oyIonmlmfE70EiqztTtZtYAVk_9eSK7BeC61kXORi4yHKRvkkF1Lnp87hvWQQ4ZnJ4TZr6Txhh3QgW-pfNAD2wSb0=@protonmail.com>
 <PGHFCqIlqCiLxdJPsfkhTdXMBxqeltIA4-jsbNTrcBkDHaEVr3JelBwoN2l-vFCfCfvp1a84HPt_R7JIBMK2xAcITbgUm0FGEn9Las9hii0=@protonmail.com>
 <jwvo7is5fho.fsf-monnier+emacs@HIDDEN>
 <iuiIeGerLEt3GCQVGFSQ1DIKT3lsy9UUwTGuGhbzwRxKidpPqKCJXwofZKAqkS611W8r815VAbSABSDbrlYzrvCiBoU9NHVMEZ9Zmvb3b6U=@protonmail.com>
 <jwv35036ez7.fsf-monnier+emacs@HIDDEN>
 <7O5sFds7h8Yr_jSxcsIuhQE2HNN4oiOgWXEAgzP6xP-8eG2q_3eGy4Ek0oP5xVx4HzAEkE7WHTKyqNXKgvcasj5txuT8pjtVSjI6brM8a-I=@protonmail.com>
 <jwvledv49tv.fsf-monnier+emacs@HIDDEN>
 <BqQmeHCUUQIZxn5N-ZXNZRsGX6Al9oUApWPuyAsDFnCDcW9Ul9z88NbZNX74aM-GWG4FiS3VoqjaPJe2NRtwO66mwte2COIEJmGOlOss70M=@protonmail.com>
 <jwv4jkj48wb.fsf-monnier+emacs@HIDDEN>
Feedback-ID: 57735886:user:proton
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 65459
Cc: Gregory Heytings <gregory@HIDDEN>, 65459 <at> debbugs.gnu.org,
 Eli Zaretskii <eliz@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)






Sent with Proton Mail secure email.

------- Original Message -------
On Tuesday, August 29th, 2023 at 1:04 AM, Stefan Monnier <monnier@HIDDEN=
real.ca> wrote:


> > > > would its use enhance what to do with it.
> > > > Sorry, I don't know what you mean by that. > Stefan
> > > > Could the function body be used for more capability than (insert "M=
YINIT-INPUT") ?
>=20
>=20
> Of course, it can move point (just like INITIAL-INPUT lets you),
> and it can be used for whatever `minibuffer-with-setup-hook` is used. > S=
tefan

Then I will check the new implementations out, and play with them a little =
bit.





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#65459; Package emacs. Full text available.

Message received at 65459 <at> debbugs.gnu.org:


Received: (at 65459) by debbugs.gnu.org; 28 Aug 2023 13:05:01 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Aug 28 09:05:01 2023
Received: from localhost ([127.0.0.1]:47362 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qabvQ-0004bj-OC
	for submit <at> debbugs.gnu.org; Mon, 28 Aug 2023 09:05:00 -0400
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:42634)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1qabvO-0004bV-Vd
 for 65459 <at> debbugs.gnu.org; Mon, 28 Aug 2023 09:04:59 -0400
Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1])
 by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 3EB0110009E;
 Mon, 28 Aug 2023 09:04:47 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1693227886;
 bh=h18fo+TprWPajL90Qmo5CYitHd0rvCQmaX+hKOsL5Us=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=bECD2RY+/sWYbwxnjiegoY53cov0yULyMTtRKVoWGaPHgWTktGh+LmWUCM/hGJEkN
 oZNhsTj3zj+pmM4qcBoUnl/Yr05HzMx7QP7WsSqAo0z+4QXJQ521tlVd2lcydbUjeb
 T6ksfCys98sBOl7SmrYbV5TxAbdzKH+FtyxWOzHjmTBYPf4EnYi89jNRdaYDGHtZPd
 dgHzvHOaocNwpE2yR54Kis1t9/fUonzy/Z42VZZmkNqwDsJUusZIJE8/9SHaLfJzj3
 8CXF0N35Fie/roRYN+jz45tVINWD6/GOb+jU25KqqatlkIfOgpq7gwldqCbKwCpRaT
 wxiB/3RNoWGVw==
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 2FB35100068;
 Mon, 28 Aug 2023 09:04:46 -0400 (EDT)
Received: from pastel (unknown [108.175.234.188])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 0390B120243;
 Mon, 28 Aug 2023 09:04:45 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Heime <heimeborgia@HIDDEN>
Subject: Re: bug#65459: completing-read INITIAL-VALUE unaware of COLLECTION
 and REQUIRE-MATCH
In-Reply-To: <BqQmeHCUUQIZxn5N-ZXNZRsGX6Al9oUApWPuyAsDFnCDcW9Ul9z88NbZNX74aM-GWG4FiS3VoqjaPJe2NRtwO66mwte2COIEJmGOlOss70M=@protonmail.com>
 (Heime's message of "Mon, 28 Aug 2023 12:50:45 +0000")
Message-ID: <jwv4jkj48wb.fsf-monnier+emacs@HIDDEN>
References: <Z37akRtOZpCa8uyj_2oyIonmlmfE70EiqztTtZtYAVk_9eSK7BeC61kXORi4yHKRvkkF1Lnp87hvWQQ4ZnJ4TZr6Txhh3QgW-pfNAD2wSb0=@protonmail.com>
 <GXEyBNlPOyOwudh1u-PmVlBcTeINuhy5usNr0LN80FOF3-9dqXBOFJspokFB8dBRzfsHLDLGnqQ7XKQv5v_ffR2bB28us9IvVcQ9iLMDki0=@protonmail.com>
 <jwvbkes74n1.fsf-monnier+emacs@HIDDEN>
 <PGHFCqIlqCiLxdJPsfkhTdXMBxqeltIA4-jsbNTrcBkDHaEVr3JelBwoN2l-vFCfCfvp1a84HPt_R7JIBMK2xAcITbgUm0FGEn9Las9hii0=@protonmail.com>
 <jwvo7is5fho.fsf-monnier+emacs@HIDDEN>
 <iuiIeGerLEt3GCQVGFSQ1DIKT3lsy9UUwTGuGhbzwRxKidpPqKCJXwofZKAqkS611W8r815VAbSABSDbrlYzrvCiBoU9NHVMEZ9Zmvb3b6U=@protonmail.com>
 <jwv35036ez7.fsf-monnier+emacs@HIDDEN>
 <7O5sFds7h8Yr_jSxcsIuhQE2HNN4oiOgWXEAgzP6xP-8eG2q_3eGy4Ek0oP5xVx4HzAEkE7WHTKyqNXKgvcasj5txuT8pjtVSjI6brM8a-I=@protonmail.com>
 <jwvledv49tv.fsf-monnier+emacs@HIDDEN>
 <BqQmeHCUUQIZxn5N-ZXNZRsGX6Al9oUApWPuyAsDFnCDcW9Ul9z88NbZNX74aM-GWG4FiS3VoqjaPJe2NRtwO66mwte2COIEJmGOlOss70M=@protonmail.com>
Date: Mon, 28 Aug 2023 09:04:45 -0400
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 AWL 0.053 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain
 DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from
 domain
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 65459
Cc: Gregory Heytings <gregory@HIDDEN>, 65459 <at> debbugs.gnu.org,
 Eli Zaretskii <eliz@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

>> > would its use enhance what to do with it.
>> Sorry, I don't know what you mean by that. > Stefan
> Could the function body be used for more capability than (insert "MYINIT-INPUT") ?

Of course, it can move point (just like INITIAL-INPUT lets you),
and it can be used for whatever `minibuffer-with-setup-hook` is used.


        Stefan





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#65459; Package emacs. Full text available.

Message received at 65459 <at> debbugs.gnu.org:


Received: (at 65459) by debbugs.gnu.org; 28 Aug 2023 12:51:05 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Aug 28 08:51:05 2023
Received: from localhost ([127.0.0.1]:47357 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qabhx-0004Fx-9d
	for submit <at> debbugs.gnu.org; Mon, 28 Aug 2023 08:51:05 -0400
Received: from mail-4318.protonmail.ch ([185.70.43.18]:48715)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <heimeborgia@HIDDEN>) id 1qabhv-0004FS-7E
 for 65459 <at> debbugs.gnu.org; Mon, 28 Aug 2023 08:51:03 -0400
Date: Mon, 28 Aug 2023 12:50:45 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com;
 s=protonmail3; t=1693227049; x=1693486249;
 bh=i8tNExCAX4P4GxtqmkTLBbIGBfnW0Xotz0t1g6Bc6MA=;
 h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References:
 Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID:
 Message-ID:BIMI-Selector;
 b=A/eFkmKk5RALkes+qszu9YF8O7i/FomYX740SJmXNT8sxiQly4WuFaocbRKGOMxGA
 DArhvM+mbfflYDN/QzDv/Z8lraiS6hvHy5W0vg9YmrodwaFrtBFE/cqHgZo/2BZvYh
 iOHfJ1t0drDQhSU6gIFtpoKJdwjJVxtVanCBJv43aPXPtJ62B0RxOl1erwkJ3sRyf+
 z6jo6psSU9yO/VdoBUfjc+kmuBK7CfgZdQaT31FdD7PFJStB4Mz+cnb5OwD089EuGH
 TB8JiCKfKjFIIr2VXd9YTyCDMaVYbGSP2EmsexPv2f6hCsBD5VtCXEHKwzbNKDICqT
 K8HOfElSL81MA==
To: Stefan Monnier <monnier@HIDDEN>
From: Heime <heimeborgia@HIDDEN>
Subject: Re: bug#65459: completing-read INITIAL-VALUE unaware of COLLECTION
 and REQUIRE-MATCH
Message-ID: <BqQmeHCUUQIZxn5N-ZXNZRsGX6Al9oUApWPuyAsDFnCDcW9Ul9z88NbZNX74aM-GWG4FiS3VoqjaPJe2NRtwO66mwte2COIEJmGOlOss70M=@protonmail.com>
In-Reply-To: <jwvledv49tv.fsf-monnier+emacs@HIDDEN>
References: <Z37akRtOZpCa8uyj_2oyIonmlmfE70EiqztTtZtYAVk_9eSK7BeC61kXORi4yHKRvkkF1Lnp87hvWQQ4ZnJ4TZr6Txhh3QgW-pfNAD2wSb0=@protonmail.com>
 <GXEyBNlPOyOwudh1u-PmVlBcTeINuhy5usNr0LN80FOF3-9dqXBOFJspokFB8dBRzfsHLDLGnqQ7XKQv5v_ffR2bB28us9IvVcQ9iLMDki0=@protonmail.com>
 <jwvbkes74n1.fsf-monnier+emacs@HIDDEN>
 <PGHFCqIlqCiLxdJPsfkhTdXMBxqeltIA4-jsbNTrcBkDHaEVr3JelBwoN2l-vFCfCfvp1a84HPt_R7JIBMK2xAcITbgUm0FGEn9Las9hii0=@protonmail.com>
 <jwvo7is5fho.fsf-monnier+emacs@HIDDEN>
 <iuiIeGerLEt3GCQVGFSQ1DIKT3lsy9UUwTGuGhbzwRxKidpPqKCJXwofZKAqkS611W8r815VAbSABSDbrlYzrvCiBoU9NHVMEZ9Zmvb3b6U=@protonmail.com>
 <jwv35036ez7.fsf-monnier+emacs@HIDDEN>
 <7O5sFds7h8Yr_jSxcsIuhQE2HNN4oiOgWXEAgzP6xP-8eG2q_3eGy4Ek0oP5xVx4HzAEkE7WHTKyqNXKgvcasj5txuT8pjtVSjI6brM8a-I=@protonmail.com>
 <jwvledv49tv.fsf-monnier+emacs@HIDDEN>
Feedback-ID: 57735886:user:proton
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 65459
Cc: Gregory Heytings <gregory@HIDDEN>, 65459 <at> debbugs.gnu.org,
 Eli Zaretskii <eliz@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)


------- Original Message -------
On Tuesday, August 29th, 2023 at 12:44 AM, Stefan Monnier <monnier@HIDDEN=
treal.ca> wrote:


> > The function "mynew-completing-read", is that something users have to w=
rite and use
> > or would it be provided by emacs release ?
>=20
> "mynew-completing-read" stands for the name of the replacement of `comple=
ting-read`.
>=20
> > Why the preference for a function,
>=20
> What would you use instead?
>=20
> > would its use enhance what to do with it.
>=20
> Sorry, I don't know what you mean by that. > Stefan

Could the function body be used for more capability than (insert "MYINIT-IN=
PUT") ?






Information forwarded to bug-gnu-emacs@HIDDEN:
bug#65459; Package emacs. Full text available.

Message received at 65459 <at> debbugs.gnu.org:


Received: (at 65459) by debbugs.gnu.org; 28 Aug 2023 12:44:30 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Aug 28 08:44:30 2023
Received: from localhost ([127.0.0.1]:47345 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qabba-00040S-7J
	for submit <at> debbugs.gnu.org; Mon, 28 Aug 2023 08:44:30 -0400
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:25614)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1qabbY-00040F-H6
 for 65459 <at> debbugs.gnu.org; Mon, 28 Aug 2023 08:44:28 -0400
Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1])
 by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id BCE4D10009E;
 Mon, 28 Aug 2023 08:44:16 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1693226655;
 bh=agIiAh+vs8qAkKQClmBWQVWDSZIXEw28UyGJlelE8e0=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=bXfRxOUQDpoZ29mzbq0b0h2b219USSBquZrtYDyJh40TPOuZIJA4kio31LGn1y0yG
 3Lv0jN3V91rVBtBonRUm9NfDuFzW7QIcLoipuwU2MrIYv+8VcKpGiR5lvswK3XHYAm
 h8Pt5M8vEzIsc2XlBVotHOug+rAkEWz+9gKqefHRPx6Sdl+RgcxccekAknrAdwWwjt
 zbE7s7ebuGOO3YviFzeboqtcE5Sssr9eWEYA1uKXyOcNfEkZxTnMJBst44lkyVctlR
 eQE05MyKEmO/qOP/Paq1DllWAQtzAWqWqBrHAaba6c7Trd71JlHI9YLZbOB/o/XXmh
 G5b7YJgIoaudw==
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id AC9B5100068;
 Mon, 28 Aug 2023 08:44:15 -0400 (EDT)
Received: from pastel (unknown [108.175.234.188])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 7FA64120298;
 Mon, 28 Aug 2023 08:44:15 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Heime <heimeborgia@HIDDEN>
Subject: Re: bug#65459: completing-read INITIAL-VALUE unaware of COLLECTION
 and REQUIRE-MATCH
In-Reply-To: <7O5sFds7h8Yr_jSxcsIuhQE2HNN4oiOgWXEAgzP6xP-8eG2q_3eGy4Ek0oP5xVx4HzAEkE7WHTKyqNXKgvcasj5txuT8pjtVSjI6brM8a-I=@protonmail.com>
 (Heime's message of "Mon, 28 Aug 2023 09:14:46 +0000")
Message-ID: <jwvledv49tv.fsf-monnier+emacs@HIDDEN>
References: <Z37akRtOZpCa8uyj_2oyIonmlmfE70EiqztTtZtYAVk_9eSK7BeC61kXORi4yHKRvkkF1Lnp87hvWQQ4ZnJ4TZr6Txhh3QgW-pfNAD2wSb0=@protonmail.com>
 <qPWR_1rol4hC0RqKhl7x_KG2Gv5smj_--evK0ziobB1NHDD2i5cP4sJtZhNp996XeMtrT4u5eR_sN7H1-sS0MK2rHkq3YtND95AvdLtyp78=@protonmail.com>
 <jwvmsyc78uv.fsf-monnier+emacs@HIDDEN>
 <GXEyBNlPOyOwudh1u-PmVlBcTeINuhy5usNr0LN80FOF3-9dqXBOFJspokFB8dBRzfsHLDLGnqQ7XKQv5v_ffR2bB28us9IvVcQ9iLMDki0=@protonmail.com>
 <jwvbkes74n1.fsf-monnier+emacs@HIDDEN>
 <PGHFCqIlqCiLxdJPsfkhTdXMBxqeltIA4-jsbNTrcBkDHaEVr3JelBwoN2l-vFCfCfvp1a84HPt_R7JIBMK2xAcITbgUm0FGEn9Las9hii0=@protonmail.com>
 <jwvo7is5fho.fsf-monnier+emacs@HIDDEN>
 <iuiIeGerLEt3GCQVGFSQ1DIKT3lsy9UUwTGuGhbzwRxKidpPqKCJXwofZKAqkS611W8r815VAbSABSDbrlYzrvCiBoU9NHVMEZ9Zmvb3b6U=@protonmail.com>
 <jwv35036ez7.fsf-monnier+emacs@HIDDEN>
 <7O5sFds7h8Yr_jSxcsIuhQE2HNN4oiOgWXEAgzP6xP-8eG2q_3eGy4Ek0oP5xVx4HzAEkE7WHTKyqNXKgvcasj5txuT8pjtVSjI6brM8a-I=@protonmail.com>
Date: Mon, 28 Aug 2023 08:44:14 -0400
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 AWL 0.055 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain
 DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from
 domain
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 65459
Cc: Gregory Heytings <gregory@HIDDEN>, 65459 <at> debbugs.gnu.org,
 Eli Zaretskii <eliz@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> The function "mynew-completing-read", is that something users have to write and use
> or would it be provided by emacs release ?

"mynew-completing-read" stands for the name of the replacement of `completing-read`.

> Why the preference for a function,

What would you use instead?

> would its use enhance what to do with it.

Sorry, I don't know what you mean by that.


        Stefan





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#65459; Package emacs. Full text available.

Message received at 65459 <at> debbugs.gnu.org:


Received: (at 65459) by debbugs.gnu.org; 28 Aug 2023 09:15:22 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Aug 28 05:15:22 2023
Received: from localhost ([127.0.0.1]:46971 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qaYLB-00044v-Qu
	for submit <at> debbugs.gnu.org; Mon, 28 Aug 2023 05:15:22 -0400
Received: from mail-4318.protonmail.ch ([185.70.43.18]:34505)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <heimeborgia@HIDDEN>) id 1qaYL9-00044c-6n
 for 65459 <at> debbugs.gnu.org; Mon, 28 Aug 2023 05:15:20 -0400
Date: Mon, 28 Aug 2023 09:14:46 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com;
 s=protonmail3; t=1693214106; x=1693473306;
 bh=lSnxtTm5KI2okAWgM+DQibr9hnQavk44HB4rpL31J6g=;
 h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References:
 Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID:
 Message-ID:BIMI-Selector;
 b=rtkJsUEhQ7sJUuqLHvR0I7qBaA5yRHVDYMqoXMx8MdGiyjDedMMbmGigTmGSBLMmT
 05OBrAl5dRdKlFHzxTL0ITr6xzGWQMgUHsjPBVwmGJ8Q/r7xXnoct2MEpS2vhDWxul
 yPBi5VnqpIUSJ8H3QcXQxqGs/t13cS9ASzsNu5kgHEy/m2GzLssXRtAXtS9ZJSyop9
 6P97pyf4HCHhcpVGhORJkx9CPQm2TGAWAFvJxMhPbaVH05VaQeYfKC+DAPuUaT88pA
 q09iBabHxekUqeSepml+cV9z0OO+Xq11VHY0CvePivn6agVGVU7lzSAp2K7ygdisTP
 MS+q2Vwa0LJ+w==
To: Stefan Monnier <monnier@HIDDEN>
From: Heime <heimeborgia@HIDDEN>
Subject: Re: bug#65459: completing-read INITIAL-VALUE unaware of COLLECTION
 and REQUIRE-MATCH
Message-ID: <7O5sFds7h8Yr_jSxcsIuhQE2HNN4oiOgWXEAgzP6xP-8eG2q_3eGy4Ek0oP5xVx4HzAEkE7WHTKyqNXKgvcasj5txuT8pjtVSjI6brM8a-I=@protonmail.com>
In-Reply-To: <jwv35036ez7.fsf-monnier+emacs@HIDDEN>
References: <Z37akRtOZpCa8uyj_2oyIonmlmfE70EiqztTtZtYAVk_9eSK7BeC61kXORi4yHKRvkkF1Lnp87hvWQQ4ZnJ4TZr6Txhh3QgW-pfNAD2wSb0=@protonmail.com>
 <qPWR_1rol4hC0RqKhl7x_KG2Gv5smj_--evK0ziobB1NHDD2i5cP4sJtZhNp996XeMtrT4u5eR_sN7H1-sS0MK2rHkq3YtND95AvdLtyp78=@protonmail.com>
 <jwvmsyc78uv.fsf-monnier+emacs@HIDDEN>
 <GXEyBNlPOyOwudh1u-PmVlBcTeINuhy5usNr0LN80FOF3-9dqXBOFJspokFB8dBRzfsHLDLGnqQ7XKQv5v_ffR2bB28us9IvVcQ9iLMDki0=@protonmail.com>
 <jwvbkes74n1.fsf-monnier+emacs@HIDDEN>
 <PGHFCqIlqCiLxdJPsfkhTdXMBxqeltIA4-jsbNTrcBkDHaEVr3JelBwoN2l-vFCfCfvp1a84HPt_R7JIBMK2xAcITbgUm0FGEn9Las9hii0=@protonmail.com>
 <jwvo7is5fho.fsf-monnier+emacs@HIDDEN>
 <iuiIeGerLEt3GCQVGFSQ1DIKT3lsy9UUwTGuGhbzwRxKidpPqKCJXwofZKAqkS611W8r815VAbSABSDbrlYzrvCiBoU9NHVMEZ9Zmvb3b6U=@protonmail.com>
 <jwv35036ez7.fsf-monnier+emacs@HIDDEN>
Feedback-ID: 57735886:user:proton
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 65459
Cc: Gregory Heytings <gregory@HIDDEN>, 65459 <at> debbugs.gnu.org,
 Eli Zaretskii <eliz@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)


------- Original Message -------
On Monday, August 28th, 2023 at 3:12 PM, Stefan Monnier <monnier@HIDDEN=
eal.ca> wrote:


> > For using 'completing-read' without INITIAL as argument, do you have a =
plan of how
> > minibuffer prefilling could be activated and set for use within some sp=
ecific user
> > function?
>=20
>=20
> I suggested to accept a `setup-function` argument, which would replace th=
e
> `minibuffer-with-setup-hook` hack, so instead of
>=20
> (completing-read MYPROMPT ... MYINIT-INPUT ...)
>=20
> with the new API you could do
>=20
> (mynew-completing-read MYPROMPT ...
> (lambda () (insert "MYINIT-INPUT"))
> ...)
>=20
> -- Stefan

The function "mynew-completing-read", is that something users have to write=
 and use
or would it be provided by emacs release ?  Why the preference for a functi=
on, would
its use enhance what to do with it.  Perhaps the different UI would call a =
different
function?





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#65459; Package emacs. Full text available.

Message received at 65459 <at> debbugs.gnu.org:


Received: (at 65459) by debbugs.gnu.org; 28 Aug 2023 03:13:06 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Aug 27 23:13:06 2023
Received: from localhost ([127.0.0.1]:46510 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qaSgb-0000AL-QR
	for submit <at> debbugs.gnu.org; Sun, 27 Aug 2023 23:13:06 -0400
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:24662)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1qaSgY-00009p-SL
 for 65459 <at> debbugs.gnu.org; Sun, 27 Aug 2023 23:13:04 -0400
Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1])
 by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 594CA100084;
 Sun, 27 Aug 2023 23:12:51 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1693192370;
 bh=MuOj9UTn1EXNVs1RcgKzm0a2iozz0uBMGUGpFB6Fn7w=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=iw2haZAMJWMtS2i1Qimt1/VE+dlnNIQypw0+eF3adVJLeo/aOnJ4YK3MMQssfxKVJ
 uTlhqC3H42Et2Dlpi/h95IcVpp5GLR7SvoGegiXGajUQj88Bo5jXy47Q0BnRs04D7s
 gnVmJTbPin60vYyBeeVjYVVliwrbzRX4gYH7rAWt31giW1t61F8A+x3qwkXx9Ae2t0
 hwhkM/PgMLZ+/YNPlbc/OvUaodpNxGEjcRXcE4DZ9St4H3RLpjXb1KU2vzC8mtnxwr
 7H2UrRdir2I9+XrZ0a4R6ELb5LRLgHfJ2ikwL3HF1N13J74MencpYl7LCBxIm5jVy3
 bJUn0pv5D8D9g==
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 58AEA100064;
 Sun, 27 Aug 2023 23:12:50 -0400 (EDT)
Received: from pastel (unknown [108.175.234.188])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 2BB5F1201B4;
 Sun, 27 Aug 2023 23:12:50 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Heime <heimeborgia@HIDDEN>
Subject: Re: bug#65459: completing-read INITIAL-VALUE unaware of COLLECTION
 and REQUIRE-MATCH
In-Reply-To: <iuiIeGerLEt3GCQVGFSQ1DIKT3lsy9UUwTGuGhbzwRxKidpPqKCJXwofZKAqkS611W8r815VAbSABSDbrlYzrvCiBoU9NHVMEZ9Zmvb3b6U=@protonmail.com>
 (Heime's message of "Sun, 27 Aug 2023 22:59:06 +0000")
Message-ID: <jwv35036ez7.fsf-monnier+emacs@HIDDEN>
References: <Z37akRtOZpCa8uyj_2oyIonmlmfE70EiqztTtZtYAVk_9eSK7BeC61kXORi4yHKRvkkF1Lnp87hvWQQ4ZnJ4TZr6Txhh3QgW-pfNAD2wSb0=@protonmail.com>
 <nP4ViMxp5jxgUcgA2BP9wYdzWMlQIMC7iHr_bC6atFHLniJNQ6CNrimafPkWJ4uxUaLPk0XdDqsgGWUDEZbqsk9R23NhWnlzCWf0jDNM2z8=@protonmail.com>
 <jwvpm388sd5.fsf-monnier+emacs@HIDDEN>
 <qPWR_1rol4hC0RqKhl7x_KG2Gv5smj_--evK0ziobB1NHDD2i5cP4sJtZhNp996XeMtrT4u5eR_sN7H1-sS0MK2rHkq3YtND95AvdLtyp78=@protonmail.com>
 <jwvmsyc78uv.fsf-monnier+emacs@HIDDEN>
 <GXEyBNlPOyOwudh1u-PmVlBcTeINuhy5usNr0LN80FOF3-9dqXBOFJspokFB8dBRzfsHLDLGnqQ7XKQv5v_ffR2bB28us9IvVcQ9iLMDki0=@protonmail.com>
 <jwvbkes74n1.fsf-monnier+emacs@HIDDEN>
 <PGHFCqIlqCiLxdJPsfkhTdXMBxqeltIA4-jsbNTrcBkDHaEVr3JelBwoN2l-vFCfCfvp1a84HPt_R7JIBMK2xAcITbgUm0FGEn9Las9hii0=@protonmail.com>
 <jwvo7is5fho.fsf-monnier+emacs@HIDDEN>
 <iuiIeGerLEt3GCQVGFSQ1DIKT3lsy9UUwTGuGhbzwRxKidpPqKCJXwofZKAqkS611W8r815VAbSABSDbrlYzrvCiBoU9NHVMEZ9Zmvb3b6U=@protonmail.com>
Date: Sun, 27 Aug 2023 23:12:49 -0400
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 AWL 0.061 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain
 DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from
 domain
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 65459
Cc: Gregory Heytings <gregory@HIDDEN>, 65459 <at> debbugs.gnu.org,
 Eli Zaretskii <eliz@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> For using 'completing-read' without INITIAL as argument, do you have a plan of how 
> minibuffer prefilling could be activated and set for use within some specific user
> function? 

I suggested to accept a `setup-function` argument, which would replace the
`minibuffer-with-setup-hook` hack, so instead of

    (completing-read MYPROMPT ... MYINIT-INPUT ...)

with the new API you could do

    (mynew-completing-read MYPROMPT ...
                           (lambda () (insert "MYINIT-INPUT"))
                           ...)

-- Stefan





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#65459; Package emacs. Full text available.

Message received at 65459 <at> debbugs.gnu.org:


Received: (at 65459) by debbugs.gnu.org; 27 Aug 2023 22:59:32 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Aug 27 18:59:32 2023
Received: from localhost ([127.0.0.1]:46413 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qaOjE-0002Js-Es
	for submit <at> debbugs.gnu.org; Sun, 27 Aug 2023 18:59:32 -0400
Received: from mail-40140.protonmail.ch ([185.70.40.140]:11723)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <heimeborgia@HIDDEN>) id 1qaOjC-0002Jd-1z
 for 65459 <at> debbugs.gnu.org; Sun, 27 Aug 2023 18:59:31 -0400
Date: Sun, 27 Aug 2023 22:59:06 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com;
 s=protonmail3; t=1693177157; x=1693436357;
 bh=FT6yc+vbRhebub1pCYIvO1EoDne2gMS3OmMu8jbM/Xk=;
 h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References:
 Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID:
 Message-ID:BIMI-Selector;
 b=i0BgP18FuWJveQHba1R8g2uqcJ31pIHbyEnny4eTD+IFTvhlcC2vBiqRqY+HFoABP
 wds/C0ER6GILCyNiz+XeOSgF+JNVCRvws//wcYXkFpLnfx6YPLkM1TXO0NDqwJFouG
 MrDY7wuEdjeLZG4fshfqCYToTGdDJwobkyz5QNJoA5qJ/mGWGDZQmiQ5+QSe8FcQ0m
 Ib6Qh2tn4deZPB/JaVrm+V/eMOhZJ+PxevZ/pxUwOx7Ren5kQTvF400LV0L8atpUah
 D4InvrAUZ+qctUQDjMhNIrGUfSOS9UExwzLKj1FFJnteFEtLme/AoUrg4ZhU+sgB5v
 EtM1WJbN3Zj1w==
To: Stefan Monnier <monnier@HIDDEN>
From: Heime <heimeborgia@HIDDEN>
Subject: Re: bug#65459: completing-read INITIAL-VALUE unaware of COLLECTION
 and REQUIRE-MATCH
Message-ID: <iuiIeGerLEt3GCQVGFSQ1DIKT3lsy9UUwTGuGhbzwRxKidpPqKCJXwofZKAqkS611W8r815VAbSABSDbrlYzrvCiBoU9NHVMEZ9Zmvb3b6U=@protonmail.com>
In-Reply-To: <jwvo7is5fho.fsf-monnier+emacs@HIDDEN>
References: <Z37akRtOZpCa8uyj_2oyIonmlmfE70EiqztTtZtYAVk_9eSK7BeC61kXORi4yHKRvkkF1Lnp87hvWQQ4ZnJ4TZr6Txhh3QgW-pfNAD2wSb0=@protonmail.com>
 <nP4ViMxp5jxgUcgA2BP9wYdzWMlQIMC7iHr_bC6atFHLniJNQ6CNrimafPkWJ4uxUaLPk0XdDqsgGWUDEZbqsk9R23NhWnlzCWf0jDNM2z8=@protonmail.com>
 <jwvpm388sd5.fsf-monnier+emacs@HIDDEN>
 <qPWR_1rol4hC0RqKhl7x_KG2Gv5smj_--evK0ziobB1NHDD2i5cP4sJtZhNp996XeMtrT4u5eR_sN7H1-sS0MK2rHkq3YtND95AvdLtyp78=@protonmail.com>
 <jwvmsyc78uv.fsf-monnier+emacs@HIDDEN>
 <GXEyBNlPOyOwudh1u-PmVlBcTeINuhy5usNr0LN80FOF3-9dqXBOFJspokFB8dBRzfsHLDLGnqQ7XKQv5v_ffR2bB28us9IvVcQ9iLMDki0=@protonmail.com>
 <jwvbkes74n1.fsf-monnier+emacs@HIDDEN>
 <PGHFCqIlqCiLxdJPsfkhTdXMBxqeltIA4-jsbNTrcBkDHaEVr3JelBwoN2l-vFCfCfvp1a84HPt_R7JIBMK2xAcITbgUm0FGEn9Las9hii0=@protonmail.com>
 <jwvo7is5fho.fsf-monnier+emacs@HIDDEN>
Feedback-ID: 57735886:user:proton
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 65459
Cc: Gregory Heytings <gregory@HIDDEN>, 65459 <at> debbugs.gnu.org,
 Eli Zaretskii <eliz@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)






Sent with Proton Mail secure email.

------- Original Message -------
On Monday, August 28th, 2023 at 9:48 AM, Stefan Monnier <monnier@HIDDEN=
eal.ca> wrote:


> > There are two audiences in all this. Programmers who write libraries
> > and users who write functions for their own use. The thought is that
> > if `read-file-name` has capability of minibuffer prefilling, then minib=
uffer
> > prefilling capability should be available for them to use without havin=
g
> > them convince anybody why they want it to happen.
>=20
>=20
> As I said, as a matter of principle and general design, Emacs goes to
> great lengths to make sure users can do even what we don't want them
> to do (except make our code proprietary). So of course it is and will
> remain possible for users to write code that prefills the minibuffer.
>=20
> The question is how to make an API that encourages coders to write code i=
n
> such a way that the behavior is fairly homogeneous between packages and
> such that users can customize the behavior to be the way they like it. > =
Stefan

Yes, the problematic part is how to make the API without making life too di=
fficult
for those who want to digress from our point of view.  It might happen they=
 find a=20
good case for digressing or figure out whether our encouragement makes sens=
e to them.

For using 'completing-read' without INITIAL as argument, do you have a plan=
 of how=20
minibuffer prefilling could be activated and set for use within some specif=
ic user
function?=20





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#65459; Package emacs. Full text available.

Message received at 65459 <at> debbugs.gnu.org:


Received: (at 65459) by debbugs.gnu.org; 27 Aug 2023 21:48:29 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Aug 27 17:48:29 2023
Received: from localhost ([127.0.0.1]:46388 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qaNcT-0000Lm-7c
	for submit <at> debbugs.gnu.org; Sun, 27 Aug 2023 17:48:29 -0400
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:42697)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1qaNcO-0000Kk-My
 for 65459 <at> debbugs.gnu.org; Sun, 27 Aug 2023 17:48:28 -0400
Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1])
 by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 46BC1806AC;
 Sun, 27 Aug 2023 17:48:13 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1693172892;
 bh=wHMYqqgDtCQwONCC5zDfQW/R2/d5WQw2J2nHsYwf+A4=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=VE3cSvGyRSwEpzk8cChUB/IKeaGQ3Dhk6k+tmSocpCTbhr6MFIXd2KBdzI23o13Sa
 xyghij47xBh1s6yEb7xf6PgNIYHbugD3zpxfcEFEX+BhPZ/D78xFPXTx5I1CJmt3Bt
 x1NBe4CdlzvA5iRG4FtknbukZw5M7/FuxYKptGKYA7qPNZanoMOR9msFXChVxHJFRN
 CrJTAemh/v6XSwoK3voEX6Zc0HTVkasuDszdd1tNgw4juqtpOiwiTPtRe1qv0y3uqJ
 dWioQeTJdiA8x/OaRyxYRxtyaYjfA92vDhDYArs286VD9y0XO8VCJ/8OKDCHwvf/Dh
 lq247OfKeh97g==
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 109328019D;
 Sun, 27 Aug 2023 17:48:12 -0400 (EDT)
Received: from pastel (unknown [108.175.234.188])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id D54E4120312;
 Sun, 27 Aug 2023 17:48:11 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Heime <heimeborgia@HIDDEN>
Subject: Re: bug#65459: completing-read INITIAL-VALUE unaware of COLLECTION
 and REQUIRE-MATCH
In-Reply-To: <PGHFCqIlqCiLxdJPsfkhTdXMBxqeltIA4-jsbNTrcBkDHaEVr3JelBwoN2l-vFCfCfvp1a84HPt_R7JIBMK2xAcITbgUm0FGEn9Las9hii0=@protonmail.com>
 (Heime's message of "Sun, 27 Aug 2023 21:11:27 +0000")
Message-ID: <jwvo7is5fho.fsf-monnier+emacs@HIDDEN>
References: <Z37akRtOZpCa8uyj_2oyIonmlmfE70EiqztTtZtYAVk_9eSK7BeC61kXORi4yHKRvkkF1Lnp87hvWQQ4ZnJ4TZr6Txhh3QgW-pfNAD2wSb0=@protonmail.com>
 <596919925b4762b66be8@HIDDEN>
 <jwvo7itanhr.fsf-monnier+emacs@HIDDEN>
 <nP4ViMxp5jxgUcgA2BP9wYdzWMlQIMC7iHr_bC6atFHLniJNQ6CNrimafPkWJ4uxUaLPk0XdDqsgGWUDEZbqsk9R23NhWnlzCWf0jDNM2z8=@protonmail.com>
 <jwvpm388sd5.fsf-monnier+emacs@HIDDEN>
 <qPWR_1rol4hC0RqKhl7x_KG2Gv5smj_--evK0ziobB1NHDD2i5cP4sJtZhNp996XeMtrT4u5eR_sN7H1-sS0MK2rHkq3YtND95AvdLtyp78=@protonmail.com>
 <jwvmsyc78uv.fsf-monnier+emacs@HIDDEN>
 <GXEyBNlPOyOwudh1u-PmVlBcTeINuhy5usNr0LN80FOF3-9dqXBOFJspokFB8dBRzfsHLDLGnqQ7XKQv5v_ffR2bB28us9IvVcQ9iLMDki0=@protonmail.com>
 <jwvbkes74n1.fsf-monnier+emacs@HIDDEN>
 <PGHFCqIlqCiLxdJPsfkhTdXMBxqeltIA4-jsbNTrcBkDHaEVr3JelBwoN2l-vFCfCfvp1a84HPt_R7JIBMK2xAcITbgUm0FGEn9Las9hii0=@protonmail.com>
Date: Sun, 27 Aug 2023 17:48:10 -0400
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 AWL 0.015 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain
 DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from
 domain
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 65459
Cc: Gregory Heytings <gregory@HIDDEN>, 65459 <at> debbugs.gnu.org,
 Eli Zaretskii <eliz@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> There are two audiences in all this.  Programmers who write libraries
> and users who write functions for their own use.  The thought is that
> if `read-file-name` has capability of minibuffer prefilling, then minibuffer
> prefilling capability should be available for them to use without having
> them convince anybody why they want it to happen.

As I said, as a matter of principle and general design, Emacs goes to
great lengths to make sure users can do even what we *don't* want them
to do (except make our code proprietary).  So of course it is and will
remain possible for users to write code that prefills the minibuffer.

The question is how to make an API that encourages coders to write code in
such a way that the behavior is fairly homogeneous between packages and
such that users can customize the behavior to be the way they like it.


        Stefan





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#65459; Package emacs. Full text available.

Message received at 65459 <at> debbugs.gnu.org:


Received: (at 65459) by debbugs.gnu.org; 27 Aug 2023 21:26:42 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Aug 27 17:26:42 2023
Received: from localhost ([127.0.0.1]:46378 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qaNHN-00080t-M6
	for submit <at> debbugs.gnu.org; Sun, 27 Aug 2023 17:26:41 -0400
Received: from mail-4324.protonmail.ch ([185.70.43.24]:36589)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <heimeborgia@HIDDEN>) id 1qaNHI-00080f-BD
 for 65459 <at> debbugs.gnu.org; Sun, 27 Aug 2023 17:26:40 -0400
Date: Sun, 27 Aug 2023 21:26:09 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com;
 s=protonmail3; t=1693171584; x=1693430784;
 bh=1hXArRK4ZjspdmEHNcSDq4BnrmIVNHZw0G1zq9k1bEo=;
 h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References:
 Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID:
 Message-ID:BIMI-Selector;
 b=dJjB1w/y1LWikuzbfrgR4H5VOyMsRq0ss4JxelSuVJcRoet1vwKNWso1teSkYcDT8
 GwUZooVTPlVLcdR+wgxR4Bvi1KgiXcRmQIn11aCB3RRmhe/WW0PhN7gU5o8Q0Uisap
 2G+qlRwxpYHR8GYUjmi4mmHraDmWU5bmRdQct2Xt0hWlY+XTK9XdY1pigawNry7gqp
 xlIHZOapgBZ0FXAqGxrgYSH7BpDAr0a24lDYpaD8359kS0HfB3ACC66c4Td7n8CzSc
 Jh2uXOw3R9ZQu4Q1uXEpzrCxgpSXhLpoHT52sLRPUoPnx+xIZ6anz3UI0M+SrOX5Uw
 rHE9ocxdoSu0w==
To: Stefan Monnier <monnier@HIDDEN>
From: Heime <heimeborgia@HIDDEN>
Subject: Re: bug#65459: completing-read INITIAL-VALUE unaware of COLLECTION
 and REQUIRE-MATCH
Message-ID: <YMXluxsgCImJrji7UhQ69akl3hvX8GotnlYn7BMESmtAMUmq5krSU43IeNH20pLbTpMfI4k3ycqImM8lwxme9RMMlfXA_kLId4LeFmWBwCc=@protonmail.com>
In-Reply-To: <jwv5y5074ag.fsf-monnier+emacs@HIDDEN>
References: <Z37akRtOZpCa8uyj_2oyIonmlmfE70EiqztTtZtYAVk_9eSK7BeC61kXORi4yHKRvkkF1Lnp87hvWQQ4ZnJ4TZr6Txhh3QgW-pfNAD2wSb0=@protonmail.com>
 <596919925b4762b66be8@HIDDEN> <jwvo7itanhr.fsf-monnier+emacs@HIDDEN>
 <nP4ViMxp5jxgUcgA2BP9wYdzWMlQIMC7iHr_bC6atFHLniJNQ6CNrimafPkWJ4uxUaLPk0XdDqsgGWUDEZbqsk9R23NhWnlzCWf0jDNM2z8=@protonmail.com>
 <jwvpm388sd5.fsf-monnier+emacs@HIDDEN>
 <qPWR_1rol4hC0RqKhl7x_KG2Gv5smj_--evK0ziobB1NHDD2i5cP4sJtZhNp996XeMtrT4u5eR_sN7H1-sS0MK2rHkq3YtND95AvdLtyp78=@protonmail.com>
 <jwvmsyc78uv.fsf-monnier+emacs@HIDDEN>
 <QPy8idsVJd0A0ockFF6kS0pZHa2h-MtIy6Qxp7IAcGbIuVOVAsQSH8bdQKwnYbHdji_4ab3ykfM9kf9Ay9xTe3ZO2PxCke0RjGJKOfzYDfY=@protonmail.com>
 <jwv5y5074ag.fsf-monnier+emacs@HIDDEN>
Feedback-ID: 57735886:user:proton
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 65459
Cc: Gregory Heytings <gregory@HIDDEN>, 65459 <at> debbugs.gnu.org,
 Eli Zaretskii <eliz@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)






Sent with Proton Mail secure email.

------- Original Message -------
On Monday, August 28th, 2023 at 6:02 AM, Stefan Monnier <monnier@HIDDEN=
eal.ca> wrote:


> > > Whether the default only shows up when instructed is a UI issue,
> > > which can/should be under control of a UI customization.
> > > Could one control the UI customization programmatically as well ?
>=20
>=20
> Don't know what you mean by that.

> The init file is executed and hence the way the users control their
> customization is programmatic, yes, but I suspect that's not what
> you mean. > Stefan

It might be what I mean.  The users should have the ability to enable the
minibuffer prefilling for a function they write, but setting some enabling
feature using elisp code.=20

After much discussion, I would need to test your ideas out in practice
and provide you with feedback.







Information forwarded to bug-gnu-emacs@HIDDEN:
bug#65459; Package emacs. Full text available.

Message received at 65459 <at> debbugs.gnu.org:


Received: (at 65459) by debbugs.gnu.org; 27 Aug 2023 21:12:05 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Aug 27 17:12:05 2023
Received: from localhost ([127.0.0.1]:46373 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qaN3B-0007QO-Nr
	for submit <at> debbugs.gnu.org; Sun, 27 Aug 2023 17:12:05 -0400
Received: from mail-40135.protonmail.ch ([185.70.40.135]:55179)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <heimeborgia@HIDDEN>) id 1qaN37-0007Q5-7i
 for 65459 <at> debbugs.gnu.org; Sun, 27 Aug 2023 17:12:01 -0400
Date: Sun, 27 Aug 2023 21:11:27 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com;
 s=protonmail3; t=1693170704; x=1693429904;
 bh=IExAErMHE57wZFZ6+Y0yE0/5GSuet8+liRfl2/AFdiw=;
 h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References:
 Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID:
 Message-ID:BIMI-Selector;
 b=LQllOU8MkqJ1QUTZ+TkOSvmZZNDJAOK7JXP+Ulv05wTlcZfzUk+6aRBPvmB3K2Bfd
 nOREmfa8Gx1eJv7KGey5ul0MCdGETI3+0mKL0gKpYDZ3a75NgVe/vdaF7dwc85+sN6
 5E2/+MfF75xh6iLi0ALtuvzVfDwzMU1ytpOG8A+3JwnfbeSSQ77vjgvw17MQprrUSP
 7eQO5zsOkTsCgvzVZT3o8fwa4CHfO/0tHwI9145sTrBfRn+v0iZ2wqHb2BqBX2Zqg9
 MW7zAo8ZmCcnlpmXISdQhywkzMtrHYISRGicW8SvATQYjDeJjFDUirBM0ZmqqkGVve
 DLLWhGlTtRa/w==
To: Stefan Monnier <monnier@HIDDEN>
From: Heime <heimeborgia@HIDDEN>
Subject: Re: bug#65459: completing-read INITIAL-VALUE unaware of COLLECTION
 and REQUIRE-MATCH
Message-ID: <PGHFCqIlqCiLxdJPsfkhTdXMBxqeltIA4-jsbNTrcBkDHaEVr3JelBwoN2l-vFCfCfvp1a84HPt_R7JIBMK2xAcITbgUm0FGEn9Las9hii0=@protonmail.com>
In-Reply-To: <jwvbkes74n1.fsf-monnier+emacs@HIDDEN>
References: <Z37akRtOZpCa8uyj_2oyIonmlmfE70EiqztTtZtYAVk_9eSK7BeC61kXORi4yHKRvkkF1Lnp87hvWQQ4ZnJ4TZr6Txhh3QgW-pfNAD2wSb0=@protonmail.com>
 <596919925b4762b66be8@HIDDEN> <jwvo7itanhr.fsf-monnier+emacs@HIDDEN>
 <nP4ViMxp5jxgUcgA2BP9wYdzWMlQIMC7iHr_bC6atFHLniJNQ6CNrimafPkWJ4uxUaLPk0XdDqsgGWUDEZbqsk9R23NhWnlzCWf0jDNM2z8=@protonmail.com>
 <jwvpm388sd5.fsf-monnier+emacs@HIDDEN>
 <qPWR_1rol4hC0RqKhl7x_KG2Gv5smj_--evK0ziobB1NHDD2i5cP4sJtZhNp996XeMtrT4u5eR_sN7H1-sS0MK2rHkq3YtND95AvdLtyp78=@protonmail.com>
 <jwvmsyc78uv.fsf-monnier+emacs@HIDDEN>
 <GXEyBNlPOyOwudh1u-PmVlBcTeINuhy5usNr0LN80FOF3-9dqXBOFJspokFB8dBRzfsHLDLGnqQ7XKQv5v_ffR2bB28us9IvVcQ9iLMDki0=@protonmail.com>
 <jwvbkes74n1.fsf-monnier+emacs@HIDDEN>
Feedback-ID: 57735886:user:proton
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 65459
Cc: Gregory Heytings <gregory@HIDDEN>, 65459 <at> debbugs.gnu.org,
 Eli Zaretskii <eliz@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)






Sent with Proton Mail secure email.

------- Original Message -------
On Monday, August 28th, 2023 at 6:01 AM, Stefan Monnier <monnier@HIDDEN=
eal.ca> wrote:


> > > Whether the default only shows up when instructed is a UI issue, whic=
h
> > > can/should be under control of a UI customization. - Stefan

> > > I would need an example. Suppose one changes the UI customization, wo=
uld that
> > > apply to all calls of that function ? I would want prefilling occasio=
nally.
> > > Would that be possible ?
=20
> There are some cases, such as `read-file-name` where we do want some
> prefilling, so of course it's possible, but it has to be linked to some
> specific property of the thing we're requesting from the user and how it
> relates to the string with which we want to prefill the buffer.

I am proposing a broader use.  I meant an example of how a programmer can
include minibuffer prefilling.   It seems that the functionality exists
but not well known or understood.  If minibuffer prefilling has been possib=
le
for us in `read-file-name`, then the possibility should also be provided to=
=20
programmers and users devising their own functionality.  =20
=20
=20
> So it goes back to the question of why you want this specific call to
> `completing-read` to be prefilled. The answer shouldn't be "because
> I prefer it this way" (that answer should be satisfied instead by
> a customization setting since it may not apply to other users of that
> code).
>=20
> E.g. in the case of `read-file-name` it's because in 99% of the cases
> the end result wants to include all or most of that prefilled string.
>=20
> > All these UI accept any entries by the user.

Customarily all minibuffer input from the user is allowed to be entered.
I claim automatic prefilling can be considered a form of user input, if=20
they code their own function with prefilling in mind.
=20
> I don't know what you mean by that.
>=20
> > I am of the school of thought that doing so automatically is also
> > a valid operation.

> And I didn't understand this part either. > Stefan

There are two audiences in all this.  Programmers who write libraries
and users who write functions for their own use.  The thought is that
if `read-file-name` has capability of minibuffer prefilling, then minibuffe=
r
prefilling capability should be available for them to use without having
them convince anybody why they want it to happen. =20

I consider the statement "I prefer it this way" legitimate, because in emac=
s=20
users have the capability to add functionality for their personal use, and =
their
decisions would not affect other users of that code.

Did some more thinking about all this and can see the possibility of INITIA=
L
to become much broader.  For maintainers of libraries for public use, the c=
ode=20
could need some elaboration, but not much for personal use cases.
be






Information forwarded to bug-gnu-emacs@HIDDEN:
bug#65459; Package emacs. Full text available.

Message received at 65459 <at> debbugs.gnu.org:


Received: (at 65459) by debbugs.gnu.org; 27 Aug 2023 20:54:40 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Aug 27 16:54:40 2023
Received: from localhost ([127.0.0.1]:46368 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qaMmK-0006o4-Ji
	for submit <at> debbugs.gnu.org; Sun, 27 Aug 2023 16:54:40 -0400
Received: from mail-4325.protonmail.ch ([185.70.43.25]:64993)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <heimeborgia@HIDDEN>) id 1qaMmF-0006nn-N2
 for 65459 <at> debbugs.gnu.org; Sun, 27 Aug 2023 16:54:35 -0400
Date: Sun, 27 Aug 2023 20:54:16 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com;
 s=protonmail3; t=1693169659; x=1693428859;
 bh=bAjSAjKEzUlY5ztt97MS3iHj3qXNG36+V9E8abtToGA=;
 h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References:
 Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID:
 Message-ID:BIMI-Selector;
 b=fvcVW35jYbNU0t9p8mQ1I6iRMXL9MXOfFGH+9R5T53+XZUXD3LSrO4SfvCd+d0pQj
 S8th1CLD4rlDdbLEtYaG8Oiodt7RFwk+dyE9my5kfR3quGqWTAgESADE3Y1MKL1mtf
 PWGTBl0yfGe6FMzaXurrq3WBFKHrcI0ejKXRCtRhm34vSHE4ZfcV7vHn2DW9MMRCqC
 fa1ju3vI02kS3PH/UK/NeP7IPrHH5Umt+Y3fUDJIQJq4Cjf6qDeDsv9rR64c8NJACL
 utW7F7LD8GoZLZsQowpMAgzRrsHCxe88zjW8BCjTnSTW95OAIR6cd8cgVldUb8jLpB
 7OV0MdhF6NW7A==
To: Stefan Monnier <monnier@HIDDEN>
From: Heime <heimeborgia@HIDDEN>
Subject: Re: bug#65459: completing-read INITIAL-VALUE unaware of COLLECTION
 and REQUIRE-MATCH
Message-ID: <KQlCjKSzUwow1XFOPOKhtahh9ytrUxSRFUjEVWvxaiTlRld4n8njbVVqHj6Iw7w87Mx0w80FERk0YlDsHDwWrLFZ2YBGTlLcXRnrIyCunVA=@protonmail.com>
In-Reply-To: <jwv5y5074ag.fsf-monnier+emacs@HIDDEN>
References: <Z37akRtOZpCa8uyj_2oyIonmlmfE70EiqztTtZtYAVk_9eSK7BeC61kXORi4yHKRvkkF1Lnp87hvWQQ4ZnJ4TZr6Txhh3QgW-pfNAD2wSb0=@protonmail.com>
 <596919925b4762b66be8@HIDDEN> <jwvo7itanhr.fsf-monnier+emacs@HIDDEN>
 <nP4ViMxp5jxgUcgA2BP9wYdzWMlQIMC7iHr_bC6atFHLniJNQ6CNrimafPkWJ4uxUaLPk0XdDqsgGWUDEZbqsk9R23NhWnlzCWf0jDNM2z8=@protonmail.com>
 <jwvpm388sd5.fsf-monnier+emacs@HIDDEN>
 <qPWR_1rol4hC0RqKhl7x_KG2Gv5smj_--evK0ziobB1NHDD2i5cP4sJtZhNp996XeMtrT4u5eR_sN7H1-sS0MK2rHkq3YtND95AvdLtyp78=@protonmail.com>
 <jwvmsyc78uv.fsf-monnier+emacs@HIDDEN>
 <QPy8idsVJd0A0ockFF6kS0pZHa2h-MtIy6Qxp7IAcGbIuVOVAsQSH8bdQKwnYbHdji_4ab3ykfM9kf9Ay9xTe3ZO2PxCke0RjGJKOfzYDfY=@protonmail.com>
 <jwv5y5074ag.fsf-monnier+emacs@HIDDEN>
Feedback-ID: 57735886:user:proton
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 65459
Cc: Gregory Heytings <gregory@HIDDEN>, 65459 <at> debbugs.gnu.org,
 Eli Zaretskii <eliz@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)






Sent with Proton Mail secure email.

------- Original Message -------
On Monday, August 28th, 2023 at 6:02 AM, Stefan Monnier <monnier@HIDDEN=
eal.ca> wrote:


> > > Whether the default only shows up when instructed is a UI issue,
> > > which can/should be under control of a UI customization.
> > > Could one control the UI customization programmatically as well ?
>=20
>=20
> Don't know what you mean by that.
> The init file is executed and hence the way the users control their
> customization is programmatic, yes, but I suspect that's not what
> you mean. > Stefan

Users might want to use minibuffer reading with possibility of prefilling.
Not only from the Emacs Customisation Menu as usually recommended.





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#65459; Package emacs. Full text available.

Message received at 65459 <at> debbugs.gnu.org:


Received: (at 65459) by debbugs.gnu.org; 27 Aug 2023 18:03:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Aug 27 14:03:09 2023
Received: from localhost ([127.0.0.1]:46217 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qaK6P-0007dP-2o
	for submit <at> debbugs.gnu.org; Sun, 27 Aug 2023 14:03:09 -0400
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:53160)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1qaK6N-0007dD-KI
 for 65459 <at> debbugs.gnu.org; Sun, 27 Aug 2023 14:03:07 -0400
Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1])
 by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 462B180423;
 Sun, 27 Aug 2023 14:02:56 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1693159375;
 bh=egtheiWewMgFDezOSfDC7PCo+/Gtw3ZdbuQLfzwtd04=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=K3ZNp21zebPXOWrzY/nxiGYyhBBV9w5O3n+/XbxCE4XRmuxdLyevUBkDnYxzHpFRS
 GAHZts9cV1cGKA8VOvvAwGIFczLn44SqM4N4hMmekTGBgVoeg3sFcou6rpO3GQ8vh2
 m7DZRNEelNB9a5XJBHQ6PXtCL/uHbvedfqFNhG3M3RhqY1Tq0BIc69vJcJTom3rAfR
 S832oNTSjHIacudYd4fHRLJuUjV7vpYQuz9culDfG9kZhPQHp+lZbjS+ZC+d85P6kC
 DQqC71UsxJxXIdTKc/rW99mlAeNSKG6dqoMIbn17U/Sh8nk+4rcKUy9iXGjRn7oeE+
 Di+teft4Wt78w==
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 1B6F08019D;
 Sun, 27 Aug 2023 14:02:55 -0400 (EDT)
Received: from pastel (unknown [108.175.234.188])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id E447A120208;
 Sun, 27 Aug 2023 14:02:54 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Heime <heimeborgia@HIDDEN>
Subject: Re: bug#65459: completing-read INITIAL-VALUE unaware of COLLECTION
 and REQUIRE-MATCH
In-Reply-To: <QPy8idsVJd0A0ockFF6kS0pZHa2h-MtIy6Qxp7IAcGbIuVOVAsQSH8bdQKwnYbHdji_4ab3ykfM9kf9Ay9xTe3ZO2PxCke0RjGJKOfzYDfY=@protonmail.com>
 (Heime's message of "Sun, 27 Aug 2023 16:42:07 +0000")
Message-ID: <jwv5y5074ag.fsf-monnier+emacs@HIDDEN>
References: <Z37akRtOZpCa8uyj_2oyIonmlmfE70EiqztTtZtYAVk_9eSK7BeC61kXORi4yHKRvkkF1Lnp87hvWQQ4ZnJ4TZr6Txhh3QgW-pfNAD2wSb0=@protonmail.com>
 <9K_-oO834AqSJEo_pqDrfj7Q1O1vcqy19pPVpFDuVl5tfCjWqlLa8cRgM16uDFBEt63VYEUkj7ueLAZ8XLrfsZAuRPLvU4Mx3von1r73fEE=@protonmail.com>
 <jwvh6oonpm5.fsf-monnier+emacs@HIDDEN>
 <596919925b4762b66be8@HIDDEN>
 <jwvo7itanhr.fsf-monnier+emacs@HIDDEN>
 <nP4ViMxp5jxgUcgA2BP9wYdzWMlQIMC7iHr_bC6atFHLniJNQ6CNrimafPkWJ4uxUaLPk0XdDqsgGWUDEZbqsk9R23NhWnlzCWf0jDNM2z8=@protonmail.com>
 <jwvpm388sd5.fsf-monnier+emacs@HIDDEN>
 <qPWR_1rol4hC0RqKhl7x_KG2Gv5smj_--evK0ziobB1NHDD2i5cP4sJtZhNp996XeMtrT4u5eR_sN7H1-sS0MK2rHkq3YtND95AvdLtyp78=@protonmail.com>
 <jwvmsyc78uv.fsf-monnier+emacs@HIDDEN>
 <QPy8idsVJd0A0ockFF6kS0pZHa2h-MtIy6Qxp7IAcGbIuVOVAsQSH8bdQKwnYbHdji_4ab3ykfM9kf9Ay9xTe3ZO2PxCke0RjGJKOfzYDfY=@protonmail.com>
Date: Sun, 27 Aug 2023 14:02:54 -0400
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 AWL 0.017 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain
 DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from
 domain
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 65459
Cc: Gregory Heytings <gregory@HIDDEN>, 65459 <at> debbugs.gnu.org,
 Eli Zaretskii <eliz@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

>> Whether the default only shows up when instructed is a UI issue,
>> which can/should be under control of a UI customization.
> Could one control the UI customization programmatically as well ?

Don't know what you mean by that.
The init file is executed and hence the way the users control their
customization is programmatic, yes, but I suspect that's not what
you mean.


        Stefan





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#65459; Package emacs. Full text available.

Message received at 65459 <at> debbugs.gnu.org:


Received: (at 65459) by debbugs.gnu.org; 27 Aug 2023 18:01:51 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Aug 27 14:01:50 2023
Received: from localhost ([127.0.0.1]:46211 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qaK58-0007at-Kt
	for submit <at> debbugs.gnu.org; Sun, 27 Aug 2023 14:01:50 -0400
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:9717)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1qaK56-0007ab-9h
 for 65459 <at> debbugs.gnu.org; Sun, 27 Aug 2023 14:01:49 -0400
Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1])
 by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id BFBE11000E5;
 Sun, 27 Aug 2023 14:01:36 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1693159291;
 bh=AxCRIQuyrFyiCmn+WQ8++0CRzbfAMIsSyZFvbWRSmeE=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=oCAIxrM9X5Cz1Di42WUUyPWnsnO2FfKgvk9b1bCcLDnBZkKpA5MN4D/7rwlStOUYz
 bxE6Kqw84vOJZ2VAzsCEPeTpZqGplAtHk2dNC1PuGY69NHe7J/QZ4eSQFP7idNpCq1
 HFmus4ps2oXTTnphT8lQDbagwMJWNqzi/nGw5T1Rlr7wRmLsF+PzciJlUMBrnTwugC
 9ZfaTm+MSKPJdK7XTCUyDdb/IexfNoH6KP2Y+omcnfNL1x9kzu7DSRCQayrJQUjigf
 /jVHKFQqn94jBmbOk8JKlSvNlCaEjGpKi1a6f2teUx3+1b+9Mu4Bm7kP1uiyNMD627
 yN7LNly15j0vA==
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 89D6510006B;
 Sun, 27 Aug 2023 14:01:31 -0400 (EDT)
Received: from pastel (unknown [108.175.234.188])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 59D0C1203A2;
 Sun, 27 Aug 2023 14:01:31 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Heime <heimeborgia@HIDDEN>
Subject: Re: bug#65459: completing-read INITIAL-VALUE unaware of COLLECTION
 and REQUIRE-MATCH
In-Reply-To: <GXEyBNlPOyOwudh1u-PmVlBcTeINuhy5usNr0LN80FOF3-9dqXBOFJspokFB8dBRzfsHLDLGnqQ7XKQv5v_ffR2bB28us9IvVcQ9iLMDki0=@protonmail.com>
 (Heime's message of "Sun, 27 Aug 2023 16:35:33 +0000")
Message-ID: <jwvbkes74n1.fsf-monnier+emacs@HIDDEN>
References: <Z37akRtOZpCa8uyj_2oyIonmlmfE70EiqztTtZtYAVk_9eSK7BeC61kXORi4yHKRvkkF1Lnp87hvWQQ4ZnJ4TZr6Txhh3QgW-pfNAD2wSb0=@protonmail.com>
 <9K_-oO834AqSJEo_pqDrfj7Q1O1vcqy19pPVpFDuVl5tfCjWqlLa8cRgM16uDFBEt63VYEUkj7ueLAZ8XLrfsZAuRPLvU4Mx3von1r73fEE=@protonmail.com>
 <jwvh6oonpm5.fsf-monnier+emacs@HIDDEN>
 <596919925b4762b66be8@HIDDEN>
 <jwvo7itanhr.fsf-monnier+emacs@HIDDEN>
 <nP4ViMxp5jxgUcgA2BP9wYdzWMlQIMC7iHr_bC6atFHLniJNQ6CNrimafPkWJ4uxUaLPk0XdDqsgGWUDEZbqsk9R23NhWnlzCWf0jDNM2z8=@protonmail.com>
 <jwvpm388sd5.fsf-monnier+emacs@HIDDEN>
 <qPWR_1rol4hC0RqKhl7x_KG2Gv5smj_--evK0ziobB1NHDD2i5cP4sJtZhNp996XeMtrT4u5eR_sN7H1-sS0MK2rHkq3YtND95AvdLtyp78=@protonmail.com>
 <jwvmsyc78uv.fsf-monnier+emacs@HIDDEN>
 <GXEyBNlPOyOwudh1u-PmVlBcTeINuhy5usNr0LN80FOF3-9dqXBOFJspokFB8dBRzfsHLDLGnqQ7XKQv5v_ffR2bB28us9IvVcQ9iLMDki0=@protonmail.com>
Date: Sun, 27 Aug 2023 14:01:30 -0400
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 AWL 0.067 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain
 DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from
 domain
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 65459
Cc: Gregory Heytings <gregory@HIDDEN>, 65459 <at> debbugs.gnu.org,
 Eli Zaretskii <eliz@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

>> Whether the default only shows up when instructed is a UI issue, which
>> can/should be under control of a UI customization. - Stefan
> I would need an example.  Suppose one changes the UI customization, would that
> apply to all calls of that function ?  I would want prefilling occasionally.
> Would that be possible ?

There are some cases, such as `read-file-name` where we do want some
prefilling, so of course it's possible, but it has to be linked to some
specific property of the thing we're requesting from the user and how it
relates to the string with which we want to prefill the buffer.

So it goes back to the question of why you want this specific call to
`completing-read` to be prefilled.  The answer shouldn't be "because
I prefer it this way" (that answer should be satisfied instead by
a customization setting since it may not apply to other users of that
code).

E.g. in the case of `read-file-name` it's because in 99% of the cases
the end result wants to include all or most of that prefilled string.

> All these UI accept any entries by the user.

I don't know what you mean by that.

> I am of the school of thought that doing so automatically is also
> a valid operation.

And I didn't understand this part either.


        Stefan





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#65459; Package emacs. Full text available.

Message received at 65459 <at> debbugs.gnu.org:


Received: (at 65459) by debbugs.gnu.org; 27 Aug 2023 16:42:38 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Aug 27 12:42:38 2023
Received: from localhost ([127.0.0.1]:46128 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qaIqT-00007X-WB
	for submit <at> debbugs.gnu.org; Sun, 27 Aug 2023 12:42:38 -0400
Received: from mail-4325.protonmail.ch ([185.70.43.25]:38537)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <heimeborgia@HIDDEN>) id 1qaIqS-00007I-PK
 for 65459 <at> debbugs.gnu.org; Sun, 27 Aug 2023 12:42:37 -0400
Date: Sun, 27 Aug 2023 16:42:07 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com;
 s=protonmail3; t=1693154545; x=1693413745;
 bh=v9xbwIoW4+dWXJvNUePfirjAtX4rGni8gZPCcrAmzQk=;
 h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References:
 Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID:
 Message-ID:BIMI-Selector;
 b=b938ILrY0YPerkp67Bv9MTfOxg3wnO6s7ovAjW1a+ZKlLd5GfNnd48x66Oc8e1AAh
 9ZwLFTwLD9JmrNE2SCAq/OXd7sijraOqYdQArK6TLpNzkCaNCnKWHBfCms2nHMYMlw
 U5URH/aakW20dpA7Di4vQZE0FEWxYkFuU1k7ZwWJ3XnBEL54cJL7kgeafHGelu3WOI
 OlRC1n1NOh997P51KKhJo1rvO9eyrTUL7FeVXtNK949X1pw/u+bI+kS8TZEYCw6+JC
 oTkEEzY674NcDp7RXG0Wl6EnQlnO3ka3ILsU7W+ir3kyg0ptQbpGNcHwPy2sRra8mu
 p+ZCYmt8f+juw==
To: Stefan Monnier <monnier@HIDDEN>
From: Heime <heimeborgia@HIDDEN>
Subject: Re: bug#65459: completing-read INITIAL-VALUE unaware of COLLECTION
 and REQUIRE-MATCH
Message-ID: <QPy8idsVJd0A0ockFF6kS0pZHa2h-MtIy6Qxp7IAcGbIuVOVAsQSH8bdQKwnYbHdji_4ab3ykfM9kf9Ay9xTe3ZO2PxCke0RjGJKOfzYDfY=@protonmail.com>
In-Reply-To: <jwvmsyc78uv.fsf-monnier+emacs@HIDDEN>
References: <Z37akRtOZpCa8uyj_2oyIonmlmfE70EiqztTtZtYAVk_9eSK7BeC61kXORi4yHKRvkkF1Lnp87hvWQQ4ZnJ4TZr6Txhh3QgW-pfNAD2wSb0=@protonmail.com>
 <9K_-oO834AqSJEo_pqDrfj7Q1O1vcqy19pPVpFDuVl5tfCjWqlLa8cRgM16uDFBEt63VYEUkj7ueLAZ8XLrfsZAuRPLvU4Mx3von1r73fEE=@protonmail.com>
 <jwvh6oonpm5.fsf-monnier+emacs@HIDDEN> <596919925b4762b66be8@HIDDEN>
 <jwvo7itanhr.fsf-monnier+emacs@HIDDEN>
 <nP4ViMxp5jxgUcgA2BP9wYdzWMlQIMC7iHr_bC6atFHLniJNQ6CNrimafPkWJ4uxUaLPk0XdDqsgGWUDEZbqsk9R23NhWnlzCWf0jDNM2z8=@protonmail.com>
 <jwvpm388sd5.fsf-monnier+emacs@HIDDEN>
 <qPWR_1rol4hC0RqKhl7x_KG2Gv5smj_--evK0ziobB1NHDD2i5cP4sJtZhNp996XeMtrT4u5eR_sN7H1-sS0MK2rHkq3YtND95AvdLtyp78=@protonmail.com>
 <jwvmsyc78uv.fsf-monnier+emacs@HIDDEN>
Feedback-ID: 57735886:user:proton
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 65459
Cc: Gregory Heytings <gregory@HIDDEN>, 65459 <at> debbugs.gnu.org,
 Eli Zaretskii <eliz@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)






Sent with Proton Mail secure email.

------- Original Message -------
On Monday, August 28th, 2023 at 4:26 AM, Stefan Monnier via "Bug reports fo=
r GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@HIDDEN> =
wrote:


> > Suppose I want to prefill the buffer with something, I should be allowe=
d
> > to do that.
>=20
>=20
> Of course, and we do allow that.
> But you said:
>=20
> I like it, others don't like it.
>=20
> so what happens when "others" use your code?
> And what happens when you use others' code?
>=20
> Neither is happy if the choice is made by the coder. OTOH if the choice
> is made by UI customization, then the coder doesn't need to worry about
> it and the both you and others get the behavior they like.
>=20
> > The default only shows up when instructed, so not really
> > an automatic prefill of the minibuffer.
>=20
>=20
> Whether the default only shows up when instructed is a UI issue, which
> can/should be under control of a UI customization. > Stefan
=20
Could one control the UI customization programmatically as well ?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#65459; Package emacs. Full text available.

Message received at 65459 <at> debbugs.gnu.org:


Received: (at 65459) by debbugs.gnu.org; 27 Aug 2023 16:35:59 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Aug 27 12:35:59 2023
Received: from localhost ([127.0.0.1]:46060 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qaIk2-0008M5-TY
	for submit <at> debbugs.gnu.org; Sun, 27 Aug 2023 12:35:59 -0400
Received: from mail-4324.protonmail.ch ([185.70.43.24]:50509)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <heimeborgia@HIDDEN>) id 1qaIk1-0008Lt-C1
 for 65459 <at> debbugs.gnu.org; Sun, 27 Aug 2023 12:35:58 -0400
Date: Sun, 27 Aug 2023 16:35:33 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com;
 s=protonmail3; t=1693154145; x=1693413345;
 bh=dNqthnSQIIBBoNNXK2S/v+CuFx5w+E9CBcclc3Y3osI=;
 h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References:
 Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID:
 Message-ID:BIMI-Selector;
 b=a8gI3xbIwb9ci/+0Pj2UBeoo7huLDBauQhmoQW0H8FonqbQSY49poLyr4PKN7e738
 /jlehLxSoesFRICY09KMgac1/Z3bwpPkDTWnnTXqJPXaxiYJDKaWD75k1vC9ko0RhI
 G5XX12BG5Ip0UPBwpCyocA6graY7I2YQ+ZmROOENJs8LdlwGfjdzoq/wJAAF4L/OXZ
 BEh8qW3gGAsgdPyT1fh3HH5B3TUua9eioSHo40podu8kpsZzeIotX4QQLCQS4Sw4/6
 131t2JtRg4nun9uIfDPBjNi5HyuiCfLvv09LRzSoxrDvgSc4jL6i1ccDpMjrh6AICI
 NvQHJr9WyjUag==
To: Stefan Monnier <monnier@HIDDEN>
From: Heime <heimeborgia@HIDDEN>
Subject: Re: bug#65459: completing-read INITIAL-VALUE unaware of COLLECTION
 and REQUIRE-MATCH
Message-ID: <GXEyBNlPOyOwudh1u-PmVlBcTeINuhy5usNr0LN80FOF3-9dqXBOFJspokFB8dBRzfsHLDLGnqQ7XKQv5v_ffR2bB28us9IvVcQ9iLMDki0=@protonmail.com>
In-Reply-To: <jwvmsyc78uv.fsf-monnier+emacs@HIDDEN>
References: <Z37akRtOZpCa8uyj_2oyIonmlmfE70EiqztTtZtYAVk_9eSK7BeC61kXORi4yHKRvkkF1Lnp87hvWQQ4ZnJ4TZr6Txhh3QgW-pfNAD2wSb0=@protonmail.com>
 <9K_-oO834AqSJEo_pqDrfj7Q1O1vcqy19pPVpFDuVl5tfCjWqlLa8cRgM16uDFBEt63VYEUkj7ueLAZ8XLrfsZAuRPLvU4Mx3von1r73fEE=@protonmail.com>
 <jwvh6oonpm5.fsf-monnier+emacs@HIDDEN> <596919925b4762b66be8@HIDDEN>
 <jwvo7itanhr.fsf-monnier+emacs@HIDDEN>
 <nP4ViMxp5jxgUcgA2BP9wYdzWMlQIMC7iHr_bC6atFHLniJNQ6CNrimafPkWJ4uxUaLPk0XdDqsgGWUDEZbqsk9R23NhWnlzCWf0jDNM2z8=@protonmail.com>
 <jwvpm388sd5.fsf-monnier+emacs@HIDDEN>
 <qPWR_1rol4hC0RqKhl7x_KG2Gv5smj_--evK0ziobB1NHDD2i5cP4sJtZhNp996XeMtrT4u5eR_sN7H1-sS0MK2rHkq3YtND95AvdLtyp78=@protonmail.com>
 <jwvmsyc78uv.fsf-monnier+emacs@HIDDEN>
Feedback-ID: 57735886:user:proton
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 65459
Cc: Gregory Heytings <gregory@HIDDEN>, 65459 <at> debbugs.gnu.org,
 Eli Zaretskii <eliz@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)






Sent with Proton Mail secure email.

------- Original Message -------
On Monday, August 28th, 2023 at 4:26 AM, Stefan Monnier <monnier@HIDDEN=
eal.ca> wrote:


> > Suppose I want to prefill the buffer with something, I should be allowe=
d
> > to do that.
>=20
>=20
> Of course, and we do allow that.
> But you said:
>=20
> I like it, others don't like it.
>=20
> so what happens when "others" use your code?
> And what happens when you use others' code?
>=20
> Neither is happy if the choice is made by the coder. OTOH if the choice
> is made by UI customization, then the coder doesn't need to worry about
> it and the both you and others get the behavior they like.
>=20
> > The default only shows up when instructed, so not really
> > an automatic prefill of the minibuffer.
>=20
>=20
> Whether the default only shows up when instructed is a UI issue, which
> can/should be under control of a UI customization. - Stefan

I would need an example.  Suppose one changes the UI customization, would t=
hat
apply to all calls of that function ?  I would want prefilling occasionally=
.
Would that be possible ?

All these UI accept any entries by the user.  I am of the school of thought=
 that
doing so automatically is also a valid operation.





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#65459; Package emacs. Full text available.

Message received at 65459 <at> debbugs.gnu.org:


Received: (at 65459) by debbugs.gnu.org; 27 Aug 2023 16:27:10 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Aug 27 12:27:10 2023
Received: from localhost ([127.0.0.1]:46045 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qaIbW-00086u-Aw
	for submit <at> debbugs.gnu.org; Sun, 27 Aug 2023 12:27:10 -0400
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:61625)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1qaIbT-00086g-PX
 for 65459 <at> debbugs.gnu.org; Sun, 27 Aug 2023 12:27:08 -0400
Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1])
 by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 87FC61000DB;
 Sun, 27 Aug 2023 12:26:56 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1693153615;
 bh=5uoJevQRDpf9Aor4wNwDs+nvdytjFWQ5J6V4a/KGmZ4=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=oHebn05qtMtKfimsBdU5HuE7fXKzk4P2NxpEopn2B9mP3ktMnImvffVkhm25WAilu
 MNUIN83vOECD7kmR5o5Ziu0Q2PjxWp80SS/HrUeobqVlp1/9NkGeUlgL3u7+HysUcG
 oW7Rr1ixfb+iPlxucvAM3EfknqtUkVzpMyUeyR3nQopeixNlUQhU1h+YT3sKDp9M4s
 gTFj5bfpt1h6wUaAVAElLpYOwoVH64PnHekKY/skMlEJT1zvqnc+dQs0ybEMKxPpoL
 FzySdTqRji7B4mFXhO8mjsGGgIqI20m/5KREligssgsTZ7sjOH2GDX0hD+rIAL8W6y
 bGxyyZEiFIdpw==
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 8544310006B;
 Sun, 27 Aug 2023 12:26:55 -0400 (EDT)
Received: from pastel (unknown [108.175.234.188])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 542AF120323;
 Sun, 27 Aug 2023 12:26:55 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Heime <heimeborgia@HIDDEN>
Subject: Re: bug#65459: completing-read INITIAL-VALUE unaware of COLLECTION
 and REQUIRE-MATCH
In-Reply-To: <qPWR_1rol4hC0RqKhl7x_KG2Gv5smj_--evK0ziobB1NHDD2i5cP4sJtZhNp996XeMtrT4u5eR_sN7H1-sS0MK2rHkq3YtND95AvdLtyp78=@protonmail.com>
 (Heime's message of "Sun, 27 Aug 2023 16:21:06 +0000")
Message-ID: <jwvmsyc78uv.fsf-monnier+emacs@HIDDEN>
References: <Z37akRtOZpCa8uyj_2oyIonmlmfE70EiqztTtZtYAVk_9eSK7BeC61kXORi4yHKRvkkF1Lnp87hvWQQ4ZnJ4TZr6Txhh3QgW-pfNAD2wSb0=@protonmail.com>
 <JsMHuTJuAV744Cq4rlLRlQJOGLQmlCg5ridnbPUtE5FQyLK2SAM--8WEifARy3o_fp6AygWuygHK0_qbgE6D8tSa50Wsnjdv1kqF1ZlEfIs=@protonmail.com>
 <jwvo7iwnthf.fsf-monnier+emacs@HIDDEN>
 <9K_-oO834AqSJEo_pqDrfj7Q1O1vcqy19pPVpFDuVl5tfCjWqlLa8cRgM16uDFBEt63VYEUkj7ueLAZ8XLrfsZAuRPLvU4Mx3von1r73fEE=@protonmail.com>
 <jwvh6oonpm5.fsf-monnier+emacs@HIDDEN>
 <596919925b4762b66be8@HIDDEN>
 <jwvo7itanhr.fsf-monnier+emacs@HIDDEN>
 <nP4ViMxp5jxgUcgA2BP9wYdzWMlQIMC7iHr_bC6atFHLniJNQ6CNrimafPkWJ4uxUaLPk0XdDqsgGWUDEZbqsk9R23NhWnlzCWf0jDNM2z8=@protonmail.com>
 <jwvpm388sd5.fsf-monnier+emacs@HIDDEN>
 <qPWR_1rol4hC0RqKhl7x_KG2Gv5smj_--evK0ziobB1NHDD2i5cP4sJtZhNp996XeMtrT4u5eR_sN7H1-sS0MK2rHkq3YtND95AvdLtyp78=@protonmail.com>
Date: Sun, 27 Aug 2023 12:26:54 -0400
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 AWL 0.071 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain
 DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from
 domain
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 65459
Cc: Gregory Heytings <gregory@HIDDEN>, 65459 <at> debbugs.gnu.org,
 Eli Zaretskii <eliz@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Suppose I want to prefill the buffer with something, I should be allowed 
> to do that.

Of course, and we do allow that.
But you said:

    I like it, others don't like it.

so what happens when "others" use your code?
And what happens when you use others' code?

Neither is happy if the choice is made by the coder.  OTOH if the choice
is made by UI customization, then the coder doesn't need to worry about
it and the both you and others get the behavior they like.

> The default only shows up when instructed, so not really
> an automatic prefill of the minibuffer.

Whether the default only shows up when instructed is a UI issue, which
can/should be under control of a UI customization.


        Stefan





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#65459; Package emacs. Full text available.

Message received at 65459 <at> debbugs.gnu.org:


Received: (at 65459) by debbugs.gnu.org; 27 Aug 2023 16:21:30 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Aug 27 12:21:30 2023
Received: from localhost ([127.0.0.1]:46023 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qaIW2-0007wd-7Q
	for submit <at> debbugs.gnu.org; Sun, 27 Aug 2023 12:21:30 -0400
Received: from mail-40137.protonmail.ch ([185.70.40.137]:45271)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <heimeborgia@HIDDEN>) id 1qaIVz-0007wI-9Z
 for 65459 <at> debbugs.gnu.org; Sun, 27 Aug 2023 12:21:28 -0400
Date: Sun, 27 Aug 2023 16:21:06 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com;
 s=protonmail3; t=1693153275; x=1693412475;
 bh=fiJTiX/ybZ4R2O3Q8mXLz1u441plUKsadP6v62AHuFk=;
 h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References:
 Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID:
 Message-ID:BIMI-Selector;
 b=f99m26Px0A6XHNZvHSkHDWAw+96LkUCclDPY/5I+UC5PF0QHCQL/Mr+GdO+7S0idm
 uAdqe3UceknHAd2t7kZeXyFO/sqqJMUYglKx6lvpEB8Iy7qZ9aP1rLGk1a1M5Z+fb0
 lgW1kJaeuHnnKXeGBdG4TNZ97FmibYqeGhsngkiptRZf3SXwosoKfMMphe+2imJ37z
 TljCpNv0jVpBjPXCQUGuRYRXFU3oDHM/kztc7r5mjo8pbmKuSKXt1BoRuyMRQEqlfZ
 sjT5TJFALyTjsfGilqzonLYyennZ68B6dHteC98t0UkM30PLkD7B1NgRhRLRVlHywB
 HnpKW5HvRWPbA==
To: Stefan Monnier <monnier@HIDDEN>
From: Heime <heimeborgia@HIDDEN>
Subject: Re: bug#65459: completing-read INITIAL-VALUE unaware of COLLECTION
 and REQUIRE-MATCH
Message-ID: <qPWR_1rol4hC0RqKhl7x_KG2Gv5smj_--evK0ziobB1NHDD2i5cP4sJtZhNp996XeMtrT4u5eR_sN7H1-sS0MK2rHkq3YtND95AvdLtyp78=@protonmail.com>
In-Reply-To: <jwvpm388sd5.fsf-monnier+emacs@HIDDEN>
References: <Z37akRtOZpCa8uyj_2oyIonmlmfE70EiqztTtZtYAVk_9eSK7BeC61kXORi4yHKRvkkF1Lnp87hvWQQ4ZnJ4TZr6Txhh3QgW-pfNAD2wSb0=@protonmail.com>
 <JsMHuTJuAV744Cq4rlLRlQJOGLQmlCg5ridnbPUtE5FQyLK2SAM--8WEifARy3o_fp6AygWuygHK0_qbgE6D8tSa50Wsnjdv1kqF1ZlEfIs=@protonmail.com>
 <jwvo7iwnthf.fsf-monnier+emacs@HIDDEN>
 <9K_-oO834AqSJEo_pqDrfj7Q1O1vcqy19pPVpFDuVl5tfCjWqlLa8cRgM16uDFBEt63VYEUkj7ueLAZ8XLrfsZAuRPLvU4Mx3von1r73fEE=@protonmail.com>
 <jwvh6oonpm5.fsf-monnier+emacs@HIDDEN> <596919925b4762b66be8@HIDDEN>
 <jwvo7itanhr.fsf-monnier+emacs@HIDDEN>
 <nP4ViMxp5jxgUcgA2BP9wYdzWMlQIMC7iHr_bC6atFHLniJNQ6CNrimafPkWJ4uxUaLPk0XdDqsgGWUDEZbqsk9R23NhWnlzCWf0jDNM2z8=@protonmail.com>
 <jwvpm388sd5.fsf-monnier+emacs@HIDDEN>
Feedback-ID: 57735886:user:proton
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 65459
Cc: Gregory Heytings <gregory@HIDDEN>, 65459 <at> debbugs.gnu.org,
 Eli Zaretskii <eliz@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)






Sent with Proton Mail secure email.

------- Original Message -------
On Monday, August 28th, 2023 at 2:40 AM, Stefan Monnier <monnier@HIDDEN=
eal.ca> wrote:


> > Additionally, let's have minibuffer prefilling as part of the design
> > without any discouragement or encouragement regarding its use.
> > I like it, others don't like it.
>=20
>=20
> This last sentence is key: it should not be a choice of the caller of the
> function, but should depend on the configuration of the UI instead.
>=20
> Using DEFault makes this customization possible. Using INITIAL-INPUT
> does not. - Stefan

Suppose I want to prefill the buffer with something, I should be allowed=20
to do that.  The default only shows up when instructed, so not really
an automatic prefill of the minibuffer.

Not a choice of the caller of the function.  It is the programmer who is=20
calling the function and who wants it to behave a certain.  I find it a
big problem that when I mention minibuffer prefilling, the maintainers
reject such possibility.  It basically means that I get the UI behind=20
by back trying to hamstring me on what I can do and what I cannot do.

Suppose I want minibuffer prefilling, give me the procedure that allows me
to do that, one that is not complicated in a way that dissuades me from=20
implementing such a thing.
  




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#65459; Package emacs. Full text available.

Message received at 65459 <at> debbugs.gnu.org:


Received: (at 65459) by debbugs.gnu.org; 27 Aug 2023 14:40:29 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Aug 27 10:40:29 2023
Received: from localhost ([127.0.0.1]:45945 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qaGwG-0002W5-VY
	for submit <at> debbugs.gnu.org; Sun, 27 Aug 2023 10:40:29 -0400
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:37133)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1qaGwD-0002Vq-GM
 for 65459 <at> debbugs.gnu.org; Sun, 27 Aug 2023 10:40:28 -0400
Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1])
 by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id BB4084415C1;
 Sun, 27 Aug 2023 10:40:13 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1693147212;
 bh=YhV9giWwEdW+7z342zC60346wluGo8gPqWr5MaVGkhE=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=NGnOul+ZTvJd/d5dQSZHzfRAZOKrFVIgOvpI51pAPSMA6tRnNh0V+yslQoKm3EcWR
 OnrlLFf/NksV19w3nHc8s2bJa0lWQBFgei//pqOcXSCk8yqRTtgpHhC3eabDc+xS99
 BlRC+/gb6yv300ZhrvdgAwaB7Rdbk34Jky+hY1Ap8oHFKZr7eQvYw9ZNrPbU2cGsxC
 WY56eJ6Npx+FhTXyxRNJS9vtyiC3bbjUiasuCZFrY66UIE7lnEwU1xFrlauzhRruWY
 PCVtL0MBG6Fr47655CxWvlCb3djZgOMHIiI5oN0HnZXefnZljQpIGiT1yKpuzH3scU
 hQu+fPl5FNDMA==
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 88E294415BB;
 Sun, 27 Aug 2023 10:40:12 -0400 (EDT)
Received: from pastel (unknown [108.175.234.188])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 591911202A0;
 Sun, 27 Aug 2023 10:40:12 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Heime <heimeborgia@HIDDEN>
Subject: Re: bug#65459: completing-read INITIAL-VALUE unaware of COLLECTION
 and REQUIRE-MATCH
In-Reply-To: <nP4ViMxp5jxgUcgA2BP9wYdzWMlQIMC7iHr_bC6atFHLniJNQ6CNrimafPkWJ4uxUaLPk0XdDqsgGWUDEZbqsk9R23NhWnlzCWf0jDNM2z8=@protonmail.com>
 (Heime's message of "Sun, 27 Aug 2023 06:45:21 +0000")
Message-ID: <jwvpm388sd5.fsf-monnier+emacs@HIDDEN>
References: <Z37akRtOZpCa8uyj_2oyIonmlmfE70EiqztTtZtYAVk_9eSK7BeC61kXORi4yHKRvkkF1Lnp87hvWQQ4ZnJ4TZr6Txhh3QgW-pfNAD2wSb0=@protonmail.com>
 <ZnU7o5ta2Yj00sCa0fTbOaRW3DCJh4szyru5E8hqOFTUKqhbj6QZThi7DYp9_AfixePN0kajs7RRptmvVNCJ2Ye-XtrSViMJalH9T8KVNwE=@protonmail.com>
 <jwv4jkopfjs.fsf-monnier+emacs@HIDDEN>
 <JsMHuTJuAV744Cq4rlLRlQJOGLQmlCg5ridnbPUtE5FQyLK2SAM--8WEifARy3o_fp6AygWuygHK0_qbgE6D8tSa50Wsnjdv1kqF1ZlEfIs=@protonmail.com>
 <jwvo7iwnthf.fsf-monnier+emacs@HIDDEN>
 <9K_-oO834AqSJEo_pqDrfj7Q1O1vcqy19pPVpFDuVl5tfCjWqlLa8cRgM16uDFBEt63VYEUkj7ueLAZ8XLrfsZAuRPLvU4Mx3von1r73fEE=@protonmail.com>
 <jwvh6oonpm5.fsf-monnier+emacs@HIDDEN>
 <596919925b4762b66be8@HIDDEN>
 <jwvo7itanhr.fsf-monnier+emacs@HIDDEN>
 <nP4ViMxp5jxgUcgA2BP9wYdzWMlQIMC7iHr_bC6atFHLniJNQ6CNrimafPkWJ4uxUaLPk0XdDqsgGWUDEZbqsk9R23NhWnlzCWf0jDNM2z8=@protonmail.com>
Date: Sun, 27 Aug 2023 10:40:05 -0400
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 AWL -0.051 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain
 DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from
 domain
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 65459
Cc: Gregory Heytings <gregory@HIDDEN>, 65459 <at> debbugs.gnu.org,
 Eli Zaretskii <eliz@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Additionally, let's have minibuffer prefilling as part of the design
> without any discouragement or encouragement regarding its use.
> I like it, others don't like it.

This last sentence is key: it should not be a choice of the caller of the
function, but should depend on the configuration of the UI instead.

Using DEFault makes this customization possible.  Using INITIAL-INPUT
does not.


        Stefan





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#65459; Package emacs. Full text available.

Message received at 65459 <at> debbugs.gnu.org:


Received: (at 65459) by debbugs.gnu.org; 27 Aug 2023 06:45:49 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Aug 27 02:45:49 2023
Received: from localhost ([127.0.0.1]:43925 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qa9Wu-0006cT-R0
	for submit <at> debbugs.gnu.org; Sun, 27 Aug 2023 02:45:49 -0400
Received: from mail-40135.protonmail.ch ([185.70.40.135]:25727)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <heimeborgia@HIDDEN>) id 1qa9Wr-0006cD-R4
 for 65459 <at> debbugs.gnu.org; Sun, 27 Aug 2023 02:45:47 -0400
Date: Sun, 27 Aug 2023 06:45:21 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com;
 s=protonmail3; t=1693118733; x=1693377933;
 bh=/sj/hDmtUV/khAz6s+qBEdAxtRv1nNgYSolDD6eHlu8=;
 h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References:
 Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID:
 Message-ID:BIMI-Selector;
 b=INH4nN+zVZmB4Y4IrtW+I/qrW8aSnnuPza0Wsw+Az2H2iprPBGWtL0LirKQcMb6y8
 YYm7fjXsFz+PQD9RXKzQvPDvDBE2Gf0LpIFWkg3zy+FnI2S7m+9ocVuvg75PNjI42a
 wAvMi+ISVpXmfCECO687v9LHh7frhpr/HGFwhU9mpzLrhcgMY0E5f1444cJJh8IUP2
 d4AUPqVZom+vbmiN3kuvbUtO6mOMVfvv+wNKDsN0fvMZlTJmL1iEMbvsr8AUfelfWk
 Kslc/Y6VIwycfNDYU5+5cXOCm/MeE7ZSysqChPkp0fK/msVPkgnQJ7FHD633cw8PuL
 lAE0VHxdjwsPg==
To: Stefan Monnier <monnier@HIDDEN>
From: Heime <heimeborgia@HIDDEN>
Subject: Re: bug#65459: completing-read INITIAL-VALUE unaware of COLLECTION
 and REQUIRE-MATCH
Message-ID: <nP4ViMxp5jxgUcgA2BP9wYdzWMlQIMC7iHr_bC6atFHLniJNQ6CNrimafPkWJ4uxUaLPk0XdDqsgGWUDEZbqsk9R23NhWnlzCWf0jDNM2z8=@protonmail.com>
In-Reply-To: <jwvo7itanhr.fsf-monnier+emacs@HIDDEN>
References: <Z37akRtOZpCa8uyj_2oyIonmlmfE70EiqztTtZtYAVk_9eSK7BeC61kXORi4yHKRvkkF1Lnp87hvWQQ4ZnJ4TZr6Txhh3QgW-pfNAD2wSb0=@protonmail.com>
 <ZnU7o5ta2Yj00sCa0fTbOaRW3DCJh4szyru5E8hqOFTUKqhbj6QZThi7DYp9_AfixePN0kajs7RRptmvVNCJ2Ye-XtrSViMJalH9T8KVNwE=@protonmail.com>
 <jwv4jkopfjs.fsf-monnier+emacs@HIDDEN>
 <JsMHuTJuAV744Cq4rlLRlQJOGLQmlCg5ridnbPUtE5FQyLK2SAM--8WEifARy3o_fp6AygWuygHK0_qbgE6D8tSa50Wsnjdv1kqF1ZlEfIs=@protonmail.com>
 <jwvo7iwnthf.fsf-monnier+emacs@HIDDEN>
 <9K_-oO834AqSJEo_pqDrfj7Q1O1vcqy19pPVpFDuVl5tfCjWqlLa8cRgM16uDFBEt63VYEUkj7ueLAZ8XLrfsZAuRPLvU4Mx3von1r73fEE=@protonmail.com>
 <jwvh6oonpm5.fsf-monnier+emacs@HIDDEN> <596919925b4762b66be8@HIDDEN>
 <jwvo7itanhr.fsf-monnier+emacs@HIDDEN>
Feedback-ID: 57735886:user:proton
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 65459
Cc: Gregory Heytings <gregory@HIDDEN>, 65459 <at> debbugs.gnu.org,
 Eli Zaretskii <eliz@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)






Sent with Proton Mail secure email.

------- Original Message -------
On Sunday, August 27th, 2023 at 2:27 AM, Stefan Monnier <monnier@HIDDEN=
eal.ca> wrote:


> > > I guess we really should work on a replacement for `completing-read`,=
 eh?
> > > Why should we replace it? Can't we just add another function, alongsi=
de
> > > completing-read-default and completing-read-multiple, using the short=
 POC
> > > code I sent as a starting point?
>=20
>=20
> That's what I meant by "replacement" (I'd expect new code to use that new
> function instead of the other, so one "replaces" the other). Stefan

Additionally, let's have minibuffer prefilling as part of the design withou=
t
any discouragement or encouragement regarding its use.  I like it, others=
=20
don't like it.  =20





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#65459; Package emacs. Full text available.

Message received at 65459 <at> debbugs.gnu.org:


Received: (at 65459) by debbugs.gnu.org; 26 Aug 2023 14:27:56 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Aug 26 10:27:56 2023
Received: from localhost ([127.0.0.1]:43280 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qZuGa-0000Vp-6y
	for submit <at> debbugs.gnu.org; Sat, 26 Aug 2023 10:27:56 -0400
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:51737)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1qZuGY-0000Vc-Tf
 for 65459 <at> debbugs.gnu.org; Sat, 26 Aug 2023 10:27:55 -0400
Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1])
 by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 5161480641;
 Sat, 26 Aug 2023 10:27:44 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1693060063;
 bh=/GNYDIDVjboUxJ923i+isSYKKqTXdFEMXMRVJQGkMCE=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=XveDisaS14NuchXfZKm2B80Mks4px9qvU08AX9pqxKslBNv/1UN4oHW6LCJ44MwPP
 1PjcyU6q/d8Qq/8tyP0ATb3l5fqBJlUArCvC0lNld5JxFkEGsxB8+MRuKs96mBgNQX
 SyCVe31+SGhRfsiSzhf6lhgpAgS4k9oAoqtWwZUXZhS9xHtCfxFxy1tZp0qM0RS1vz
 rJRFs5ruWAzLXnrNA8lUfXkXEjLl3f1pvknNTs/YllMW7Px00r5ZKsvCkM1MfSaVdq
 AUzMHR7B6UCMxZQWbPyc+HPeJBWFpKKuB9hwVYFxqyNHXcvfef4+xbzCInO40YzEvU
 Slltr8F/sdUZg==
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 16066802CE;
 Sat, 26 Aug 2023 10:27:43 -0400 (EDT)
Received: from pastel (unknown [108.175.234.188])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id DA0781202B5;
 Sat, 26 Aug 2023 10:27:42 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Gregory Heytings <gregory@HIDDEN>
Subject: Re: bug#65459: completing-read INITIAL-VALUE unaware of COLLECTION
 and REQUIRE-MATCH
In-Reply-To: <596919925b4762b66be8@HIDDEN> (Gregory Heytings's message
 of "Sat, 26 Aug 2023 08:10:26 +0000")
Message-ID: <jwvo7itanhr.fsf-monnier+emacs@HIDDEN>
References: <Z37akRtOZpCa8uyj_2oyIonmlmfE70EiqztTtZtYAVk_9eSK7BeC61kXORi4yHKRvkkF1Lnp87hvWQQ4ZnJ4TZr6Txhh3QgW-pfNAD2wSb0=@protonmail.com>
 <b1bTYvprIGDrU8iKzoUE-JcUPusjV8zhTc34hcSS6CksX1VYMyHUTBQPX_XtjjE973BcbpdA8acOLsTUuSNV3ilEwtM9ZaRj25lzp7am7NM=@protonmail.com>
 <jwvedjt78ti.fsf-monnier+emacs@HIDDEN>
 <rv4Y4VumhXlap7W1L1IT0DwtGu2V3slt6UsldQkbBUfrCmj9G4eHMpKcRL6cJBZq33vyPoueD8Cbd1gLOThrx6-W-TusDJjKGvIOYQz4zwI=@protonmail.com>
 <jwv7cpk6070.fsf-monnier+emacs@HIDDEN>
 <ZnU7o5ta2Yj00sCa0fTbOaRW3DCJh4szyru5E8hqOFTUKqhbj6QZThi7DYp9_AfixePN0kajs7RRptmvVNCJ2Ye-XtrSViMJalH9T8KVNwE=@protonmail.com>
 <jwv4jkopfjs.fsf-monnier+emacs@HIDDEN>
 <JsMHuTJuAV744Cq4rlLRlQJOGLQmlCg5ridnbPUtE5FQyLK2SAM--8WEifARy3o_fp6AygWuygHK0_qbgE6D8tSa50Wsnjdv1kqF1ZlEfIs=@protonmail.com>
 <jwvo7iwnthf.fsf-monnier+emacs@HIDDEN>
 <9K_-oO834AqSJEo_pqDrfj7Q1O1vcqy19pPVpFDuVl5tfCjWqlLa8cRgM16uDFBEt63VYEUkj7ueLAZ8XLrfsZAuRPLvU4Mx3von1r73fEE=@protonmail.com>
 <jwvh6oonpm5.fsf-monnier+emacs@HIDDEN>
 <596919925b4762b66be8@HIDDEN>
Date: Sat, 26 Aug 2023 10:27:42 -0400
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 AWL 0.027 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain
 DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from
 domain
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 65459
Cc: 65459 <at> debbugs.gnu.org, Eli Zaretskii <eliz@HIDDEN>,
 Heime <heimeborgia@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

>> I guess we really should work on a replacement for `completing-read`, eh?
> Why should we replace it?  Can't we just add another function, alongside
> completing-read-default and completing-read-multiple, using the short POC
> code I sent as a starting point?

That's what I meant by "replacement" (I'd expect new code to use that new
function instead of the other, so one "replaces" the other).


        Stefan





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#65459; Package emacs. Full text available.

Message received at 65459 <at> debbugs.gnu.org:


Received: (at 65459) by debbugs.gnu.org; 26 Aug 2023 08:10:34 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Aug 26 04:10:34 2023
Received: from localhost ([127.0.0.1]:41705 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qZoNN-0004Gp-O5
	for submit <at> debbugs.gnu.org; Sat, 26 Aug 2023 04:10:33 -0400
Received: from heytings.org ([95.142.160.155]:54480)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <gregory@HIDDEN>) id 1qZoNM-0004Gg-5I
 for 65459 <at> debbugs.gnu.org; Sat, 26 Aug 2023 04:10:32 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org;
 s=20220101; t=1693037426;
 bh=SGgCwrdjFdUScJD7WNz+6zRyLRCMLSPQvEyAtdhOxpM=;
 h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From;
 b=trbCxFMpQFr8WAdCZ4GS4pQ1xtofh2u4b/DqQhbypFaz5tgpaLItBfTLrAf4NxXMV
 89vxeH6R8vKIp1IkyOzk+8hKl8Nf/f1TBa66yMlnLB8DqlgIDUobr1U1+/D2UMzgqT
 l0tOX9ZTdrzrdgssCqrQ8dzoPOXJ6192t6uYz3iiEyS1mYdFKwIaZRnUf1pAgR0N2O
 Ep1QC9xXbWjKc4yPdQyD0mwrgRPNtSthqRwOuLZ/SGbQyr3b0LdDoacBl5IBO5Zspt
 xkHGFXDzbODDDh+b64Pt292ruGq91+vu0Pb93l1v5pLGz5FQCkSZpDr5P8Tn23Ajyj
 +hvowT0Gjg4eQ==
Date: Sat, 26 Aug 2023 08:10:26 +0000
From: Gregory Heytings <gregory@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
Subject: Re: bug#65459: completing-read INITIAL-VALUE unaware of COLLECTION
 and REQUIRE-MATCH
In-Reply-To: <jwvh6oonpm5.fsf-monnier+emacs@HIDDEN>
Message-ID: <596919925b4762b66be8@HIDDEN>
References: <Z37akRtOZpCa8uyj_2oyIonmlmfE70EiqztTtZtYAVk_9eSK7BeC61kXORi4yHKRvkkF1Lnp87hvWQQ4ZnJ4TZr6Txhh3QgW-pfNAD2wSb0=@protonmail.com>
 <b1bTYvprIGDrU8iKzoUE-JcUPusjV8zhTc34hcSS6CksX1VYMyHUTBQPX_XtjjE973BcbpdA8acOLsTUuSNV3ilEwtM9ZaRj25lzp7am7NM=@protonmail.com>
 <jwvedjt78ti.fsf-monnier+emacs@HIDDEN>
 <rv4Y4VumhXlap7W1L1IT0DwtGu2V3slt6UsldQkbBUfrCmj9G4eHMpKcRL6cJBZq33vyPoueD8Cbd1gLOThrx6-W-TusDJjKGvIOYQz4zwI=@protonmail.com>
 <jwv7cpk6070.fsf-monnier+emacs@HIDDEN>
 <ZnU7o5ta2Yj00sCa0fTbOaRW3DCJh4szyru5E8hqOFTUKqhbj6QZThi7DYp9_AfixePN0kajs7RRptmvVNCJ2Ye-XtrSViMJalH9T8KVNwE=@protonmail.com>
 <jwv4jkopfjs.fsf-monnier+emacs@HIDDEN>
 <JsMHuTJuAV744Cq4rlLRlQJOGLQmlCg5ridnbPUtE5FQyLK2SAM--8WEifARy3o_fp6AygWuygHK0_qbgE6D8tSa50Wsnjdv1kqF1ZlEfIs=@protonmail.com>
 <jwvo7iwnthf.fsf-monnier+emacs@HIDDEN>
 <9K_-oO834AqSJEo_pqDrfj7Q1O1vcqy19pPVpFDuVl5tfCjWqlLa8cRgM16uDFBEt63VYEUkj7ueLAZ8XLrfsZAuRPLvU4Mx3von1r73fEE=@protonmail.com>
 <jwvh6oonpm5.fsf-monnier+emacs@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 65459
Cc: 65459 <at> debbugs.gnu.org, Eli Zaretskii <eliz@HIDDEN>,
 Heime <heimeborgia@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)


>
> I guess we really should work on a replacement for `completing-read`, 
> eh?
>

Why should we replace it?  Can't we just add another function, alongside 
completing-read-default and completing-read-multiple, using the short POC 
code I sent as a starting point?





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#65459; Package emacs. Full text available.

Message received at 65459 <at> debbugs.gnu.org:


Received: (at 65459) by debbugs.gnu.org; 26 Aug 2023 08:06:50 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Aug 26 04:06:50 2023
Received: from localhost ([127.0.0.1]:41693 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qZoJl-0004AL-PI
	for submit <at> debbugs.gnu.org; Sat, 26 Aug 2023 04:06:50 -0400
Received: from heytings.org ([95.142.160.155]:54462)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <gregory@HIDDEN>) id 1qZoJi-0004AB-59
 for 65459 <at> debbugs.gnu.org; Sat, 26 Aug 2023 04:06:47 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org;
 s=20220101; t=1693037200;
 bh=OEFA508ChXmMWzd5UorcLU2JEdtAzSae7ekafrPFR0Y=;
 h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From;
 b=tfzru8sT8a2SNIyfr3Th6T2Ku4Qfcb1rFTsLp9kMNaFhYDp7llBu9qR6nCWrbZfEw
 JF5r47iH0bpU4pjeYUc/y4akAMkfm3TEUAfF0N0r6kbHhNhM7/Uxw6UnIQHAKxcghf
 RiCUkkv2FamcK6mI1+YiPPRi87p6vSsybRi1mo9YFZzNKHytSRmfh3OF0rKRi22isv
 JWbGR0pwqyvK0i6CM1V9jb3GdaaekyKOIIDnBdCKEt8TAGbxNaTrb6EPrDeNRcOoFF
 6f4V5AIGoG9zGExG3YRSo74/T/ujgJNlWgvCSOBGaeZYec+u+iUiVzXvOhgJak3ESD
 ltwq6iXspkbOg==
Date: Sat, 26 Aug 2023 08:06:39 +0000
From: Gregory Heytings <gregory@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
Subject: Re: bug#65459: completing-read INITIAL-VALUE unaware of COLLECTION
 and REQUIRE-MATCH
In-Reply-To: <jwv1qfs5zol.fsf-monnier+emacs@HIDDEN>
Message-ID: <596919925b3ff290adc3@HIDDEN>
References: <Z37akRtOZpCa8uyj_2oyIonmlmfE70EiqztTtZtYAVk_9eSK7BeC61kXORi4yHKRvkkF1Lnp87hvWQQ4ZnJ4TZr6Txhh3QgW-pfNAD2wSb0=@protonmail.com>
 <83jztmro8z.fsf@HIDDEN>
 <jVMlYwpHISTfEDJ7n7XwoXWq_e0TEmP6YI5KpgniW2tmVKr3POo7AKrr6-OXPn9bVWAH7XHPALB4dxrtLmZFBix-adNtRfPYZhre6rCE4zg=@protonmail.com>
 <jwvv8d57wdc.fsf-monnier+emacs@HIDDEN>
 <WGPneIBtyarvwY_U4xDeNuwtGXJIGuLxxvX2PFDeFHH01k8NRYg0fuQIEcrnkmGagCNWILPuTDtbh3tc1bqkp5DKdTEPolnkb_AgdJNfVa8=@protonmail.com>
 <jwv4jkpoj61.fsf-monnier+emacs@HIDDEN>
 <fvqSmekfcbFxYmnHMLbj8FTVXP7zY0afjAsxgtCMbZWeyhdTBWYa9g-R9nFxWBwZGeaZtUGJ9xYBIyYhdgAvqmrtY1G9w7dQnt6YAy2gGzs=@protonmail.com>
 <jwv7cpln1o8.fsf-monnier+emacs@HIDDEN>
 <b1bTYvprIGDrU8iKzoUE-JcUPusjV8zhTc34hcSS6CksX1VYMyHUTBQPX_XtjjE973BcbpdA8acOLsTUuSNV3ilEwtM9ZaRj25lzp7am7NM=@protonmail.com>
 <jwvedjt78ti.fsf-monnier+emacs@HIDDEN> <b63c3fe53037b9c4d8e8@HIDDEN>
 <jwvjztl5g5v.fsf-monnier+emacs@HIDDEN> <bb9dca5367728509e290@HIDDEN>
 <jwv1qfs5zol.fsf-monnier+emacs@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 65459
Cc: 65459 <at> debbugs.gnu.org, Eli Zaretskii <eliz@HIDDEN>,
 Heime <heimeborgia@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)


>
> The issue is not "don't use `(n)advice.el`", but "don't modify functions 
> on the sly".  And by "functions" this refers to those things stored in 
> the `symbol-function` slot of symbols in the global obarray.  This is 
> because code that does `(my-foo ...)` usually expects to execute the 
> code found in `(defun my-foo ...)` and not something else, and readers 
> of that code often make the same assumption, so it can make debugging 
> really nasty.
>
> Changing a function with `fset` (or `cl-letf` or `defalias`) is worse 
> than using `advice-add`, for that reason: at least `advice-add` sets up 
> the help system such that `C-h f` will (hopefully) warn you about the 
> presence of an advice.
>
> For variables containing functions (such as 
> `minibuffer-default-add-function`), there is no such expectation that 
> calling this function will run some known piece of code, on the 
> contrary: the whole point of the variable is to run difference pieces of 
> code in different contexts, so modifying the function is perfectly OK, 
> regardless whether you do it with `setq` or `add-function`.  Here I'd 
> use `add-function` because it's simpler.
>

Thanks, that clarifies that question!  Perhaps a paragraph along those 
lines could be added to "(elisp)Advising Functions"?





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#65459; Package emacs. Full text available.

Message received at 65459 <at> debbugs.gnu.org:


Received: (at 65459) by debbugs.gnu.org; 25 Aug 2023 07:19:54 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Aug 25 03:19:54 2023
Received: from localhost ([127.0.0.1]:39117 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qZR6o-0004nT-91
	for submit <at> debbugs.gnu.org; Fri, 25 Aug 2023 03:19:54 -0400
Received: from relay4-d.mail.gandi.net ([2001:4b98:dc4:8::224]:59475)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1qZR6m-0004nD-9x
 for 65459 <at> debbugs.gnu.org; Fri, 25 Aug 2023 03:19:53 -0400
Received: by mail.gandi.net (Postfix) with ESMTPSA id AE389E0006;
 Fri, 25 Aug 2023 07:19:38 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Heime <heimeborgia@HIDDEN>
Subject: Re: bug#65459: completing-read INITIAL-VALUE unaware of COLLECTION
 and REQUIRE-MATCH
In-Reply-To: <VnRd4h82UO6YcSGqnBk0S8jCfU3VDSbfknV59GoaRMY-PPXF6zvbNInQav7FDirFwCmfE8rHuiR1QTGdqjwRRn-sWlVvVFAQTmm-yY_dntQ=@protonmail.com>
 (Heime via's message of "Thu, 24 Aug 2023 13:19:55 +0000")
Organization: LINKOV.NET
References: <Z37akRtOZpCa8uyj_2oyIonmlmfE70EiqztTtZtYAVk_9eSK7BeC61kXORi4yHKRvkkF1Lnp87hvWQQ4ZnJ4TZr6Txhh3QgW-pfNAD2wSb0=@protonmail.com>
 <jwv4jkpoj61.fsf-monnier+emacs@HIDDEN>
 <fvqSmekfcbFxYmnHMLbj8FTVXP7zY0afjAsxgtCMbZWeyhdTBWYa9g-R9nFxWBwZGeaZtUGJ9xYBIyYhdgAvqmrtY1G9w7dQnt6YAy2gGzs=@protonmail.com>
 <jwv7cpln1o8.fsf-monnier+emacs@HIDDEN>
 <b1bTYvprIGDrU8iKzoUE-JcUPusjV8zhTc34hcSS6CksX1VYMyHUTBQPX_XtjjE973BcbpdA8acOLsTUuSNV3ilEwtM9ZaRj25lzp7am7NM=@protonmail.com>
 <jwvedjt78ti.fsf-monnier+emacs@HIDDEN>
 <b63c3fe53037b9c4d8e8@HIDDEN>
 <jwvjztl5g5v.fsf-monnier+emacs@HIDDEN>
 <bb9dca5367728509e290@HIDDEN>
 <VnRd4h82UO6YcSGqnBk0S8jCfU3VDSbfknV59GoaRMY-PPXF6zvbNInQav7FDirFwCmfE8rHuiR1QTGdqjwRRn-sWlVvVFAQTmm-yY_dntQ=@protonmail.com>
Date: Fri, 25 Aug 2023 09:59:56 +0300
Message-ID: <86r0nrvc7n.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-GND-Sasl: juri@HIDDEN
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 65459
Cc: Gregory Heytings <gregory@HIDDEN>, 65459 <at> debbugs.gnu.org,
 Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

>> Heime, can you try that and tell us if it solves your problem?
>
> The behaviour is as it should be.  Although we should keep 'start' to correspond to
> collection index which customarily starts from value 0.
>
> Although I can use the function provided, I rather have all this incorporated in
> 'completing-read'.  Because 'completing-read' would benefit from it.  Particularly
> now that its use is being extended.  This taking into account that my use case
> is more aligned with its original operation, except that certain aspects which I have
> shown to be important were not recognised at the time.  After some focused attention,
> Stefan concurred how I have been making sense, particularly after seeing how `completing-read`
> actually behaves during the form of cycling I discussed at some length.

Why couldn't you explicitly provide a list of default values
without the initial value?  This solves your problem:

  (let ((cseq '("alpha" "beta" "gamma" "delta" "epsilon" "zeta" "eta")))
    (completing-read "Grapheme: " cseq nil t "alpha" nil (cdr cseq)))

PS: Currently this can't be done automatically because 'completing-read-default'
doesn't set a buffer-local 'minibuffer-initial-input' from its argument
'initial-input'.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#65459; Package emacs. Full text available.

Message received at 65459 <at> debbugs.gnu.org:


Received: (at 65459) by debbugs.gnu.org; 24 Aug 2023 21:45:49 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Aug 24 17:45:49 2023
Received: from localhost ([127.0.0.1]:38780 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qZI9E-0005g4-PR
	for submit <at> debbugs.gnu.org; Thu, 24 Aug 2023 17:45:49 -0400
Received: from mail-40135.protonmail.ch ([185.70.40.135]:42861)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <heimeborgia@HIDDEN>) id 1qZI9C-0005fm-Aw
 for 65459 <at> debbugs.gnu.org; Thu, 24 Aug 2023 17:45:47 -0400
Date: Thu, 24 Aug 2023 21:45:13 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com;
 s=protonmail3; t=1692913535; x=1693172735;
 bh=7wOQIS2u5Q8JJ4S/eoJ24kwaZ3ET4sWL4Lt1a4N3Bko=;
 h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References:
 Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID:
 Message-ID:BIMI-Selector;
 b=AIx5k7VL1YTV94Ni/p9Qk8SkWK2nF9Ti5VKxxww/4mR2m2ed4v2Im3zu8hh2tbFhs
 soHnhg6LGRu7HY38vwhZsXSMiEd1KBTm09H2aFO1B6QuQwT7DUkhf0wzN9H7rNRSsu
 6PKZcgBbvOOtbtJSMjTqsXHG15ddw8XwIGLCEXfFBVE7stV1f78skF3DHOVxVj7KzM
 KrTpJ5mNFoixaPY4G0qD3BH3YxZ87+IDGrI1gXEatd8wtarV8Ec6+SJXb5uxbQ655m
 QMSvDLZTs50OmBOosqWzArmO/evNt7+H8wRvZ0PmsckB/V1zmVSMnuzSFVa17tCTvP
 UsoDmDsTbu5Ug==
To: Stefan Monnier <monnier@HIDDEN>
From: Heime <heimeborgia@HIDDEN>
Subject: Re: bug#65459: completing-read INITIAL-VALUE unaware of COLLECTION
 and REQUIRE-MATCH
Message-ID: <NH7WSL98VuVhT01YPvHBmORrvkYUh8gwdMSlJJyYlMJLr_pCtePAocmflbebgW7XmRPiYigDGFlRqd34EbxcvuvRMBehnW1JWm_V6DX3zq8=@protonmail.com>
In-Reply-To: <jwvh6oonpm5.fsf-monnier+emacs@HIDDEN>
References: <Z37akRtOZpCa8uyj_2oyIonmlmfE70EiqztTtZtYAVk_9eSK7BeC61kXORi4yHKRvkkF1Lnp87hvWQQ4ZnJ4TZr6Txhh3QgW-pfNAD2wSb0=@protonmail.com>
 <rv4Y4VumhXlap7W1L1IT0DwtGu2V3slt6UsldQkbBUfrCmj9G4eHMpKcRL6cJBZq33vyPoueD8Cbd1gLOThrx6-W-TusDJjKGvIOYQz4zwI=@protonmail.com>
 <jwv7cpk6070.fsf-monnier+emacs@HIDDEN>
 <ZnU7o5ta2Yj00sCa0fTbOaRW3DCJh4szyru5E8hqOFTUKqhbj6QZThi7DYp9_AfixePN0kajs7RRptmvVNCJ2Ye-XtrSViMJalH9T8KVNwE=@protonmail.com>
 <jwv4jkopfjs.fsf-monnier+emacs@HIDDEN>
 <JsMHuTJuAV744Cq4rlLRlQJOGLQmlCg5ridnbPUtE5FQyLK2SAM--8WEifARy3o_fp6AygWuygHK0_qbgE6D8tSa50Wsnjdv1kqF1ZlEfIs=@protonmail.com>
 <jwvo7iwnthf.fsf-monnier+emacs@HIDDEN>
 <9K_-oO834AqSJEo_pqDrfj7Q1O1vcqy19pPVpFDuVl5tfCjWqlLa8cRgM16uDFBEt63VYEUkj7ueLAZ8XLrfsZAuRPLvU4Mx3von1r73fEE=@protonmail.com>
 <jwvh6oonpm5.fsf-monnier+emacs@HIDDEN>
Feedback-ID: 57735886:user:proton
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 65459
Cc: Eli Zaretskii <eliz@HIDDEN>, 65459 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)






Sent with Proton Mail secure email.

------- Original Message -------
On Friday, August 25th, 2023 at 9:02 AM, Stefan Monnier <monnier@HIDDEN=
eal.ca> wrote:


> > > Using the DEFault arg gives you the same benefit without prefilling t=
he
> > > minibuffer, so I must be missing something. What would be the advanta=
ge
> > > for the users by prefilling the minibuffer with "Chronological Dating=
"?
> > > Yes, without prefilling the minibuffer. Prefilling the minibuffer is
> > > quicker for users, giving them the possibility to see the current
> > > stage if they forget default key shortcuts.
>=20
>=20
> The `format-prompt` thingy in my example code is there to show to the
> users what the default will be.
>=20
> > The more we discuss this the more it seems the prefilling
> > the minbuffer was something we never wanted users to have.
>=20
>=20
> Indeed, it was never intended for regular use. It's only meant to be
> used in specific cases like `read-file-name` where we do have something
> to prefill that is almost always useful.
>=20
> [ You used the term "dogma" earlier, but I like to think of Emacs
> design as being rather undogmatic in that we go through a lot of
> trouble to allow people to do even those things that we don't want
> them to do. ]
>=20
> > > > > So, IIUC, you have a `completing-read` call asking them which tem=
plate
> > > > > to insert, and you want to order the set of completions based on
> > > > > knowledge of the stage at which they are?
> > > > > No ordering actually happens, a particular element in collection =
is used
> > > > > to prefill the minibuffer entry and consecutive elements in simpl=
e
> > > > > cycling continue through the next stages.
> > >=20
> > > Yes, the ordering I'm talking about is the order in the operational
> > > flow refined such that if the likely next stage is "Composition and
> > > Provenance", then you'll want to use:
> > >=20
> > > "Composition and Provenance" "Isotope Analysis" "Physical Analysis" "=
Chronological Dating"
> > >=20
> > > That's what you want, right?
> >=20
> > Correct, but the actual collection might still be
> >=20
> > "Physical_Analysis" "Chronological Dating" "Composition and Provenance"=
 "Isotope Analysis"
> >=20
> > Rather than applying modifications to it, I can just specify the start =
index.
>=20
>=20
> That's an implementation detail.
>=20
> E.g. you can use
>=20
> (defconst my-phases
> '("Physical_Analysis" "Chronological Dating" "Composition and Provenance"=
 "Isotope Analysis"))
>=20
> (defun my-rotate (collection first)
> (let ((x (member first collection)))
> (if (not x) collection
> (let ((idx (- (length collection) (length x))))
> (append x (seq-take collection idx))))))
>=20
> [...]
> (let ((next-phase (my-guess-next-phase)))
> (completing-read (format-prompt "Phase" next-phase)
> (my-rotate my-phases next-phase)
> nil t nil nil next-phase))
> [...]
>=20
> > > You mean, if they use, say, `icomplete-mode` or `vertico-mode`, you'd
> > > prefer that those UIs use an alphabetical ordering rather than the on=
e
> > > based on operational flow?
> >=20
> > I would think that if they use vertico, there is a reason that is conve=
nient
> > to them to use cempletion, if they are not employing simple cycling (th=
rough
> > repeated use of <down>).
>=20
>=20
> Both `icomplete-mode` and `vertico-mode` offer/encourage the use of
> cycling (but their cycling code is completely different from the one
> you're using so it doesn't obey `next-history-element`), so I expect
> their users would also appreciate if the ordering of the completions is
> chosen with the same care as what you do for the
> `next-line-or-history-element` case.
>=20
> > Quite right, and help programmers from the need to go as low level as
> > calling 'minibuffer-with-setup-hook' hacks. The unfortunate thing is th=
at
> > the inclusion of INITIAL makes people want to use it, as I did in certa=
in
> > circumstances. Having to go through 'minibuffer-with-setup-hook' hacks
> > is not something one looks forward to do in the interactive clause of a
> > function.
>=20
>=20
> +1
>=20
> I guess we really should work on a replacement for `completing-read`, eh?=
 - Stefan

If we want to surpass the present conundrum, the path in clear.  completing=
-read has evolved
through incremental changes without considering the long-term implications.=
  And we continue
to accumulate additional parameters, flags, and branches to accommodate new=
 functionalities.=20
This has led to a serious lack of cohesion and a convoluted structure.  Mak=
ing it difficult
to discern its primary purpose.  I have concluded that its evolution today =
requires it acquire
dependencies on other parts of its codebase.  Instead, we have started chan=
ging the documentation
to discourage this usage, that usage, and so on.  For short-term one can ac=
cept it, but robust design
is needed for long-term usage. =20

FREDDY - Ahl. Would you mind telling me whose brain I put in?
IGOR - And you won't be angry?
FREDDY - I won't be angry.
IGOR - Abbey someone.
FREDDY - Abbey?? Abbey who?
IGOR - Abbey normal.
FREDDY - ABBEYNORMAL???
IGOR - I'm almost sure that was the name.

FREDDY grabbing Igor's throat

I put -- an abnormal brain -- into a seven-and-a-half
foot long, fourty-four inch wide GORILLA?







Information forwarded to bug-gnu-emacs@HIDDEN:
bug#65459; Package emacs. Full text available.

Message received at 65459 <at> debbugs.gnu.org:


Received: (at 65459) by debbugs.gnu.org; 24 Aug 2023 21:03:43 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Aug 24 17:03:43 2023
Received: from localhost ([127.0.0.1]:38741 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qZHUU-0004XW-MR
	for submit <at> debbugs.gnu.org; Thu, 24 Aug 2023 17:03:43 -0400
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:2336)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1qZHUT-0004XI-1p
 for 65459 <at> debbugs.gnu.org; Thu, 24 Aug 2023 17:03:42 -0400
Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1])
 by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 366AB1000E5;
 Thu, 24 Aug 2023 17:03:31 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1692911009;
 bh=qg4CXiX8FqHot8UvXbZq/uLCGFulqAdFtrhQ6bBjSQM=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=ii/peNdtu2aztoBJcv430imEVmoRXszZIt7VILw614RIeHO+USa3hL321i/I5dSXH
 JuC5MOtbJchQpwHgyPsryFYr9QQdnIJUR3OXQq3inOV8ULX5kHPqy3Qmfe8g0O1stx
 MHT29+6gUvMz/wiX4mpwj3PS+l3e6TrYmDwxL1g9WLm7KNhJGJuA2Au9NUcf7eS4SU
 jLE9/y+nq4fzRrTD1GydDc7ZHYoUUjjil+S1wuOB1+AeSdc+aPRnob2p05BIiJYS20
 39UEiPXZbtI1TMxr0efqombHmFnI3NOy22nSG9KpuFzdBVmkTW7kOcYxVqB768lI5F
 6JpSJOly1cVtA==
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id C426F100033;
 Thu, 24 Aug 2023 17:03:29 -0400 (EDT)
Received: from lechazo (lechon.iro.umontreal.ca [132.204.27.242])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id B0F131202BC;
 Thu, 24 Aug 2023 17:03:29 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Heime <heimeborgia@HIDDEN>
Subject: Re: bug#65459: completing-read INITIAL-VALUE unaware of COLLECTION
 and REQUIRE-MATCH
In-Reply-To: <9K_-oO834AqSJEo_pqDrfj7Q1O1vcqy19pPVpFDuVl5tfCjWqlLa8cRgM16uDFBEt63VYEUkj7ueLAZ8XLrfsZAuRPLvU4Mx3von1r73fEE=@protonmail.com>
 (Heime's message of "Thu, 24 Aug 2023 20:22:45 +0000")
Message-ID: <jwvh6oonpm5.fsf-monnier+emacs@HIDDEN>
References: <Z37akRtOZpCa8uyj_2oyIonmlmfE70EiqztTtZtYAVk_9eSK7BeC61kXORi4yHKRvkkF1Lnp87hvWQQ4ZnJ4TZr6Txhh3QgW-pfNAD2wSb0=@protonmail.com>
 <b1bTYvprIGDrU8iKzoUE-JcUPusjV8zhTc34hcSS6CksX1VYMyHUTBQPX_XtjjE973BcbpdA8acOLsTUuSNV3ilEwtM9ZaRj25lzp7am7NM=@protonmail.com>
 <jwvedjt78ti.fsf-monnier+emacs@HIDDEN>
 <rv4Y4VumhXlap7W1L1IT0DwtGu2V3slt6UsldQkbBUfrCmj9G4eHMpKcRL6cJBZq33vyPoueD8Cbd1gLOThrx6-W-TusDJjKGvIOYQz4zwI=@protonmail.com>
 <jwv7cpk6070.fsf-monnier+emacs@HIDDEN>
 <ZnU7o5ta2Yj00sCa0fTbOaRW3DCJh4szyru5E8hqOFTUKqhbj6QZThi7DYp9_AfixePN0kajs7RRptmvVNCJ2Ye-XtrSViMJalH9T8KVNwE=@protonmail.com>
 <jwv4jkopfjs.fsf-monnier+emacs@HIDDEN>
 <JsMHuTJuAV744Cq4rlLRlQJOGLQmlCg5ridnbPUtE5FQyLK2SAM--8WEifARy3o_fp6AygWuygHK0_qbgE6D8tSa50Wsnjdv1kqF1ZlEfIs=@protonmail.com>
 <jwvo7iwnthf.fsf-monnier+emacs@HIDDEN>
 <9K_-oO834AqSJEo_pqDrfj7Q1O1vcqy19pPVpFDuVl5tfCjWqlLa8cRgM16uDFBEt63VYEUkj7ueLAZ8XLrfsZAuRPLvU4Mx3von1r73fEE=@protonmail.com>
Date: Thu, 24 Aug 2023 17:02:47 -0400
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 AWL 0.072 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain
 DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from
 domain
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 65459
Cc: Eli Zaretskii <eliz@HIDDEN>, 65459 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

>> Using the DEFault arg gives you the same benefit without prefilling the
>> minibuffer, so I must be missing something. What would be the advantage
>> for the users by prefilling the minibuffer with "Chronological Dating"?
> Yes, without prefilling the minibuffer.  Prefilling the minibuffer is
> quicker for users, giving them the possibility to see the current
> stage if they forget  default key shortcuts.

The `format-prompt` thingy in my example code is there to show to the
users what the default will be.

> The more we discuss this the more it seems the prefilling
> the minbuffer was something we never wanted users to have.

Indeed, it was never intended for regular use.  It's only meant to be
used in specific cases like `read-file-name` where we do have something
to prefill that is almost always useful.

[ You used the term "dogma" earlier, but I like to think of Emacs
  design as being rather undogmatic in that we go through a lot of
  trouble to allow people to do even those things that we don't want
  them to do.  ]

>> > > So, IIUC, you have a `completing-read` call asking them which template
>> > > to insert, and you want to order the set of completions based on
>> > > knowledge of the stage at which they are?
>> > > No ordering actually happens, a particular element in collection is used
>> > > to prefill the minibuffer entry and consecutive elements in simple
>> > > cycling continue through the next stages.
>> 
>> 
>> Yes, the ordering I'm talking about is the order in the operational
>> flow refined such that if the likely next stage is "Composition and
>> Provenance", then you'll want to use:
>> 
>> "Composition and Provenance" "Isotope Analysis" "Physical Analysis" "Chronological Dating"
>> 
>> That's what you want, right?
>
> Correct, but the actual collection might still be 
>
> "Physical_Analysis" "Chronological Dating" "Composition and Provenance" "Isotope Analysis"
>
> Rather than applying modifications to it, I can just specify the start index.

That's an implementation detail.

E.g. you can use

    (defconst my-phases
      '("Physical_Analysis" "Chronological Dating" "Composition and Provenance" "Isotope Analysis"))

    (defun my-rotate (collection first)
      (let ((x (member first collection)))
        (if (not x) collection
          (let ((idx (- (length collection) (length x))))
            (append x (seq-take collection idx))))))

     [...]
     (let ((next-phase (my-guess-next-phase)))
       (completing-read (format-prompt "Phase" next-phase)
                        (my-rotate my-phases next-phase)
                        nil t nil nil next-phase))
     [...]

>> You mean, if they use, say, `icomplete-mode` or `vertico-mode`, you'd
>> prefer that those UIs use an alphabetical ordering rather than the one
>> based on operational flow?
>
> I would think that if they use vertico, there is a reason that is convenient
> to them to use cempletion, if they are not employing simple cycling (through
> repeated use of <down>). 

Both `icomplete-mode` and `vertico-mode` offer/encourage the use of
cycling (but their cycling code is completely different from the one
you're using so it doesn't obey `next-history-element`), so I expect
their users would also appreciate if the ordering of the completions is
chosen with the same care as what you do for the
`next-line-or-history-element` case.

> Quite right, and help programmers from the need to go as low level as
> calling 'minibuffer-with-setup-hook' hacks.  The unfortunate thing is that
> the inclusion of INITIAL makes people want to use it, as I did in certain
> circumstances.   Having to go through 'minibuffer-with-setup-hook' hacks
> is not something one looks forward to do in the interactive clause of a
> function.

+1

I guess we really should work on a replacement for `completing-read`, eh?


        Stefan





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#65459; Package emacs. Full text available.

Message received at 65459 <at> debbugs.gnu.org:


Received: (at 65459) by debbugs.gnu.org; 24 Aug 2023 20:23:12 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Aug 24 16:23:12 2023
Received: from localhost ([127.0.0.1]:38687 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qZGrI-0000lG-8U
	for submit <at> debbugs.gnu.org; Thu, 24 Aug 2023 16:23:12 -0400
Received: from mail-40137.protonmail.ch ([185.70.40.137]:42257)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <heimeborgia@HIDDEN>) id 1qZGrG-0000kj-97
 for 65459 <at> debbugs.gnu.org; Thu, 24 Aug 2023 16:23:11 -0400
Date: Thu, 24 Aug 2023 20:22:45 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com;
 s=protonmail3; t=1692908579; x=1693167779;
 bh=kDRa6QGgE2tdpQ2uu/8wT0UbyO7mcFQqp1PlLrsfS2U=;
 h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References:
 Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID:
 Message-ID:BIMI-Selector;
 b=M3toiusl/84+5gb+Wnp+aKckGDiL4FBEUxutGXUP0pl+8HaDsKCiPzuengE4q/cME
 Ea11IyYJelKhOfcQOhhLMcLTkIAa/xsU0VFJ9P+2xvBV1oT77M2D4FZ7m6zjJQfK/C
 TEDTT7HYJFpK1jFwZnla++JfzmkYY/9xa39k3e1rD5xYqoDuNlp1plYHzwQpcoD28X
 APKg8qUzTGF9UxbDJTQ/DKzAY2c9ZS4jrRievAmRFa3i9JGLVEWXa/kQfzmbx8b6Ni
 BQbw951gwFOqHsiAfjeXr0SeL+/7+/Lxpr/XI8MGJdqkOoix+Ahf6Ex2hQtx9OVh1I
 VtypiwHX25GUQ==
To: Stefan Monnier <monnier@HIDDEN>
From: Heime <heimeborgia@HIDDEN>
Subject: Re: bug#65459: completing-read INITIAL-VALUE unaware of COLLECTION
 and REQUIRE-MATCH
Message-ID: <9K_-oO834AqSJEo_pqDrfj7Q1O1vcqy19pPVpFDuVl5tfCjWqlLa8cRgM16uDFBEt63VYEUkj7ueLAZ8XLrfsZAuRPLvU4Mx3von1r73fEE=@protonmail.com>
In-Reply-To: <jwvo7iwnthf.fsf-monnier+emacs@HIDDEN>
References: <Z37akRtOZpCa8uyj_2oyIonmlmfE70EiqztTtZtYAVk_9eSK7BeC61kXORi4yHKRvkkF1Lnp87hvWQQ4ZnJ4TZr6Txhh3QgW-pfNAD2wSb0=@protonmail.com>
 <b1bTYvprIGDrU8iKzoUE-JcUPusjV8zhTc34hcSS6CksX1VYMyHUTBQPX_XtjjE973BcbpdA8acOLsTUuSNV3ilEwtM9ZaRj25lzp7am7NM=@protonmail.com>
 <jwvedjt78ti.fsf-monnier+emacs@HIDDEN>
 <rv4Y4VumhXlap7W1L1IT0DwtGu2V3slt6UsldQkbBUfrCmj9G4eHMpKcRL6cJBZq33vyPoueD8Cbd1gLOThrx6-W-TusDJjKGvIOYQz4zwI=@protonmail.com>
 <jwv7cpk6070.fsf-monnier+emacs@HIDDEN>
 <ZnU7o5ta2Yj00sCa0fTbOaRW3DCJh4szyru5E8hqOFTUKqhbj6QZThi7DYp9_AfixePN0kajs7RRptmvVNCJ2Ye-XtrSViMJalH9T8KVNwE=@protonmail.com>
 <jwv4jkopfjs.fsf-monnier+emacs@HIDDEN>
 <JsMHuTJuAV744Cq4rlLRlQJOGLQmlCg5ridnbPUtE5FQyLK2SAM--8WEifARy3o_fp6AygWuygHK0_qbgE6D8tSa50Wsnjdv1kqF1ZlEfIs=@protonmail.com>
 <jwvo7iwnthf.fsf-monnier+emacs@HIDDEN>
Feedback-ID: 57735886:user:proton
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 65459
Cc: Eli Zaretskii <eliz@HIDDEN>, 65459 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)


------- Original Message -------
On Friday, August 25th, 2023 at 7:35 AM, Stefan Monnier <monnier@HIDDEN=
eal.ca> wrote:

> > > My question is not about INITIAL-INPUT but about the behavior that th=
e
> > > user sees: why do you want the users of your code to see a minibuffer
> > > that is prefilled rather than one whose content is initially empty?
> >=20
> > I was planning something like for 'read-file-name' where one can expect
> > that the initial input will very likely be the part the user will end u=
p
> > typing,
>=20
>=20
> You mean if the users will probably select "Chronological Dating",
> you want to prefill the buffer so they don't need to type it and just
> hit RET?

Correct.
=20
> Using the DEFault arg gives you the same benefit without prefilling the
> minibuffer, so I must be missing something. What would be the advantage
> for the users by prefilling the minibuffer with "Chronological Dating"?

Yes, without prefilling the minibuffer.  Prefilling the minibuffer is quick=
er
for users, giving them the possibility to see the current stage if they for=
get=20
default key shortcuts.  The more we discuss this the more it seems the pref=
illing
the minbuffer was something we never wanted users to have.=20

> > > So, IIUC, you have a `completing-read` call asking them which templat=
e
> > > to insert, and you want to order the set of completions based on
> > > knowledge of the stage at which they are?
> > > No ordering actually happens, a particular element in collection is u=
sed
> > > to prefill the minibuffer entry and consecutive elements in simple
> > > cycling continue through the next stages.
>=20
>=20
> Yes, the ordering I'm talking about is the order in the operational
> flow refined such that if the likely next stage is "Composition and
> Provenance", then you'll want to use:
>=20
> "Composition and Provenance" "Isotope Analysis" "Physical Analysis" "Chro=
nological Dating"
>=20
> That's what you want, right?

Correct, but the actual collection might still be=20

"Physical_Analysis" "Chronological Dating" "Composition and Provenance" "Is=
otope Analysis"

Rather than applying modifications to it, I can just specify the start inde=
x.
=20
> > > I suspect you'll want to use a COLLECTION that explicitly asks to not=
 be
> > > (re)sorted and which you "manually" re-order before the call, so that
> > > the sort order you choose is obeyed not just by this specific cycling
> > > you're using but also for users who rely on different UIs.
> > > Actually, tho order is only obeyed for the specific cycling I am usin=
g, but
> > > users have the possibility to use a different UI such as the usual ma=
nipulation
> > > possibilities provided by completing read.
>=20
>=20
> You mean, if they use, say, `icomplete-mode` or `vertico-mode`, you'd
> prefer that those UIs use an alphabetical ordering rather than the one
> based on operational flow?

I would think that if they use vertico, there is a reason that is convenien=
t
to them to use cempletion, if they are not employing simple cycling (throug=
h
repeated use of <down>).=20
=20
> > > I don't see any part there that explains why the minibuffer needs to =
be
> > > prefilled, but that is usually handled separately from the
> > > completions anyway. - Stefan
> > > Then my conclusion is that the introduction of INITIAL for 'completin=
g-read'
> > > was a mistake. That completing-read should only be about completion. =
And that
> > > prefilling the minibuffer should involve a separate function call.
>=20
>=20
> FWIW, I tend to agree and if(?) we introduce a new API I'd replace this
> INITIAL-INPUT argument with a function which could then do what we
> usually do via the `minibuffer-with-setup-hook` hack.  - Stefan

Quite right, and help programmers from the need to go as low level as=20
calling 'minibuffer-with-setup-hook' hacks.  The unfortunate thing is that
the inclusion of INITIAL makes people want to use it, as I did in certain=
=20
circumstances.   Having to go through 'minibuffer-with-setup-hook' hacks
is not something one looks forward to do in the interactive clause of a=20
function.






Information forwarded to bug-gnu-emacs@HIDDEN:
bug#65459; Package emacs. Full text available.

Message received at 65459 <at> debbugs.gnu.org:


Received: (at 65459) by debbugs.gnu.org; 24 Aug 2023 19:36:48 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Aug 24 15:36:48 2023
Received: from localhost ([127.0.0.1]:38657 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qZG8N-0007xI-KT
	for submit <at> debbugs.gnu.org; Thu, 24 Aug 2023 15:36:47 -0400
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:49850)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1qZG8L-0007x2-1F
 for 65459 <at> debbugs.gnu.org; Thu, 24 Aug 2023 15:36:45 -0400
Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1])
 by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 5E0CB442D8F;
 Thu, 24 Aug 2023 15:36:35 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1692905789;
 bh=p9P/wiG3KQ7FUBqzrAqaDvBS6qyb9eJcXJsUwYvPt00=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=n3YmcTUSHf6iP1j0iO8bqHFbnutNX/C6QMljZekgCrUcNamRTx2IvWnXtu2JkQomL
 Oqq1jtC2Ugk9oo6L2KQRw9aqIdZjuL8SnxNmw1zm8ZVTTnOJD01rety2VArLWu7P7S
 F9Gr4y1rH4MFnfOaNsoU3QPGZcYA9WvetU8ajGr4ySrZOqrsSzM0O9uAg2oQrjjLKL
 Q7qKcVPZrKxBLWsme/dneB81eG5dhkLkE4HojMy6c4DTs8iardiCZ6+50sUamL3S7Q
 sQapOjxdPQ4plXHqZ0Xh9UYaWFsdbFOVNOH/XBT4vrtUsHIlDlTD9/i8XrQ8RybtQV
 Y4jeeasGfQdEQ==
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 5E5CA442D8D;
 Thu, 24 Aug 2023 15:36:29 -0400 (EDT)
Received: from lechazo (lechon.iro.umontreal.ca [132.204.27.242])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 4D61B1201B3;
 Thu, 24 Aug 2023 15:36:29 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Heime <heimeborgia@HIDDEN>
Subject: Re: bug#65459: completing-read INITIAL-VALUE unaware of COLLECTION
 and REQUIRE-MATCH
In-Reply-To: <JsMHuTJuAV744Cq4rlLRlQJOGLQmlCg5ridnbPUtE5FQyLK2SAM--8WEifARy3o_fp6AygWuygHK0_qbgE6D8tSa50Wsnjdv1kqF1ZlEfIs=@protonmail.com>
 (Heime's message of "Thu, 24 Aug 2023 18:50:44 +0000")
Message-ID: <jwvo7iwnthf.fsf-monnier+emacs@HIDDEN>
References: <Z37akRtOZpCa8uyj_2oyIonmlmfE70EiqztTtZtYAVk_9eSK7BeC61kXORi4yHKRvkkF1Lnp87hvWQQ4ZnJ4TZr6Txhh3QgW-pfNAD2wSb0=@protonmail.com>
 <fvqSmekfcbFxYmnHMLbj8FTVXP7zY0afjAsxgtCMbZWeyhdTBWYa9g-R9nFxWBwZGeaZtUGJ9xYBIyYhdgAvqmrtY1G9w7dQnt6YAy2gGzs=@protonmail.com>
 <jwv7cpln1o8.fsf-monnier+emacs@HIDDEN>
 <b1bTYvprIGDrU8iKzoUE-JcUPusjV8zhTc34hcSS6CksX1VYMyHUTBQPX_XtjjE973BcbpdA8acOLsTUuSNV3ilEwtM9ZaRj25lzp7am7NM=@protonmail.com>
 <jwvedjt78ti.fsf-monnier+emacs@HIDDEN>
 <rv4Y4VumhXlap7W1L1IT0DwtGu2V3slt6UsldQkbBUfrCmj9G4eHMpKcRL6cJBZq33vyPoueD8Cbd1gLOThrx6-W-TusDJjKGvIOYQz4zwI=@protonmail.com>
 <jwv7cpk6070.fsf-monnier+emacs@HIDDEN>
 <ZnU7o5ta2Yj00sCa0fTbOaRW3DCJh4szyru5E8hqOFTUKqhbj6QZThi7DYp9_AfixePN0kajs7RRptmvVNCJ2Ye-XtrSViMJalH9T8KVNwE=@protonmail.com>
 <jwv4jkopfjs.fsf-monnier+emacs@HIDDEN>
 <JsMHuTJuAV744Cq4rlLRlQJOGLQmlCg5ridnbPUtE5FQyLK2SAM--8WEifARy3o_fp6AygWuygHK0_qbgE6D8tSa50Wsnjdv1kqF1ZlEfIs=@protonmail.com>
Date: Thu, 24 Aug 2023 15:35:46 -0400
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 AWL 0.118 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain
 DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from
 domain
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 65459
Cc: Eli Zaretskii <eliz@HIDDEN>, 65459 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

>> My question is not about INITIAL-INPUT but about the behavior that the
>> user sees: why do you want the users of your code to see a minibuffer
>> that is prefilled rather than one whose content is initially empty?
>
> I was planning something like for 'read-file-name' where one can expect 
> that the initial input will very likely be the part the user will end up
> typing,

You mean if the users will probably select "Chronological Dating",
you want to prefill the buffer so they don't need to type it and just
hit RET?

Using the DEFault arg gives you the same benefit without prefilling the
minibuffer, so I must be missing something.  What would be the advantage
for the users by prefilling the minibuffer with "Chronological Dating"?

>> So, IIUC, you have a `completing-read` call asking them which template
>> to insert, and you want to order the set of completions based on
>> knowledge of the stage at which they are?
> No ordering actually happens, a particular element in collection is used
> to prefill the minibuffer entry and consecutive elements in simple 
> cycling continue through the next stages.

Yes, the ordering I'm talking about is the order in the operational
flow refined such that if the likely next stage is "Composition and
Provenance", then you'll want to use:

    "Composition and Provenance" "Isotope Analysis" "Physical Analysis" "Chronological Dating"

That's what you want, right?

>> I suspect you'll want to use a COLLECTION that explicitly asks to not be
>> (re)sorted and which you "manually" re-order before the call, so that
>> the sort order you choose is obeyed not just by this specific cycling
>> you're using but also for users who rely on different UIs.
> Actually, tho order is only obeyed for the specific cycling I am using, but
> users have the possibility to use a different UI such as the usual manipulation
> possibilities provided by completing read.

You mean, if they use, say, `icomplete-mode` or `vertico-mode`, you'd
prefer that those UIs use an alphabetical ordering rather than the one
based on operational flow?

>> I don't see any part there that explains why the minibuffer needs to be
>> prefilled, but that is usually handled separately from the
>> completions anyway. - Stefan
> Then my conclusion is that the introduction of INITIAL for 'completing-read'
> was a mistake.  That completing-read should only be about completion.  And that
> prefilling the minibuffer should involve a separate function call.

FWIW, I tend to agree and if(?) we introduce a new API I'd replace this
INITIAL-INPUT argument with a function which could then do what we
usually do via the `minibuffer-with-setup-hook` hack.


        Stefan





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#65459; Package emacs. Full text available.

Message received at 65459 <at> debbugs.gnu.org:


Received: (at 65459) by debbugs.gnu.org; 24 Aug 2023 18:51:17 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Aug 24 14:51:17 2023
Received: from localhost ([127.0.0.1]:38645 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qZFQK-0006p3-In
	for submit <at> debbugs.gnu.org; Thu, 24 Aug 2023 14:51:17 -0400
Received: from mail-4325.protonmail.ch ([185.70.43.25]:64025)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <heimeborgia@HIDDEN>) id 1qZFQH-0006oo-Uj
 for 65459 <at> debbugs.gnu.org; Thu, 24 Aug 2023 14:51:14 -0400
Date: Thu, 24 Aug 2023 18:50:44 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com;
 s=protonmail3; t=1692903062; x=1693162262;
 bh=h97iZOKnYwDHhhhLH/95G5QpvI7s+dB6ZSEQ9xakQF8=;
 h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References:
 Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID:
 Message-ID:BIMI-Selector;
 b=vVP22Miu4pefWElHAKvGitKTWg0VKacGydOjZSOPuzZzl8tH836P0DXAicxriTIe9
 a3BwMhZhzyFXtmW1FNOoMfsOt8DdJeZyzhaRAdLOM2cs2VuwVt6wI/uJbQIIKuPByt
 eSLp7gXLmFJcUdu5VyZV6SnRmxkhiCIY35kJ6ROaziNaY5kSX/Y3AGqIZr+PaWRbvW
 Di+jiQYOW8zjKuLTDmLEL2v2LoXhM6QMUxWHSR5frtedYEKuKjR5aWh29sIkyadOB8
 NxcKY7vP72XY3dItpVT+YNx5HzihgFusVqxQpLkjdm86F1v0eNHQnREaxOiHoJN4Pd
 naubNR/Rezamg==
To: Stefan Monnier <monnier@HIDDEN>
From: Heime <heimeborgia@HIDDEN>
Subject: Re: bug#65459: completing-read INITIAL-VALUE unaware of COLLECTION
 and REQUIRE-MATCH
Message-ID: <JsMHuTJuAV744Cq4rlLRlQJOGLQmlCg5ridnbPUtE5FQyLK2SAM--8WEifARy3o_fp6AygWuygHK0_qbgE6D8tSa50Wsnjdv1kqF1ZlEfIs=@protonmail.com>
In-Reply-To: <jwv4jkopfjs.fsf-monnier+emacs@HIDDEN>
References: <Z37akRtOZpCa8uyj_2oyIonmlmfE70EiqztTtZtYAVk_9eSK7BeC61kXORi4yHKRvkkF1Lnp87hvWQQ4ZnJ4TZr6Txhh3QgW-pfNAD2wSb0=@protonmail.com>
 <fvqSmekfcbFxYmnHMLbj8FTVXP7zY0afjAsxgtCMbZWeyhdTBWYa9g-R9nFxWBwZGeaZtUGJ9xYBIyYhdgAvqmrtY1G9w7dQnt6YAy2gGzs=@protonmail.com>
 <jwv7cpln1o8.fsf-monnier+emacs@HIDDEN>
 <b1bTYvprIGDrU8iKzoUE-JcUPusjV8zhTc34hcSS6CksX1VYMyHUTBQPX_XtjjE973BcbpdA8acOLsTUuSNV3ilEwtM9ZaRj25lzp7am7NM=@protonmail.com>
 <jwvedjt78ti.fsf-monnier+emacs@HIDDEN>
 <rv4Y4VumhXlap7W1L1IT0DwtGu2V3slt6UsldQkbBUfrCmj9G4eHMpKcRL6cJBZq33vyPoueD8Cbd1gLOThrx6-W-TusDJjKGvIOYQz4zwI=@protonmail.com>
 <jwv7cpk6070.fsf-monnier+emacs@HIDDEN>
 <ZnU7o5ta2Yj00sCa0fTbOaRW3DCJh4szyru5E8hqOFTUKqhbj6QZThi7DYp9_AfixePN0kajs7RRptmvVNCJ2Ye-XtrSViMJalH9T8KVNwE=@protonmail.com>
 <jwv4jkopfjs.fsf-monnier+emacs@HIDDEN>
Feedback-ID: 57735886:user:proton
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 65459
Cc: Eli Zaretskii <eliz@HIDDEN>, 65459 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)






Sent with Proton Mail secure email.

------- Original Message -------
On Friday, August 25th, 2023 at 4:45 AM, Stefan Monnier via "Bug reports fo=
r GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@HIDDEN> =
wrote:


> > > > It is not, because the intention is on prefilling the minibuffer wi=
th
> > > > "alpha" rather than considering "alpha" as DEF.
> > >=20
> > > Could you explain why this is important in your case?
> >=20
> > There purpose of INITIAL has always been about prefilling the minibuffe=
r.
> > No other 'completing-read' functionality can do such a thing. DEF has
> > always served a different purpose. For some reason that I cannot unders=
tand,
> > most of the communications I have try to persuade me to set INITIAL to =
nil.
> > INITIAL had a purpose, which under certain circumstances has implicatio=
ns
> > to the way COLLECTION is constructed and used. Rather than fixing the
> > difficulties for certain cases, the answer has always been the same, pu=
t
> > INITIAL to nil and just don't use it, and use DEF if you want. Even tho=
ugh
> > Default Settings and Minibuffer Prefilling result in two completely dis=
tinct
> > behaviours.
>=20
>=20
> My question is not about INITIAL-INPUT but about the behavior that the
> user sees: why do you want the users of your code to see a minibuffer
> that is prefilled rather than one whose content is initially empty?
>=20
> That question is not rhetorical. There can be many different perfectly
> valid answers. Depending on that answer, the best way to code it can be
> quite different, tho.

I was planning something like for 'read-file-name' where one can expect=20
that the initial input will very likely be the part the user will end up
typing, otherwise they can quickly do a simple cycling to see the possibili=
ties.
=20
> > > That's partly why I've asked about a concrete example showing the wid=
er
> > > context :-) - Stefan
> >=20
> > I am working on an Emacs org library for archeological investigations w=
here
> > field practitioners can insert specific org templates detailing the pro=
gress
> > of excavations and finds. Each phase is categorised.
> >=20
> > For instance
> >=20
> > "Physical Analysis" "Chronological Dating" "Composition and Provenance"=
 "Isotope Analysis"
> >=20
> > And there exists a certain order. It would be difficult to change
> > that order on-the-fly just to make 'completing-read' happy. With each
> > exists specific templates that practitioners can introduce and
> > elaborate. Once certain aspects are completed, the previous
> > categorisations would be skipped, because they would no longer be
> > relevant. What gets shown is then directed towards improving
> > productivity, particularly when tight deadlines are imposed.
>=20
> So, IIUC, you have a `completing-read` call asking them which template
> to insert, and you want to order the set of completions based on
> knowledge of the stage at which they are?

No ordering actually happens, a particular element in collection is used
to prefill the minibuffer entry and consecutive elements in simple=20
cycling continue through the next stages.

The ordering in=20

"Physical Analysis" "Chronological Dating" "Composition and Provenance" "Is=
otope Analysis"

is an order in the operational flow, and it would not be possible to apply =
any alphabetical
type of sorting. =20

> I suspect you'll want to use a COLLECTION that explicitly asks to not be
> (re)sorted and which you "manually" re-order before the call, so that
> the sort order you choose is obeyed not just by this specific cycling
> you're using but also for users who rely on different UIs.

Actually, tho order is only obeyed for the specific cycling I am using, but
users have the possibility to use a different UI such as the usual manipula=
tion
possibilities provided by completing read.
=20
> I don't see any part there that explains why the minibuffer needs to be
> prefilled, but that is usually handled separately from the
> completions anyway. - Stefan

Then my conclusion is that the introduction of INITIAL for 'completing-read=
'
was a mistake.  That completing-read should only be about completion.  And =
that
prefilling the minibuffer should involve a separate function call.

From my interactions, it seems evident that we cannot get rid of INITIAL ei=
ther,
and we are stuck with it.  And the reason for discouraging its use.  I am n=
ot sure
whether simple cycling and completion should be provided by a single functi=
on,=20
although the capability of managing both would be very powerful.







Information forwarded to bug-gnu-emacs@HIDDEN:
bug#65459; Package emacs. Full text available.

Message received at 65459 <at> debbugs.gnu.org:


Received: (at 65459) by debbugs.gnu.org; 24 Aug 2023 16:46:50 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Aug 24 12:46:50 2023
Received: from localhost ([127.0.0.1]:38518 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qZDTt-0003Q3-QK
	for submit <at> debbugs.gnu.org; Thu, 24 Aug 2023 12:46:50 -0400
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:42125)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1qZDTr-0003Pm-TQ
 for 65459 <at> debbugs.gnu.org; Thu, 24 Aug 2023 12:46:48 -0400
Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1])
 by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 615354424AC;
 Thu, 24 Aug 2023 12:46:38 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1692895596;
 bh=3nwFdHrgDoXjCpJcf4SEzQONuHbYJZjSCzKrOM6chz0=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=G979PLqfZNmOQhKHcejUjJSw3l5qFLayzw/84MGHvAXUOlhZ4Mm0IDPwWJJy4UYjr
 FHZ+pSRaxTN7Ltjs8Hzwjwm+MyqvKM4omnpF6FVtyXzooe6GnWBUJCoY69GaENxTKT
 /d9jrR+iA2G94qqgzVlP1YtO2vFJUfB4Lrl7KphE2nuVZXBsu6GpbH15n/a8bySnJR
 +7KAGFsKRGPfnJR5ssE+pJT6s2zBP946MsFt8N61AE2RDRvbeq+D83AFYQj3dNdgXn
 /q9euyKCkD6m9tcIEtFvvuOGlKz6CxcpS2LKoNg4/NQjavq/M5IAJyAIWvJGl3csKT
 bJ7tTRDV6XAvw==
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 988194424BC;
 Thu, 24 Aug 2023 12:46:36 -0400 (EDT)
Received: from lechazo (lechon.iro.umontreal.ca [132.204.27.242])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 8709912031C;
 Thu, 24 Aug 2023 12:46:36 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Heime <heimeborgia@HIDDEN>
Subject: Re: bug#65459: completing-read INITIAL-VALUE unaware of COLLECTION
 and REQUIRE-MATCH
In-Reply-To: <ZnU7o5ta2Yj00sCa0fTbOaRW3DCJh4szyru5E8hqOFTUKqhbj6QZThi7DYp9_AfixePN0kajs7RRptmvVNCJ2Ye-XtrSViMJalH9T8KVNwE=@protonmail.com>
 (Heime's message of "Thu, 24 Aug 2023 14:51:29 +0000")
Message-ID: <jwv4jkopfjs.fsf-monnier+emacs@HIDDEN>
References: <Z37akRtOZpCa8uyj_2oyIonmlmfE70EiqztTtZtYAVk_9eSK7BeC61kXORi4yHKRvkkF1Lnp87hvWQQ4ZnJ4TZr6Txhh3QgW-pfNAD2wSb0=@protonmail.com>
 <WGPneIBtyarvwY_U4xDeNuwtGXJIGuLxxvX2PFDeFHH01k8NRYg0fuQIEcrnkmGagCNWILPuTDtbh3tc1bqkp5DKdTEPolnkb_AgdJNfVa8=@protonmail.com>
 <jwv4jkpoj61.fsf-monnier+emacs@HIDDEN>
 <fvqSmekfcbFxYmnHMLbj8FTVXP7zY0afjAsxgtCMbZWeyhdTBWYa9g-R9nFxWBwZGeaZtUGJ9xYBIyYhdgAvqmrtY1G9w7dQnt6YAy2gGzs=@protonmail.com>
 <jwv7cpln1o8.fsf-monnier+emacs@HIDDEN>
 <b1bTYvprIGDrU8iKzoUE-JcUPusjV8zhTc34hcSS6CksX1VYMyHUTBQPX_XtjjE973BcbpdA8acOLsTUuSNV3ilEwtM9ZaRj25lzp7am7NM=@protonmail.com>
 <jwvedjt78ti.fsf-monnier+emacs@HIDDEN>
 <rv4Y4VumhXlap7W1L1IT0DwtGu2V3slt6UsldQkbBUfrCmj9G4eHMpKcRL6cJBZq33vyPoueD8Cbd1gLOThrx6-W-TusDJjKGvIOYQz4zwI=@protonmail.com>
 <jwv7cpk6070.fsf-monnier+emacs@HIDDEN>
 <ZnU7o5ta2Yj00sCa0fTbOaRW3DCJh4szyru5E8hqOFTUKqhbj6QZThi7DYp9_AfixePN0kajs7RRptmvVNCJ2Ye-XtrSViMJalH9T8KVNwE=@protonmail.com>
Date: Thu, 24 Aug 2023 12:45:53 -0400
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 AWL 0.119 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain
 DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from
 domain
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 65459
Cc: Eli Zaretskii <eliz@HIDDEN>, 65459 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

>> > It is not, because the intention is on prefilling the minibuffer with
>> > "alpha" rather than considering "alpha" as DEF.
>> 
>> Could you explain why this is important in your case?
>
> There purpose of INITIAL has always been about prefilling the minibuffer.
> No other 'completing-read' functionality can do such a thing.  DEF has
> always served a different purpose.  For some reason that I cannot understand,
> most of the communications I have try to persuade me to set INITIAL to nil.
> INITIAL had a purpose, which under certain circumstances has implications
> to the way COLLECTION is constructed and used.  Rather than fixing the 
> difficulties for certain cases, the answer has always been the same, put 
> INITIAL to nil and just don't use it, and use DEF if you want.  Even though
> Default Settings and Minibuffer Prefilling result in two completely distinct  
> behaviours.

My question is not about INITIAL-INPUT but about the behavior that the
user sees: why do you want the users of your code to see a minibuffer
that is prefilled rather than one whose content is initially empty?

That question is not rhetorical.  There can be many different perfectly
valid answers.  Depending on that answer, the best way to code it can be
quite different, tho.

>> That's partly why I've asked about a concrete example showing the wider
>> context :-) - Stefan
>
> I am working on an Emacs org library for archeological investigations where
> field practitioners can insert specific org templates detailing the progress
> of excavations and finds.  Each phase is categorised.
>
> For instance
>
> "Physical_Analysis" "Chronological Dating" "Composition and Provenance" "Isotope Analysis"
>
> And there exists a certain order.  It would be difficult to change
> that order on-the-fly  just to make 'completing-read' happy. With each
> exists specific templates that practitioners can introduce and
> elaborate.  Once certain aspects are completed, the previous
> categorisations would be skipped, because they would no longer be
> relevant.  What gets shown is then directed towards improving
> productivity, particularly when tight deadlines are imposed.  

So, IIUC, you have a `completing-read` call asking them which template
to insert, and you want to order the set of completions based on
knowledge of the stage at which they are?

I suspect you'll want to use a COLLECTION that explicitly asks to not be
(re)sorted and which you "manually" re-order before the call, so that
the sort order you choose is obeyed not just by this specific cycling
you're using but also for users who rely on different UIs.

I don't see any part there that explains why the minibuffer needs to be
prefilled, but that is usually handled separately from the
completions anyway.


        Stefan





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#65459; Package emacs. Full text available.

Message received at 65459 <at> debbugs.gnu.org:


Received: (at 65459) by debbugs.gnu.org; 24 Aug 2023 14:51:57 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Aug 24 10:51:57 2023
Received: from localhost ([127.0.0.1]:38377 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qZBgj-0008Vv-2S
	for submit <at> debbugs.gnu.org; Thu, 24 Aug 2023 10:51:57 -0400
Received: from mail-40141.protonmail.ch ([185.70.40.141]:18227)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <heimeborgia@HIDDEN>) id 1qZBgh-0008Vh-Cu
 for 65459 <at> debbugs.gnu.org; Thu, 24 Aug 2023 10:51:56 -0400
Date: Thu, 24 Aug 2023 14:51:29 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com;
 s=protonmail3; t=1692888705; x=1693147905;
 bh=83ABPdPnnTgXi8vGub1iROXr7Nq7NTANa0TO9S8Gv74=;
 h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References:
 Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID:
 Message-ID:BIMI-Selector;
 b=k49jkKg5sog2bzGXk2ocqQUQLycI7uJRpD3vWFkbaEiDqV9DZGQm2frOv8UImX82i
 3iaGr8iqg6M4c3kIHuNhQz6z1KoE5pZmdpqxh7BrsXHDPM2VVfR9A1r3FbStHeAelw
 XaiTkVA4IGdN24RorbtIFDyv5PrbpnEx3PrO6KlmYQk7uLU9sHoLRE+xrtZmV0Z2dw
 wF34JBd7ukEoexiOgI4S6jFWxuRmQ0jTmfSda2SV6VsRaql4WQefxrpOx1RPS/NBvY
 jtaTQUZpT4Bv8nRomCvQuC+67ahQCqgrQGzx6LuauSuaWoWdyWG8e4Rp8F1AbOtrM6
 AeLMzal1z/w9A==
To: Stefan Monnier <monnier@HIDDEN>
From: Heime <heimeborgia@HIDDEN>
Subject: Re: bug#65459: completing-read INITIAL-VALUE unaware of COLLECTION
 and REQUIRE-MATCH
Message-ID: <ZnU7o5ta2Yj00sCa0fTbOaRW3DCJh4szyru5E8hqOFTUKqhbj6QZThi7DYp9_AfixePN0kajs7RRptmvVNCJ2Ye-XtrSViMJalH9T8KVNwE=@protonmail.com>
In-Reply-To: <jwv7cpk6070.fsf-monnier+emacs@HIDDEN>
References: <Z37akRtOZpCa8uyj_2oyIonmlmfE70EiqztTtZtYAVk_9eSK7BeC61kXORi4yHKRvkkF1Lnp87hvWQQ4ZnJ4TZr6Txhh3QgW-pfNAD2wSb0=@protonmail.com>
 <WGPneIBtyarvwY_U4xDeNuwtGXJIGuLxxvX2PFDeFHH01k8NRYg0fuQIEcrnkmGagCNWILPuTDtbh3tc1bqkp5DKdTEPolnkb_AgdJNfVa8=@protonmail.com>
 <jwv4jkpoj61.fsf-monnier+emacs@HIDDEN>
 <fvqSmekfcbFxYmnHMLbj8FTVXP7zY0afjAsxgtCMbZWeyhdTBWYa9g-R9nFxWBwZGeaZtUGJ9xYBIyYhdgAvqmrtY1G9w7dQnt6YAy2gGzs=@protonmail.com>
 <jwv7cpln1o8.fsf-monnier+emacs@HIDDEN>
 <b1bTYvprIGDrU8iKzoUE-JcUPusjV8zhTc34hcSS6CksX1VYMyHUTBQPX_XtjjE973BcbpdA8acOLsTUuSNV3ilEwtM9ZaRj25lzp7am7NM=@protonmail.com>
 <jwvedjt78ti.fsf-monnier+emacs@HIDDEN>
 <rv4Y4VumhXlap7W1L1IT0DwtGu2V3slt6UsldQkbBUfrCmj9G4eHMpKcRL6cJBZq33vyPoueD8Cbd1gLOThrx6-W-TusDJjKGvIOYQz4zwI=@protonmail.com>
 <jwv7cpk6070.fsf-monnier+emacs@HIDDEN>
Feedback-ID: 57735886:user:proton
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 65459
Cc: Eli Zaretskii <eliz@HIDDEN>, 65459 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)


------- Original Message -------
On Friday, August 25th, 2023 at 1:36 AM, Stefan Monnier via "Bug reports fo=
r GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@HIDDEN> =
wrote:

> > It is not, because the intention is on prefilling the minibuffer with
> > "alpha" rather than considering "alpha" as DEF.
>=20
> Could you explain why this is important in your case?

There purpose of INITIAL has always been about prefilling the minibuffer.
No other 'completing-read' functionality can do such a thing.  DEF has
always served a different purpose.  For some reason that I cannot understan=
d,
most of the communications I have try to persuade me to set INITIAL to nil.
INITIAL had a purpose, which under certain circumstances has implications
to the way COLLECTION is constructed and used.  Rather than fixing the=20
difficulties for certain cases, the answer has always been the same, put=20
INITIAL to nil and just don't use it, and use DEF if you want.  Even though
Default Settings and Minibuffer Prefilling result in two completely distinc=
t =20
behaviours.
=20
> > It appears that the maintainers might not be prioritizing the initial
> > intention of prefilling the minibuffer. Currently, their emphasis
> > seems to be on encouraging developers to either utilize the "DEF"
> > approach or actively discourage the use of "INITIAL". But, I haven't
> > come across a clear and well-founded reasoning behind these shifts
> > in approach.
>=20
> Not sure what you mean by "shifts". AFAIK this behavior has been with
> Emacs "forever": most minibuffers start empty (but with an associated
> default value) rather than starting with an initial value.

Right.  Because most minibuffers start empty (but with an associated
default value) rather than starting with an initial value, this particular
use of 'completing-read' in today considered to be the only way to use=20
'completing-read'.  Something that is completely wrong because a particular
use case has now became dogma.  One cannot ever disregard the different fea=
ture
provided by INITIAL for those who want to use it.=20
=20
> This originally comes presumably from the absence of
> `transient-mark-mode` (or associated visual highlighting, both of which
> were introduced in Emacs-19) which means that it was annoying having to
> erase "alpha" before you can type "beta".
>=20
> Starting with a non-empty minibuffer does happen occasionally, most
> importantly for `read-file-name` where we do expect that this initial
> input will very likely be a part of the name the user will end up
> typing, so its rare that the users need to erase it before they can type
> the file name they want.

Right.  Although it is customarily rare, INITIAL does actually have relevan=
t
use cases.  It just happens that over time, additional use cases have cropp=
ed
up.  Rarity seams to have became a reason to discourage use of INITIAL.  Su=
ch
school of thought is seriously misguided. =20
=20
> > But this is only easily done only when collection is actually being
> > constructed in-place via the 'let' clause. But once COLLECTION
> > starts getting imported from somewhere else (via a call to same other
> > function for instance), your suggested solution is impossible
> > to achieve.
>=20
> That's partly why I've asked about a concrete example showing the wider
> context :-) - Stefan

I am working on an emacs org library for archeological investigations where
field practitioners can insert specific org templates detailing the progres=
s
of excavations and finds.  Each phase is categorised.

For instance

"Physical_Analysis" "Chronological Dating" "Composition and Provenance" "Is=
otope Analysis"

And there exists a certain order.  It would be difficult to change that ord=
er on-the-fly=20
just to make 'completing-read' happy. With each exists specific templates t=
hat practitioners
can introduce and elaborate.  Once certain aspects are completed, the previ=
ous categorisations
would be skipped, because they would no longer be relevant.  What gets show=
n is then directed
towards improving productivity, particularly when tight deadlines are impos=
ed. =20

Tight deadlines in archaeological field excavations arise from a variety of=
 logistical and=20
operational factors).  For instance, certain sites are threatened by constr=
uction or development
projects, with limited timeframes to excavate and document findings.  Some =
sites are at risk of
deterioration due to environmental factors (e.g. flooding, collapse), meani=
ng that emergency=20
excavations within short timeframes to salvage artifacts and information be=
comes necessary.

Such application should be concrete enough.








Information forwarded to bug-gnu-emacs@HIDDEN:
bug#65459; Package emacs. Full text available.

Message received at 65459 <at> debbugs.gnu.org:


Received: (at 65459) by debbugs.gnu.org; 24 Aug 2023 13:47:04 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Aug 24 09:47:04 2023
Received: from localhost ([127.0.0.1]:36408 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qZAfw-0006Fe-HF
	for submit <at> debbugs.gnu.org; Thu, 24 Aug 2023 09:47:04 -0400
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:33977)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1qZAfu-0006F9-Dj
 for 65459 <at> debbugs.gnu.org; Thu, 24 Aug 2023 09:47:02 -0400
Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1])
 by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id B4E5E1000BD;
 Thu, 24 Aug 2023 09:46:52 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1692884807;
 bh=EudCX1htd2cFEBaY+civoDTezBT5AhXLnoOJhkMn+S4=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=eYCBtxcDQ29Ckb8PKQDOBCEwcq4K6CmhQ9acHnK3SsZWc+JGAMPJCe5rMLvlXpg/n
 M96g4m90YhgOkn0MAynuzYvRX0wwM1EqaNYtI/HCLDr9gh8ExVVvdKrwqi4hkY2ymM
 Hby1fxN7GGigGRMMtakWwl+hbslJ4G9snwOkroz6+hH/rKROQyXg4EOQzGV+b//6yG
 9RmiK97N+V/Lvu40eo1mPYVI6uLjA9cy2yD9EQhZNLwWyGAKMQIY8lTZ9vIdmKwkSZ
 nT0j7OrVavQ6QuQrllj9oC1cjM71SGjBAirXSipS8KTzBS7P/bpjeG1uUlxExQIhgA
 H5HCXNPCBDIxQ==
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 33DDC100084;
 Thu, 24 Aug 2023 09:46:47 -0400 (EDT)
Received: from pastel (unknown [104.247.227.249])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 0CE021201A6;
 Thu, 24 Aug 2023 09:46:47 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Gregory Heytings <gregory@HIDDEN>
Subject: Re: bug#65459: completing-read INITIAL-VALUE unaware of COLLECTION
 and REQUIRE-MATCH
In-Reply-To: <bb9dca5367728509e290@HIDDEN> (Gregory Heytings's message
 of "Thu, 24 Aug 2023 12:30:51 +0000")
Message-ID: <jwv1qfs5zol.fsf-monnier+emacs@HIDDEN>
References: <Z37akRtOZpCa8uyj_2oyIonmlmfE70EiqztTtZtYAVk_9eSK7BeC61kXORi4yHKRvkkF1Lnp87hvWQQ4ZnJ4TZr6Txhh3QgW-pfNAD2wSb0=@protonmail.com>
 <83jztmro8z.fsf@HIDDEN>
 <jVMlYwpHISTfEDJ7n7XwoXWq_e0TEmP6YI5KpgniW2tmVKr3POo7AKrr6-OXPn9bVWAH7XHPALB4dxrtLmZFBix-adNtRfPYZhre6rCE4zg=@protonmail.com>
 <jwvv8d57wdc.fsf-monnier+emacs@HIDDEN>
 <WGPneIBtyarvwY_U4xDeNuwtGXJIGuLxxvX2PFDeFHH01k8NRYg0fuQIEcrnkmGagCNWILPuTDtbh3tc1bqkp5DKdTEPolnkb_AgdJNfVa8=@protonmail.com>
 <jwv4jkpoj61.fsf-monnier+emacs@HIDDEN>
 <fvqSmekfcbFxYmnHMLbj8FTVXP7zY0afjAsxgtCMbZWeyhdTBWYa9g-R9nFxWBwZGeaZtUGJ9xYBIyYhdgAvqmrtY1G9w7dQnt6YAy2gGzs=@protonmail.com>
 <jwv7cpln1o8.fsf-monnier+emacs@HIDDEN>
 <b1bTYvprIGDrU8iKzoUE-JcUPusjV8zhTc34hcSS6CksX1VYMyHUTBQPX_XtjjE973BcbpdA8acOLsTUuSNV3ilEwtM9ZaRj25lzp7am7NM=@protonmail.com>
 <jwvedjt78ti.fsf-monnier+emacs@HIDDEN>
 <b63c3fe53037b9c4d8e8@HIDDEN>
 <jwvjztl5g5v.fsf-monnier+emacs@HIDDEN>
 <bb9dca5367728509e290@HIDDEN>
Date: Thu, 24 Aug 2023 09:46:46 -0400
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 AWL -0.077 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain
 DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from
 domain
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 65459
Cc: Heime <heimeborgia@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>,
 65459 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

>>> (defun my-completing-read (prompt collection start)
>>>   (minibuffer-with-setup-hook
>>>       (:append
>>>        (lambda ()
>>>          (setq-local actual-minibuffer-default-add-function
>>>                      minibuffer-default-add-function)
>>>          (setq-local minibuffer-default-add-function
>>>                      '(lambda () (setq minibuffer-default-add-done nil)
>>>                         (funcall actual-minibuffer-default-add-function)))
>>
>> Why use ' on `lambda`?
>>
>
> I think my finger slipped.
>
>>
>> BTW, rather than the above two `setq-local`s, I think you can write:
>>
>>    (add-function :before (local 'minibuffer-default-add-function)
>>                  (lambda () (setq minibuffer-default-add-done nil)))
>>
>
> Right.  I was writing that function as it if were for minibuffer.el, and was
> therefore avoiding advices.  But now I see that there are a couple of
> add-function in core anyway (it's not clear to me where the dividing line
> is).  So here's the final version:

The issue is not "don't use `(n)advice.el`", but "don't modify functions
on the sly".  And by "functions" this refers to those things stored in
the `symbol-function` slot of symbols in the global obarray.  This is
because code that does `(my-foo ...)` usually expects to execute the
code found in `(defun my-foo ...)` and not something else, and readers
of that code often make the same assumption, so it can make debugging
really nasty.

Changing a function with `fset` (or `cl-letf` or `defalias`) is worse
than using `advice-add`, for that reason: at least `advice-add` sets up
the help system such that `C-h f` will (hopefully) warn you about the
presence of an advice.

For variables containing functions (such as
`minibuffer-default-add-function`), there is no such expectation that
calling this function will run some known piece of code, on the
contrary: the whole point of the variable is to run difference pieces of
code in different contexts, so modifying the function is perfectly OK,
regardless whether you do it with `setq` or `add-function`.  Here I'd
use `add-function` because it's simpler.


        Stefan





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#65459; Package emacs. Full text available.

Message received at 65459 <at> debbugs.gnu.org:


Received: (at 65459) by debbugs.gnu.org; 24 Aug 2023 13:37:16 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Aug 24 09:37:16 2023
Received: from localhost ([127.0.0.1]:36399 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qZAWR-00060i-R0
	for submit <at> debbugs.gnu.org; Thu, 24 Aug 2023 09:37:16 -0400
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:24894)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1qZAWP-00060U-PY
 for 65459 <at> debbugs.gnu.org; Thu, 24 Aug 2023 09:37:14 -0400
Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1])
 by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id EC8E180595;
 Thu, 24 Aug 2023 09:37:03 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1692884222;
 bh=s5KTqooXMQzZUVtL1eGRJE96arRavzUB3yL4+D2Qwf8=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=ovHZ2YCAAiUS7tTbzGrhdbmTer3CahqbzRNAVgGWnXmOkj/5/2f5msve0nNR1pAEW
 TFA72lfEgv1rtX055JcF0CA317YVjHq3k8U5gV14X72sMGT90DCXVDn/d3YCMyODbT
 oMa/JT7fGexlQPD0TqfZ0PCrCC5VDmylOKg+w5p/FpX4eSzW10HqjL4iFFhJTL6Doo
 6HB0KgqRT0GCy1Sn8E2bvjWhlCsJO1VSQ6b0cW7SeFD/X14Sp+PmNwnU/PComXbQ9K
 aqToBE2yRjXgk8x/N0EOOglRc578NwbjTnwARRq8z/diAiDMood+R0LUPWc68nGfs0
 5//HlAV77PLOg==
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 8B1148037F;
 Thu, 24 Aug 2023 09:37:02 -0400 (EDT)
Received: from pastel (unknown [104.247.227.249])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 649991202E2;
 Thu, 24 Aug 2023 09:37:02 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Heime <heimeborgia@HIDDEN>
Subject: Re: bug#65459: completing-read INITIAL-VALUE unaware of COLLECTION
 and REQUIRE-MATCH
In-Reply-To: <rv4Y4VumhXlap7W1L1IT0DwtGu2V3slt6UsldQkbBUfrCmj9G4eHMpKcRL6cJBZq33vyPoueD8Cbd1gLOThrx6-W-TusDJjKGvIOYQz4zwI=@protonmail.com>
 (Heime's message of "Thu, 24 Aug 2023 09:02:06 +0000")
Message-ID: <jwv7cpk6070.fsf-monnier+emacs@HIDDEN>
References: <Z37akRtOZpCa8uyj_2oyIonmlmfE70EiqztTtZtYAVk_9eSK7BeC61kXORi4yHKRvkkF1Lnp87hvWQQ4ZnJ4TZr6Txhh3QgW-pfNAD2wSb0=@protonmail.com>
 <83jztmro8z.fsf@HIDDEN>
 <jVMlYwpHISTfEDJ7n7XwoXWq_e0TEmP6YI5KpgniW2tmVKr3POo7AKrr6-OXPn9bVWAH7XHPALB4dxrtLmZFBix-adNtRfPYZhre6rCE4zg=@protonmail.com>
 <jwvv8d57wdc.fsf-monnier+emacs@HIDDEN>
 <WGPneIBtyarvwY_U4xDeNuwtGXJIGuLxxvX2PFDeFHH01k8NRYg0fuQIEcrnkmGagCNWILPuTDtbh3tc1bqkp5DKdTEPolnkb_AgdJNfVa8=@protonmail.com>
 <jwv4jkpoj61.fsf-monnier+emacs@HIDDEN>
 <fvqSmekfcbFxYmnHMLbj8FTVXP7zY0afjAsxgtCMbZWeyhdTBWYa9g-R9nFxWBwZGeaZtUGJ9xYBIyYhdgAvqmrtY1G9w7dQnt6YAy2gGzs=@protonmail.com>
 <jwv7cpln1o8.fsf-monnier+emacs@HIDDEN>
 <b1bTYvprIGDrU8iKzoUE-JcUPusjV8zhTc34hcSS6CksX1VYMyHUTBQPX_XtjjE973BcbpdA8acOLsTUuSNV3ilEwtM9ZaRj25lzp7am7NM=@protonmail.com>
 <jwvedjt78ti.fsf-monnier+emacs@HIDDEN>
 <rv4Y4VumhXlap7W1L1IT0DwtGu2V3slt6UsldQkbBUfrCmj9G4eHMpKcRL6cJBZq33vyPoueD8Cbd1gLOThrx6-W-TusDJjKGvIOYQz4zwI=@protonmail.com>
Date: Thu, 24 Aug 2023 09:36:55 -0400
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 AWL 0.081 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain
 DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from
 domain
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 65459
Cc: Eli Zaretskii <eliz@HIDDEN>, 65459 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> It is not, because the intention is on prefilling the minibuffer with
> "alpha" rather than considering "alpha" as DEF.

Could you explain why this is important in your case?

> It appears that the maintainers might not be prioritizing the initial
> intention of prefilling the minibuffer.  Currently, their emphasis
> seems to be on encouraging  developers to either utilize the "DEF"
> approach or actively discourage the use of  "INITIAL".  But, I haven't
> come across a clear and well-founded reasoning behind  these shifts
> in approach.

Not sure what you mean by "shifts".  AFAIK this behavior has been with
Emacs "forever": most minibuffers start empty (but with an associated
default value) rather than starting with an initial value.

This originally comes presumably from the absence of
`transient-mark-mode` (or associated visual highlighting, both of which
were introduced in Emacs-19) which means that it was annoying having to
erase "alpha" before you can type "beta".

Starting with a non-empty minibuffer does happen occasionally, most
importantly for `read-file-name` where we do expect that this initial
input will very likely be a part of the name the user will end up
typing, so its rare that the users need to erase it before they can type
the file name they want.

> But this is only easily done only when collection is actually being
> constructed in-place via the 'let' clause.  But once COLLECTION
> starts getting imported from somewhere else (via a call to same other
> function for instance), your suggested solution is impossible
> to achieve. 

That's partly why I've asked about a concrete example showing the wider
context :-)


        Stefan





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#65459; Package emacs. Full text available.

Message received at 65459 <at> debbugs.gnu.org:


Received: (at 65459) by debbugs.gnu.org; 24 Aug 2023 13:20:12 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Aug 24 09:20:12 2023
Received: from localhost ([127.0.0.1]:36365 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qZAFw-0005Z5-DP
	for submit <at> debbugs.gnu.org; Thu, 24 Aug 2023 09:20:12 -0400
Received: from mail-40132.protonmail.ch ([185.70.40.132]:51823)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <heimeborgia@HIDDEN>) id 1qZAFu-0005Yo-4u
 for 65459 <at> debbugs.gnu.org; Thu, 24 Aug 2023 09:20:10 -0400
Date: Thu, 24 Aug 2023 13:19:55 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com;
 s=protonmail3; t=1692883199; x=1693142399;
 bh=EDfIxJG7QqcGKKQ5w/0M1P770ARR4m778oVj36irrsQ=;
 h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References:
 Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID:
 Message-ID:BIMI-Selector;
 b=ik8iYlreOCEJevnnnn+JlRGLkxdQx5gPEeSGNiw7bT8kdK/JLDro6P8cM6PlgzpVk
 D2ZaZ8ZB2sGCe+rrcc4H23xc7d12SVQdHkBKF3WiuVYDQDHWTz6t89aqQ/tQr89cV0
 8WoZD9nVv5hLEmGBRcekHNdHaXOywWUI5gqcUdTTo8qWOMzjxUn5UvIXAIKqNeQIb3
 MWEjyY6zC5XgxkuJzBjHQPyzgqBXDCJLR3mVKFH1ZH5QyaY0oVmgjwtrjqBs2eUq7I
 B283/TCcnGzDgZr18kCA90UI69OLCbKy9bI5T2aU4O8O6RCHqEK+Jf2ozAY50UNAVz
 0tXXcRVVWrvug==
To: Gregory Heytings <gregory@HIDDEN>
From: Heime <heimeborgia@HIDDEN>
Subject: Re: bug#65459: completing-read INITIAL-VALUE unaware of COLLECTION
 and REQUIRE-MATCH
Message-ID: <VnRd4h82UO6YcSGqnBk0S8jCfU3VDSbfknV59GoaRMY-PPXF6zvbNInQav7FDirFwCmfE8rHuiR1QTGdqjwRRn-sWlVvVFAQTmm-yY_dntQ=@protonmail.com>
In-Reply-To: <bb9dca5367728509e290@HIDDEN>
References: <Z37akRtOZpCa8uyj_2oyIonmlmfE70EiqztTtZtYAVk_9eSK7BeC61kXORi4yHKRvkkF1Lnp87hvWQQ4ZnJ4TZr6Txhh3QgW-pfNAD2wSb0=@protonmail.com>
 <jwv4jkpoj61.fsf-monnier+emacs@HIDDEN>
 <fvqSmekfcbFxYmnHMLbj8FTVXP7zY0afjAsxgtCMbZWeyhdTBWYa9g-R9nFxWBwZGeaZtUGJ9xYBIyYhdgAvqmrtY1G9w7dQnt6YAy2gGzs=@protonmail.com>
 <jwv7cpln1o8.fsf-monnier+emacs@HIDDEN>
 <b1bTYvprIGDrU8iKzoUE-JcUPusjV8zhTc34hcSS6CksX1VYMyHUTBQPX_XtjjE973BcbpdA8acOLsTUuSNV3ilEwtM9ZaRj25lzp7am7NM=@protonmail.com>
 <jwvedjt78ti.fsf-monnier+emacs@HIDDEN> <b63c3fe53037b9c4d8e8@HIDDEN>
 <jwvjztl5g5v.fsf-monnier+emacs@HIDDEN> <bb9dca5367728509e290@HIDDEN>
Feedback-ID: 57735886:user:proton
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 65459
Cc: Eli Zaretskii <eliz@HIDDEN>, 65459 <at> debbugs.gnu.org,
 Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)


------- Original Message -------
On Friday, August 25th, 2023 at 12:30 AM, Gregory Heytings <gregory@heyting=
s.org> wrote:

> > > (defun my-completing-read (prompt collection start)
> > > (minibuffer-with-setup-hook
> > > (:append
> > > (lambda ()
> > > (setq-local actual-minibuffer-default-add-function
> > > minibuffer-default-add-function)
> > > (setq-local minibuffer-default-add-function
> > > '(lambda () (setq minibuffer-default-add-done nil)
> > > (funcall actual-minibuffer-default-add-function)))
> >=20
> > Why use ' on `lambda`?
>=20
>=20
> I think my finger slipped.
>=20
> > BTW, rather than the above two `setq-local`s, I think you can write:
> >=20
> > (add-function :before (local 'minibuffer-default-add-function)
> > (lambda () (setq minibuffer-default-add-done nil)))
>=20
>=20
> Right. I was writing that function as it if were for minibuffer.el, and
> was therefore avoiding advices. But now I see that there are a couple of
> add-function in core anyway (it's not clear to me where the dividing line
> is). So here's the final version:
>=20
> (defun my-completing-read (prompt collection start)
> (minibuffer-with-setup-hook
> (:append
> (lambda ()
> (add-function :before (local 'minibuffer-default-add-function)
> (lambda () (setq minibuffer-default-add-done nil)))
> (next-history-element start)
> (move-end-of-line nil)))
> (completing-read (format-prompt prompt nil) collection nil t)))
>=20
> (my-completing-read "Grapheme" '("alpha" "beta" "gamma" "delta" "epsilon"=
 "zeta" "eta") 1)
>=20
> Heime, can you try that and tell us if it solves your problem?

The behaviour is as it should be.  Although we should keep 'start' to corre=
spond to=20
collection index which customarily starts from value 0.=20

Although I can use the function provided, I rather have all this incorporat=
ed in
'completing-read'.  Because 'completing-read' would benefit from it.  Parti=
cularly
now that its use is being extended.  This taking into account that my use c=
ase
is more aligned with its original operation, except that certain aspects wh=
ich I have
shown to be important were not recognised at the time.  After some focused =
attention,
Stefan concurred how I have been making sense, particularly after seeing ho=
w `completing-read`=20
actually behaves during the form of cycling I discussed at some length.







Information forwarded to bug-gnu-emacs@HIDDEN:
bug#65459; Package emacs. Full text available.

Message received at 65459 <at> debbugs.gnu.org:


Received: (at 65459) by debbugs.gnu.org; 24 Aug 2023 12:30:58 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Aug 24 08:30:58 2023
Received: from localhost ([127.0.0.1]:36320 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qZ9UI-0004FJ-22
	for submit <at> debbugs.gnu.org; Thu, 24 Aug 2023 08:30:58 -0400
Received: from heytings.org ([95.142.160.155]:51958)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <gregory@HIDDEN>) id 1qZ9UG-0004FA-Pd
 for 65459 <at> debbugs.gnu.org; Thu, 24 Aug 2023 08:30:57 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org;
 s=20220101; t=1692880251;
 bh=/rizmZeixiBsei1i7uDXdlsYv9kCXOHHFJkd+wHQnwo=;
 h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From;
 b=iMQiLHlF9qMoAwdANf+wBWZt7cMymDsz+xppxvhZnzRHFkEgiUKVFvRk8Ur+JJxcU
 kdexrMizgo7ipC1ry0cf33BNWIHvajp8xz9zgpaQIGN2jueti2jOgylOXhc8OGv2yB
 OPbaq/DscnYWH9pJuOsfwu5FLZjYJftVSMNzg5aB9631+HrVgRngkLJtX9oATPSvYm
 lZjR7qpEfkvR3nygqWcO3NKF4mz1fjnTGR7wKdIOun0FKrlK3BNGvCZAezilE5lNnD
 r5hLX4o2MkZDH+GZE6FcGbB+H8b0POsBJFWZoGlELg2zQkz2rpun3sxSkbDCWHk3mh
 jKYgGPJAI6sMg==
Date: Thu, 24 Aug 2023 12:30:51 +0000
From: Gregory Heytings <gregory@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
Subject: Re: bug#65459: completing-read INITIAL-VALUE unaware of COLLECTION
 and REQUIRE-MATCH
In-Reply-To: <jwvjztl5g5v.fsf-monnier+emacs@HIDDEN>
Message-ID: <bb9dca5367728509e290@HIDDEN>
References: <Z37akRtOZpCa8uyj_2oyIonmlmfE70EiqztTtZtYAVk_9eSK7BeC61kXORi4yHKRvkkF1Lnp87hvWQQ4ZnJ4TZr6Txhh3QgW-pfNAD2wSb0=@protonmail.com>
 <83jztmro8z.fsf@HIDDEN>
 <jVMlYwpHISTfEDJ7n7XwoXWq_e0TEmP6YI5KpgniW2tmVKr3POo7AKrr6-OXPn9bVWAH7XHPALB4dxrtLmZFBix-adNtRfPYZhre6rCE4zg=@protonmail.com>
 <jwvv8d57wdc.fsf-monnier+emacs@HIDDEN>
 <WGPneIBtyarvwY_U4xDeNuwtGXJIGuLxxvX2PFDeFHH01k8NRYg0fuQIEcrnkmGagCNWILPuTDtbh3tc1bqkp5DKdTEPolnkb_AgdJNfVa8=@protonmail.com>
 <jwv4jkpoj61.fsf-monnier+emacs@HIDDEN>
 <fvqSmekfcbFxYmnHMLbj8FTVXP7zY0afjAsxgtCMbZWeyhdTBWYa9g-R9nFxWBwZGeaZtUGJ9xYBIyYhdgAvqmrtY1G9w7dQnt6YAy2gGzs=@protonmail.com>
 <jwv7cpln1o8.fsf-monnier+emacs@HIDDEN>
 <b1bTYvprIGDrU8iKzoUE-JcUPusjV8zhTc34hcSS6CksX1VYMyHUTBQPX_XtjjE973BcbpdA8acOLsTUuSNV3ilEwtM9ZaRj25lzp7am7NM=@protonmail.com>
 <jwvedjt78ti.fsf-monnier+emacs@HIDDEN> <b63c3fe53037b9c4d8e8@HIDDEN>
 <jwvjztl5g5v.fsf-monnier+emacs@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 65459
Cc: Heime <heimeborgia@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>,
 65459 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)


>> (defun my-completing-read (prompt collection start)
>>   (minibuffer-with-setup-hook
>>       (:append
>>        (lambda ()
>>          (setq-local actual-minibuffer-default-add-function
>>                      minibuffer-default-add-function)
>>          (setq-local minibuffer-default-add-function
>>                      '(lambda () (setq minibuffer-default-add-done nil)
>>                         (funcall actual-minibuffer-default-add-function)))
>
> Why use ' on `lambda`?
>

I think my finger slipped.

>
> BTW, rather than the above two `setq-local`s, I think you can write:
>
>    (add-function :before (local 'minibuffer-default-add-function)
>                  (lambda () (setq minibuffer-default-add-done nil)))
>

Right.  I was writing that function as it if were for minibuffer.el, and 
was therefore avoiding advices.  But now I see that there are a couple of 
add-function in core anyway (it's not clear to me where the dividing line 
is).  So here's the final version:

(defun my-completing-read (prompt collection start)
   (minibuffer-with-setup-hook
       (:append
        (lambda ()
          (add-function :before (local 'minibuffer-default-add-function)
                        (lambda () (setq minibuffer-default-add-done nil)))
          (next-history-element start)
          (move-end-of-line nil)))
     (completing-read (format-prompt prompt nil) collection nil t)))

(my-completing-read "Grapheme" '("alpha" "beta" "gamma" "delta" "epsilon" "zeta" "eta") 1)

Heime, can you try that and tell us if it solves your problem?





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#65459; Package emacs. Full text available.

Message received at 65459 <at> debbugs.gnu.org:


Received: (at 65459) by debbugs.gnu.org; 24 Aug 2023 09:02:27 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Aug 24 05:02:27 2023
Received: from localhost ([127.0.0.1]:36100 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qZ6EV-0004D2-05
	for submit <at> debbugs.gnu.org; Thu, 24 Aug 2023 05:02:27 -0400
Received: from mail-4318.protonmail.ch ([185.70.43.18]:45613)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <heimeborgia@HIDDEN>) id 1qZ6ES-0004Cl-6e
 for 65459 <at> debbugs.gnu.org; Thu, 24 Aug 2023 05:02:25 -0400
Date: Thu, 24 Aug 2023 09:02:06 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com;
 s=protonmail3; t=1692867733; x=1693126933;
 bh=/EGO2aunxUWgvpzscMDdbXJVDIaUJUcyTd6Z8ucKBpo=;
 h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References:
 Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID:
 Message-ID:BIMI-Selector;
 b=K8dBsFkXbJ+0wDSSCKMtpD3HvSMHKzWeJNusI2de9qbAhMAXozZ+K7WVldtR++UH9
 uDBf5OkyIHLUVRkcZNYV8z1yxkzgEKZSYwLYcrYQ/FfQiQAr3W5sEQLx7Be9GX8qLn
 WLFuxxqGj9MqvQ5IuJhBhKHfpOmGJvaKSBlRvKLWTmcHawqJJjrnuNpMP1W53UqNzp
 0ofdKG6IDlmMUIEG6Rg9a3l4mzZykBVx36iz2VuMy4yfcTuwfXAgNlIPdzbPKC+LGF
 oXZ5oXTq3scEj0f9IWtIXaeoB0GDSqXCIiarSqo0+js83y4BG6kvmux6jEjTEhCcJV
 6BS0yulUKH8dQ==
To: Stefan Monnier <monnier@HIDDEN>
From: Heime <heimeborgia@HIDDEN>
Subject: Re: bug#65459: completing-read INITIAL-VALUE unaware of COLLECTION
 and REQUIRE-MATCH
Message-ID: <rv4Y4VumhXlap7W1L1IT0DwtGu2V3slt6UsldQkbBUfrCmj9G4eHMpKcRL6cJBZq33vyPoueD8Cbd1gLOThrx6-W-TusDJjKGvIOYQz4zwI=@protonmail.com>
In-Reply-To: <jwvedjt78ti.fsf-monnier+emacs@HIDDEN>
References: <Z37akRtOZpCa8uyj_2oyIonmlmfE70EiqztTtZtYAVk_9eSK7BeC61kXORi4yHKRvkkF1Lnp87hvWQQ4ZnJ4TZr6Txhh3QgW-pfNAD2wSb0=@protonmail.com>
 <83jztmro8z.fsf@HIDDEN>
 <jVMlYwpHISTfEDJ7n7XwoXWq_e0TEmP6YI5KpgniW2tmVKr3POo7AKrr6-OXPn9bVWAH7XHPALB4dxrtLmZFBix-adNtRfPYZhre6rCE4zg=@protonmail.com>
 <jwvv8d57wdc.fsf-monnier+emacs@HIDDEN>
 <WGPneIBtyarvwY_U4xDeNuwtGXJIGuLxxvX2PFDeFHH01k8NRYg0fuQIEcrnkmGagCNWILPuTDtbh3tc1bqkp5DKdTEPolnkb_AgdJNfVa8=@protonmail.com>
 <jwv4jkpoj61.fsf-monnier+emacs@HIDDEN>
 <fvqSmekfcbFxYmnHMLbj8FTVXP7zY0afjAsxgtCMbZWeyhdTBWYa9g-R9nFxWBwZGeaZtUGJ9xYBIyYhdgAvqmrtY1G9w7dQnt6YAy2gGzs=@protonmail.com>
 <jwv7cpln1o8.fsf-monnier+emacs@HIDDEN>
 <b1bTYvprIGDrU8iKzoUE-JcUPusjV8zhTc34hcSS6CksX1VYMyHUTBQPX_XtjjE973BcbpdA8acOLsTUuSNV3ilEwtM9ZaRj25lzp7am7NM=@protonmail.com>
 <jwvedjt78ti.fsf-monnier+emacs@HIDDEN>
Feedback-ID: 57735886:user:proton
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 65459
Cc: Eli Zaretskii <eliz@HIDDEN>, 65459 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)


------- Original Message -------
On Thursday, August 24th, 2023 at 9:27 AM, Stefan Monnier <monnier@HIDDEN=
treal.ca> wrote:

> > > The normal/recommended call looks like:
> > >=20
> > > (let ((cseq '("alpha" "beta" "gamma" "delta" "epsilon" "zeta" "eta"))=
)
> > > (completing-read (format-prompt "Grapheme" "alpha")
> > > cseq nil t nil nil "alpha"))
> > >=20
> > > [ Yes, it's a bit cumbersome: hysterical raisins :-( ] - Stefan
> >=20
> > Correct. The solution involves an unwieldy parameter configurations, an=
d possibly
> > using convoluted workarounds to achieve the desired behavior. This scen=
ario implies
> > that using the function as intended requires a level of effort, underst=
anding, and
> > manipulation that goes beyond direct usage.
>=20
>=20
> Agreed. That argues in favor of introducing a new function. But that
> new function would be so similar to `completing-read` that it will lead
> to users wondering when to use which or why there are two unless we mark
> `completing-read` as obsolete, which would in turn cause a lot of
> warnings in a lot of packages and code churn.
>=20
> So, we've been hesitating to make this change for a while, not sure
> which choice is least bad.
>=20
> But at this point do you consider the behavior of
>=20
> (let ((cseq '("alpha" "beta" "gamma" "delta" "epsilon" "zeta" "eta")))
> (completing-read (format-prompt "Grapheme" "alpha")
> cseq nil t nil nil "alpha"))
>=20
> to be a good solution for your original problem?

It is not, because the intention is on prefilling the minibuffer with "alph=
a" =20
rather than considering "alpha" as DEF. =20

It appears that the maintainers might not be prioritizing the initial inten=
tion
of prefilling the minibuffer.  Currently, their emphasis seems to be on enc=
ouraging=20
developers to either utilize the "DEF" approach or actively discourage the =
use of=20
"INITIAL".  But, I haven't come across a clear and well-founded reasoning b=
ehind=20
these shifts in approach.

Let just remember that COLLECTION might already have been defined somewhere=
 else
according to some arrangement rule regarding the order of its entries.  Rea=
rranging
the actual order of elements in collection just to fit the limited requirem=
ents
of completing-read is not to be considered good function design.  Apart fro=
m the=20
reality that rearranging the entries in COLLECTION might be difficult or ev=
en
impossible to achieve.  The example I show is straightforward in that you c=
an see=20
the entries and you can easily arrange them as you had suggested earlier
with

(let ((cseq '("epsilon" "zeta" "eta" "alpha" "beta" "gamma" "delta")))
  (completing-read "Grapheme: " cseq nil t "alpha"))

But this is only easily done only when collection is actually being constru=
cted
in-place via the 'let' clause.   But once COLLECTION starts getting importe=
d
from somewhere else (via a call to same other function for instance), your =
suggested
solution is impossible to achieve.=20
=20
> [ BTW, to me the main benefit of a new function is that we could try
> and make it so that the user can choose between a UI where the default
> is not inserted in the initial minibuffer (as in the above code), or
> one where it is (presumably pre-selected so you can delete it with
> a simple DEL), as is common in many other applications. ] - Stefan

I am neutral towards have two functions or a single one.

One can be considered as enhancing the functionaity of the other, leaving
the former for simpler use cases (and to conform in regards to backward=20
compatibility) - if sensible names can be made up such that no confusion=20
about their use can arise. =20

Failing that, one can have a single function, where the coder can clearly
specify the way in which he wants it used.  Currently the design is for
completing-read to determine by itself the strategy it should use, without
giving the coder actual control on how completing-read should behave when=
=20
one is faced with certain implementational circumstances where workarounds
are burdens to avoid rather than embrace.
=20









Information forwarded to bug-gnu-emacs@HIDDEN:
bug#65459; Package emacs. Full text available.

Message received at 65459 <at> debbugs.gnu.org:


Received: (at 65459) by debbugs.gnu.org; 24 Aug 2023 02:30:55 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Aug 23 22:30:55 2023
Received: from localhost ([127.0.0.1]:35720 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qZ07b-0001fe-30
	for submit <at> debbugs.gnu.org; Wed, 23 Aug 2023 22:30:55 -0400
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:7296)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1qZ07Y-0001fN-LD
 for 65459 <at> debbugs.gnu.org; Wed, 23 Aug 2023 22:30:53 -0400
Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1])
 by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 1EE474454AC;
 Wed, 23 Aug 2023 22:30:43 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1692844237;
 bh=WlvILCPPQ7zMjTulUL/3Lcl2UDbN0qk8ud0EeZoGbEM=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=RKwd2ifjv6oevx+dnvwSSTQ2RCK/CBSaVdqxZi/0KCHxUzzX9hgED9fQdXIWYc5J+
 /Twp8u2gFcr+G8+RhnrOeGBYImK2+tCXO59GAeEOYI8ntN3To3I5mDcksYRXAXCp8J
 SGfiCr687sRlXmdr6GgfzgV9nFtyzlXAQYf+7Pvn0bQ9PryG8u+EcRomoCSEuZx0G4
 JwCsz2yuoxFjIbE9vuAHLIkwIVsY9xa1CUKNLGjifcrs59PoOlYWBMcZDQK0rOo0oN
 iKFsrg2r4pEp0Su2//AgTjBVEHfcHM/XCyivjDgENi7Ae/p3tNFDv6d2ZNfUEyiNwc
 F9L8PN+VlDGhg==
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 65323442446;
 Wed, 23 Aug 2023 22:30:37 -0400 (EDT)
Received: from pastel (unknown [104.247.227.249])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 3448E120208;
 Wed, 23 Aug 2023 22:30:37 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Gregory Heytings <gregory@HIDDEN>
Subject: Re: bug#65459: completing-read INITIAL-VALUE unaware of COLLECTION
 and REQUIRE-MATCH
In-Reply-To: <b63c3fe53037b9c4d8e8@HIDDEN> (Gregory Heytings's message
 of "Wed, 23 Aug 2023 23:06:24 +0000")
Message-ID: <jwvjztl5g5v.fsf-monnier+emacs@HIDDEN>
References: <Z37akRtOZpCa8uyj_2oyIonmlmfE70EiqztTtZtYAVk_9eSK7BeC61kXORi4yHKRvkkF1Lnp87hvWQQ4ZnJ4TZr6Txhh3QgW-pfNAD2wSb0=@protonmail.com>
 <83jztmro8z.fsf@HIDDEN>
 <jVMlYwpHISTfEDJ7n7XwoXWq_e0TEmP6YI5KpgniW2tmVKr3POo7AKrr6-OXPn9bVWAH7XHPALB4dxrtLmZFBix-adNtRfPYZhre6rCE4zg=@protonmail.com>
 <jwvv8d57wdc.fsf-monnier+emacs@HIDDEN>
 <WGPneIBtyarvwY_U4xDeNuwtGXJIGuLxxvX2PFDeFHH01k8NRYg0fuQIEcrnkmGagCNWILPuTDtbh3tc1bqkp5DKdTEPolnkb_AgdJNfVa8=@protonmail.com>
 <jwv4jkpoj61.fsf-monnier+emacs@HIDDEN>
 <fvqSmekfcbFxYmnHMLbj8FTVXP7zY0afjAsxgtCMbZWeyhdTBWYa9g-R9nFxWBwZGeaZtUGJ9xYBIyYhdgAvqmrtY1G9w7dQnt6YAy2gGzs=@protonmail.com>
 <jwv7cpln1o8.fsf-monnier+emacs@HIDDEN>
 <b1bTYvprIGDrU8iKzoUE-JcUPusjV8zhTc34hcSS6CksX1VYMyHUTBQPX_XtjjE973BcbpdA8acOLsTUuSNV3ilEwtM9ZaRj25lzp7am7NM=@protonmail.com>
 <jwvedjt78ti.fsf-monnier+emacs@HIDDEN>
 <b63c3fe53037b9c4d8e8@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
Date: Wed, 23 Aug 2023 22:30:36 -0400
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 AWL -0.092 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain
 DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from
 domain
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 65459
Cc: 65459 <at> debbugs.gnu.org, Eli Zaretskii <eliz@HIDDEN>,
 Heime <heimeborgia@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> (defun my-completing-read (prompt collection start)
>   (minibuffer-with-setup-hook
>       (:append
>        (lambda ()
>          (setq-local actual-minibuffer-default-add-function
>                      minibuffer-default-add-function)
>          (setq-local minibuffer-default-add-function
>                      '(lambda () (setq minibuffer-default-add-done nil)
>                         (funcall actual-minibuffer-default-add-function)))

Why use ' on `lambda`?
BTW, rather than the above two `setq-local`s, I think you can write:

    (add-function :before (local 'minibuffer-default-add-function)
                  (lambda () (setq minibuffer-default-add-done nil)))


-- Stefan





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#65459; Package emacs. Full text available.

Message received at 65459 <at> debbugs.gnu.org:


Received: (at 65459) by debbugs.gnu.org; 23 Aug 2023 23:06:33 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Aug 23 19:06:33 2023
Received: from localhost ([127.0.0.1]:35531 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qYwvp-00057x-2m
	for submit <at> debbugs.gnu.org; Wed, 23 Aug 2023 19:06:33 -0400
Received: from heytings.org ([95.142.160.155]:51236)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <gregory@HIDDEN>) id 1qYwvm-00057m-Dh
 for 65459 <at> debbugs.gnu.org; Wed, 23 Aug 2023 19:06:31 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=heytings.org;
 s=20220101; t=1692831985;
 bh=zuUctVeEryGz4NlQ04s/rbtx5zRQPySFI0v4MH8AFBE=;
 h=Date:From:To:cc:Subject:In-Reply-To:Message-ID:References:From;
 b=UxA33diMVdi7GUNjy2hdqsoVSd8bkBhw9oM2OMBuoRJv1d6fuTPNc0QtNka4Zl21m
 9ODoBtqcucx+hmHUgKgFztiV8vmCsC5bA5VJr8KSewveiYesAuchX+bCeOThR78uzr
 lxkuTxDXbHBlvr9+evCdF6mTQjV7XvHW38f9HrivCvlATBVYQwqLZVbt2SNiPUI+u4
 ols+UdDoEnZV8psGUSm8mwDW31eMwuRjR/UHMidYA9ZSp3UU2wFXjxZeuOjYfuTDT1
 SDPHYyFIXpS0/4U6GltBfWUhrxSeWSfPdpVEBcNuDt0zFJLICriQNsxzztfIRIoC4R
 EkTOjzxl/zktw==
Date: Wed, 23 Aug 2023 23:06:24 +0000
From: Gregory Heytings <gregory@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
Subject: Re: bug#65459: completing-read INITIAL-VALUE unaware of COLLECTION
 and REQUIRE-MATCH
In-Reply-To: <jwvedjt78ti.fsf-monnier+emacs@HIDDEN>
Message-ID: <b63c3fe53037b9c4d8e8@HIDDEN>
References: <Z37akRtOZpCa8uyj_2oyIonmlmfE70EiqztTtZtYAVk_9eSK7BeC61kXORi4yHKRvkkF1Lnp87hvWQQ4ZnJ4TZr6Txhh3QgW-pfNAD2wSb0=@protonmail.com>
 <83jztmro8z.fsf@HIDDEN>
 <jVMlYwpHISTfEDJ7n7XwoXWq_e0TEmP6YI5KpgniW2tmVKr3POo7AKrr6-OXPn9bVWAH7XHPALB4dxrtLmZFBix-adNtRfPYZhre6rCE4zg=@protonmail.com>
 <jwvv8d57wdc.fsf-monnier+emacs@HIDDEN>
 <WGPneIBtyarvwY_U4xDeNuwtGXJIGuLxxvX2PFDeFHH01k8NRYg0fuQIEcrnkmGagCNWILPuTDtbh3tc1bqkp5DKdTEPolnkb_AgdJNfVa8=@protonmail.com>
 <jwv4jkpoj61.fsf-monnier+emacs@HIDDEN>
 <fvqSmekfcbFxYmnHMLbj8FTVXP7zY0afjAsxgtCMbZWeyhdTBWYa9g-R9nFxWBwZGeaZtUGJ9xYBIyYhdgAvqmrtY1G9w7dQnt6YAy2gGzs=@protonmail.com>
 <jwv7cpln1o8.fsf-monnier+emacs@HIDDEN>
 <b1bTYvprIGDrU8iKzoUE-JcUPusjV8zhTc34hcSS6CksX1VYMyHUTBQPX_XtjjE973BcbpdA8acOLsTUuSNV3ilEwtM9ZaRj25lzp7am7NM=@protonmail.com>
 <jwvedjt78ti.fsf-monnier+emacs@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; format=flowed; charset=us-ascii
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 65459
Cc: 65459 <at> debbugs.gnu.org, Eli Zaretskii <eliz@HIDDEN>,
 Heime <heimeborgia@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)


>
> But at this point do you consider the behavior of
>
>    (let ((cseq '("alpha" "beta" "gamma" "delta" "epsilon" "zeta" "eta")))
>      (completing-read (format-prompt "Grapheme" "alpha")
>                       cseq nil t nil nil "alpha"))
>
> to be a good solution for your original problem?
>

Is this not a better solution to his original problem?

(defun my-completing-read (prompt collection start)
   (minibuffer-with-setup-hook
       (:append
        (lambda ()
          (setq-local actual-minibuffer-default-add-function
                      minibuffer-default-add-function)
          (setq-local minibuffer-default-add-function
                      '(lambda () (setq minibuffer-default-add-done nil)
                         (funcall actual-minibuffer-default-add-function)))
          (next-history-element start)
          (move-end-of-line nil)))
     (completing-read (format-prompt prompt nil) collection nil t)))

(my-completing-read "Grapheme" '("alpha" "beta" "gamma" "delta" "epsilon" "zeta" "eta") 1)





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#65459; Package emacs. Full text available.

Message received at 65459 <at> debbugs.gnu.org:


Received: (at 65459) by debbugs.gnu.org; 23 Aug 2023 22:44:27 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Aug 23 18:44:27 2023
Received: from localhost ([127.0.0.1]:35518 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qYwaR-0004U6-11
	for submit <at> debbugs.gnu.org; Wed, 23 Aug 2023 18:44:27 -0400
Received: from mx0a-00069f02.pphosted.com ([205.220.165.32]:28122)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <drew.adams@HIDDEN>) id 1qYwaM-0004Tu-P4
 for 65459 <at> debbugs.gnu.org; Wed, 23 Aug 2023 18:44:25 -0400
Received: from pps.filterd (m0246627.ppops.net [127.0.0.1])
 by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id
 37NKwODl027194; Wed, 23 Aug 2023 22:44:17 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com;
 h=from : to : cc :
 subject : date : message-id : references : in-reply-to : content-type :
 content-transfer-encoding : mime-version; s=corp-2023-03-30;
 bh=qb3/eNakSPStfh/Y5SPeFZR2cbXFjGZc+qtqIJxc2s4=;
 b=x1VZyXBuenY8dRldw3l6Ept2ghM0DXHajdQKX5O3XWQ3CGsDMSsu9Y6IQXIMijY8MWRU
 VB888+C1dlOY47JWPEqrDZUj/aXejn0d8RIP2nJepZ49AkbtKDSn4LAAliPaNX5C+V8w
 fGDxyjvIXiQQgNia6v7+dGn2jvMAGGd0p/0rNTBtxA15+ezQBKPcRb+UIyLSOAR0XvZm
 P/UNPkR1Hse4vZAkN6eT23zPF3q6uJu0NM9BZWlIqC1v8Foei6WNc6OhfqtgJRiqeJAu
 BrYRgNoSzy0DE/OIzhFkVVdQ3fsjRikBO6c6tlp6DttOuEts6mcGTETWliAoogXpVRgN 4g== 
Received: from iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com
 (iadpaimrmta03.appoci.oracle.com [130.35.103.27])
 by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3sn1yxjw31-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Wed, 23 Aug 2023 22:44:17 +0000
Received: from pps.filterd
 (iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1])
 by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19)
 with ESMTP id 37NLWNJK033276; Wed, 23 Aug 2023 22:44:12 GMT
Received: from nam11-bn8-obe.outbound.protection.outlook.com
 (mail-bn8nam11lp2169.outbound.protection.outlook.com [104.47.58.169])
 by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id
 3sn1yvqed3-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Wed, 23 Aug 2023 22:44:12 +0000
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
 b=EdoOQuVRB2C+oMfu9nzyE9hPEv0byHcuTCNWjF47z1/J15oxNsT2ExBj8Fgwtz+jbEuDqaAujwn7OzBoFFhxEaDuLyslkdocROUb29vNL3+s1I6Rk1eoK88+Sgbp1deGfLbRkIiNowxnfzrqZKyaI9tryaLcW0uFg/3vz5KVmQGJ7pzUObQTwHaZzaSvckuYNKx4zoqDZvkncT7Z0Z5QepvvbZlXnwhLlomy9Zd61IrtF0NgtnQ4HwXxbBtHwdN5ajCAy80hAYB78frWYr6AL3FHFDKxaLaCm5mgh55eno9f7ti9jFnj6odpWvvCmj0hISQUDJ+L/0DM6oydxn1SgQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; 
 s=arcselector9901;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;
 bh=qb3/eNakSPStfh/Y5SPeFZR2cbXFjGZc+qtqIJxc2s4=;
 b=Dq6RPUYjtKOWgRnNBrQBNWqUQvQCUPW3wupPO06JxnKcQ8sNIzC3OXzzNo3RrPHxxLBrZo7oZaoCnSig2afwLe5b0MEjIgEfq4goSG1i3GqS00jsXmg3foLjlZAnSUgLQ3KyB2BchBIMyx+7xWodNEsYw+dlK1FvTime+S+XRaSAulwvEa4cIrCxtGkEWvoj1hqS5RUhoRYWy/9bLtoa/C4pEEraYs/gX6xqq5d+rnCauhL7DVRRH47smH+W70pqIQMMUS6AqVBOzVrmKFWb7aq8tEbuSvHPkmKA0GcYI8hUDMiVcr4TvQsp2Q9E5rvNbVqnN4V8asY16x3KW+gVEw==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
 smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com;
 dkim=pass header.d=oracle.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=qb3/eNakSPStfh/Y5SPeFZR2cbXFjGZc+qtqIJxc2s4=;
 b=vPTN4D2KDYfUseJqnzsnCFag0nCWb/Oz3+qsY0a2OJkiVpF3CAcym/CklxVQEQ8pYoX02z9RVvXVWbbiHqrjHbC6TKIwoxbWeZ2XNCUlQy8FNru8Pm8Sq/iOFhcBEIACYx5o1G6tLntE/+P8l6ZH4LTeZCTrWTF907bfcAsAU4g=
Received: from SJ0PR10MB5488.namprd10.prod.outlook.com (2603:10b6:a03:37e::19)
 by DM6PR10MB4332.namprd10.prod.outlook.com (2603:10b6:5:220::20) with
 Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6699.26; Wed, 23 Aug
 2023 22:44:10 +0000
Received: from SJ0PR10MB5488.namprd10.prod.outlook.com
 ([fe80::cfea:8a38:7719:1dee]) by SJ0PR10MB5488.namprd10.prod.outlook.com
 ([fe80::cfea:8a38:7719:1dee%4]) with mapi id 15.20.6699.026; Wed, 23 Aug 2023
 22:44:10 +0000
From: Drew Adams <drew.adams@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>, Heime
 <heimeborgia@HIDDEN>
Subject: RE: [External] : bug#65459: completing-read INITIAL-VALUE unaware of
 COLLECTION and REQUIRE-MATCH
Thread-Topic: [External] : bug#65459: completing-read INITIAL-VALUE unaware of
 COLLECTION and REQUIRE-MATCH
Thread-Index: AQHZ1gjioO6ZjAlSdEuEGLmmEtrUY6/4eLeg
Date: Wed, 23 Aug 2023 22:44:10 +0000
Message-ID: <SJ0PR10MB548877CBD03D9BB7D9FB6E03F31CA@HIDDEN>
References: <Z37akRtOZpCa8uyj_2oyIonmlmfE70EiqztTtZtYAVk_9eSK7BeC61kXORi4yHKRvkkF1Lnp87hvWQQ4ZnJ4TZr6Txhh3QgW-pfNAD2wSb0=@protonmail.com>
 <83jztmro8z.fsf@HIDDEN>
 <jVMlYwpHISTfEDJ7n7XwoXWq_e0TEmP6YI5KpgniW2tmVKr3POo7AKrr6-OXPn9bVWAH7XHPALB4dxrtLmZFBix-adNtRfPYZhre6rCE4zg=@protonmail.com>
 <jwvv8d57wdc.fsf-monnier+emacs@HIDDEN>
 <WGPneIBtyarvwY_U4xDeNuwtGXJIGuLxxvX2PFDeFHH01k8NRYg0fuQIEcrnkmGagCNWILPuTDtbh3tc1bqkp5DKdTEPolnkb_AgdJNfVa8=@protonmail.com>
 <jwv4jkpoj61.fsf-monnier+emacs@HIDDEN>
 <fvqSmekfcbFxYmnHMLbj8FTVXP7zY0afjAsxgtCMbZWeyhdTBWYa9g-R9nFxWBwZGeaZtUGJ9xYBIyYhdgAvqmrtY1G9w7dQnt6YAy2gGzs=@protonmail.com>
 <jwv7cpln1o8.fsf-monnier+emacs@HIDDEN>
 <b1bTYvprIGDrU8iKzoUE-JcUPusjV8zhTc34hcSS6CksX1VYMyHUTBQPX_XtjjE973BcbpdA8acOLsTUuSNV3ilEwtM9ZaRj25lzp7am7NM=@protonmail.com>
 <jwvedjt78ti.fsf-monnier+emacs@HIDDEN>
In-Reply-To: <jwvedjt78ti.fsf-monnier+emacs@HIDDEN>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
x-ms-publictraffictype: Email
x-ms-traffictypediagnostic: SJ0PR10MB5488:EE_|DM6PR10MB4332:EE_
x-ms-office365-filtering-correlation-id: 878fd58a-66c3-4a1f-67ae-08dba42a77a3
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: Ft+wElDAe8pVciU85D7OgbD+PzykX3JvV/o0T2AWCxTRkRBPSfqoaZBLqNa88PKumXxpbfc9WryxTVhFBIM+EZ6xoOepZRkza8TVC7/Bz3wgveV/ttFG9PbWWnfJpgABpdtKaOdF3wdLTmBdrDe42oQ4aF3XqACHOrHTruEIsl/sF599/rhoW7p5psMwMO0y772RptZKCbme+2Y0KPuwc5yNDd7/fGYWOxrE5qicbNE02UDXNDLCLaAdyOVjd1sq+Ji/fv9NPy/Q6pDHYxoF3kp+bBvqIskTV8/1mKJGLDhEfEBnHIztIy68tIL6EHspZKJ2i2K5QzETZ1T764v0lO/Kr/uXQAOAVwtpqI4BlLK8NDFBBWcfrWPS2OCEge/Rv1s8SrP/KbG4ymbn3gxex356LcW4LO/mBGClWekeUpZu+bcfUSw/Aso+bnhz/urgu3QmHcsyKJYnxfYU3z39CWbpQxNASMfmWeD/wf0jyesEY6K1OxZb++dYrzsd2s19+OgJCUpuI/TSOHn+/qMRyWkhs3bAj4dyek65d4WUAzvBbyaPhkDmeZ6WRIlB74Q4u98zmrJsZw6WB51qHRCP0QAwWZiFOxk9z/sDHNwjHZw=
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:;
 IPV:NLI; SFV:NSPM; H:SJ0PR10MB5488.namprd10.prod.outlook.com; PTR:; CAT:NONE;
 SFS:(13230031)(396003)(346002)(376002)(366004)(136003)(39860400002)(186009)(451199024)(1800799009)(6506007)(7696005)(52536014)(316002)(296002)(8936002)(8676002)(4326008)(110136005)(54906003)(66556008)(66946007)(76116006)(66476007)(64756008)(66446008)(55016003)(9686003)(41300700001)(26005)(5660300002)(44832011)(71200400001)(966005)(478600001)(83380400001)(4744005)(66899024)(86362001)(2906002)(33656002)(38070700005)(38100700002)(122000001);
 DIR:OUT; SFP:1101; 
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?4IE7VwHctT4Chsgnpo96tCW1MxxHKFIF6A0QGHshvJgAQlLo9UJP+64aL//E?=
 =?us-ascii?Q?L4+GgApAA7sUED5JEj4Rv2mHtagN/OZLd52G4nLv7ZOzzfxXGSoMZveqIlHr?=
 =?us-ascii?Q?LZLnzRg9c9OoGvzBZySYZhmBiLKolWinqP3ABAumhu1Nz/WoSvW/AJkRR4NB?=
 =?us-ascii?Q?ijx8bvKHPpnKbERL9yMZvwApdT2D7AoIBaSG0qk9MsglHlH03oI8ESYxqtrJ?=
 =?us-ascii?Q?m5GuVVDvwqTvJBnRGBbOUnc5Go2U7C5+ZgnR/vWxHcz2NqxiP55pZQg7VxGy?=
 =?us-ascii?Q?W1N7HtoOwl2/S+WvpRldYFCkbcA8kuCFUyg+wn+NwvPUV1oJghVU8UH5tsi0?=
 =?us-ascii?Q?0KNaW3EvSsWsorNaugAOEKbrzzXh93KSTVh4nvgkBUqvFXrlHXhnTxloT5a1?=
 =?us-ascii?Q?IeMaJyz67s6R/lXvK7aK/yMrfQJqLCWLNOdNJIu9aqwtodV78TsxRdWsv5HA?=
 =?us-ascii?Q?axy0DGHWOIQZoRjQhe3305qRohNpVp/d3Or/lLenl6SENwWAyk2tB6Ye8R3s?=
 =?us-ascii?Q?0I22Lqm1cCQBmBHKFxiAzHEOa1nJmnu3H8D66cnv3h5s/tucmDtZBdUqCIbt?=
 =?us-ascii?Q?xKN1CF9EzaJOONtKe4Fhco9op3AMVEBxy709dg765S81Bea3xChSIOPSk2Xg?=
 =?us-ascii?Q?5xzaO0RONMeaoyM942YJtc7azuNc0Y4ggasVCcX0sir+3jIHiHJ5wLmmQ/IF?=
 =?us-ascii?Q?IIkDPxstOzCfkGzUan3V8vM1rcEgP1AHKWp7BoPrWE4KIcl5evYaArR5igli?=
 =?us-ascii?Q?zTZKOz0bCp5FP5KYp40WmWyfhM0w+bTBz0fk/jg1OSYFypK6/h8ibqWFzefA?=
 =?us-ascii?Q?rnAsAGbpXRjZytgBsb7wUj0Svfaii7BYCdnzX1cAz1YxQRS/0gM+bVOxID9r?=
 =?us-ascii?Q?HWyrk16HVrHUzSwVix0XWia7IQybFk1letFMBpJ80TrPVqjI/VKrVikCpg9H?=
 =?us-ascii?Q?91z1cPc01/C0bCORPEsXufkocqIgT04qzERr/CJmERaHQbk9tzFMlNg1qlRS?=
 =?us-ascii?Q?S113aIPu78SJj424RahCTJ+6rEM5QuYSnwxv9UkPH6uOeaj/IGsKiDqJ+cAn?=
 =?us-ascii?Q?wt4aBxa8OnASIrRvhR34xeGQ3tT5CIAxxlXchWzcNvh+j8A/xsPOZ5r04DW8?=
 =?us-ascii?Q?8GmIDKFOeKhLQd6Du/zilLM2Nb1TUS2y0Xi1a9wsiJjPmafHatyAF3hXU3q7?=
 =?us-ascii?Q?n7Y74svm2R4CeDX8274I9YnVPkqfJfdbWPs5WuyMrk0O16reTZ93LAv2p+LU?=
 =?us-ascii?Q?ZKfX1isKk1IHu5WFYPAQVZxOMKMngAjFXHXW++fd17Y4WUtR4pGfEQyL1RXv?=
 =?us-ascii?Q?7wA74peDrj4dySEDaT4Hqqgu+CECD4N8qApdbFAKYGwAC8NEr7ZrTCH6QeEO?=
 =?us-ascii?Q?B/rNV03V1fsyIfdJmlDMY3MPV3plD+rUYufDXihnajPKBOFaG+t14bKO/ghP?=
 =?us-ascii?Q?NSAKds4DFwEi4uFwuWT7LbVhO/v9FSdbhxp+9ne1Mqo2TzZVhlDBkqDt+3aZ?=
 =?us-ascii?Q?WRz+LBkaF4vKgnLClNM//gd/y0TBwUqAwPz1spUF/eRmdU6KowZC2P+rmEVU?=
 =?us-ascii?Q?119qIti8U2Vs9as2MuEGdfAI9/oIpue4gJNcKIsI?=
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1
X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: TOwFsUCTALy2JIlq0I/CiJt8YX5BRYdFBrUmDOSPp7rtkAKZF2R1IGpCnh3dp2SvHHjsdvoDXO3PjF+2aRq4V2AenY+PVqu+la67YJBBqZTtlQb7HTzhrt1dbJHP0inhgKsPYV0MC07y3U6QKpCYHkqGC+EEAlntazcKsy+EM/IjmmDHDswxPVjDF34UO3vJImI4kcu0wWQtxsvUDKA3BcbhRhoqb4JCssxob6Ioo5ZtaSA/yBsGwUhl33+F9JGPOl18LHWdq1kCLtdNi4k1tNOgXcMZo0C34WyGie/aEdzyZgHWVmv4BxnafyRAs5tw99nookrWZ1zyBJY8RhZb/HPFto0xPdfLmbzUvMaXhUthWMlnDZPqUwjvVPIFUiZTMCUpcAEpX2aF0dGfhlLQUIWqx1wuc7MmLxmu0sktuWyhOO/4haPkhFB8stoLUcLako5OWGqnUoX9QFKp0wO4gBgrZSf92hSIH5cQdQR/MdMMrq3aAGQxqzvGqnNZzhhAp+Vqtrs1dKYX6CAQAqBktfVS2YDGoux/XlZZPrgqdwNrnLmrTN/Pqz/Qgs0T8BoY5xfW+WIr6eOukcvlgJYDgf2OG969vHmVNCrZkVxQhKvPX9x3wY0+7plppYMotI6qh3o1TPNpPAccLtPvPFlytYEni/ZJOCABLmkQhcp4oZuZGhJbft+awmKBIsV6KaBnjHnnN08ZoKo8tiUF+Qp2rJWqOH/kTGWX59Ub+z+40/kit/ylTzutA6JSyqsqfDMU7l8n7JXqcgaQklQDt7+tIialEXSgIkgi0goifSfzX6jJSQB303vrXcXvdW6i7aurJQJH1zXnd5W8tvyHG7OhYUpofHnqUtr4p/D+UbqhEKCfQECnr0l+7LIKqRDzmUg0
X-OriginatorOrg: oracle.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: SJ0PR10MB5488.namprd10.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 878fd58a-66c3-4a1f-67ae-08dba42a77a3
X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Aug 2023 22:44:10.5373 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: 0FRNI+v3eM6zK2ZCInGiAe9lW2ARzVnCPymuA23X7mQNYc5QROKHlieEcZvjmymaWm21QlZ3jgMtPWvmcwlUTQ==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR10MB4332
X-Proofpoint-Virus-Version: vendor=baseguard
 engine=ICAP:2.0.267,Aquarius:18.0.957,Hydra:6.0.601,FMLib:17.11.176.26
 definitions=2023-08-23_15,2023-08-22_01,2023-05-22_02
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=674
 spamscore=0 bulkscore=0
 suspectscore=0 mlxscore=0 malwarescore=0 adultscore=0 phishscore=0
 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2308100000
 definitions=main-2308230205
X-Proofpoint-GUID: KBcEEdyHIB0eaxvI_8s5tybfFD5QILzz
X-Proofpoint-ORIG-GUID: KBcEEdyHIB0eaxvI_8s5tybfFD5QILzz
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 65459
Cc: Eli Zaretskii <eliz@HIDDEN>,
 "65459 <at> debbugs.gnu.org" <65459 <at> debbugs.gnu.org>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

> [ BTW, to me the main benefit of a new function is that we could try
>   and make it so that the user can choose between a UI where the default
>   is not inserted in the initial minibuffer (as in the above code), or
>   one where it is (presumably pre-selected so you can delete it with
>   a simple DEL), as is common in many other applications.  ]

FWIW, this is what Icicles offers (since the beginning).

https://www.emacswiki.org/emacs/Icicles_-_Customization_and_General_Tips#ic=
icle-default-value






Information forwarded to bug-gnu-emacs@HIDDEN:
bug#65459; Package emacs. Full text available.

Message received at 65459 <at> debbugs.gnu.org:


Received: (at 65459) by debbugs.gnu.org; 23 Aug 2023 21:28:15 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Aug 23 17:28:14 2023
Received: from localhost ([127.0.0.1]:35272 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qYvOg-0005Sa-IY
	for submit <at> debbugs.gnu.org; Wed, 23 Aug 2023 17:28:14 -0400
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:46124)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1qYvOa-0005SL-PK
 for 65459 <at> debbugs.gnu.org; Wed, 23 Aug 2023 17:28:12 -0400
Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1])
 by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id C27C0805D6;
 Wed, 23 Aug 2023 17:27:59 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1692826078;
 bh=9Ac4eW7GVyW3i1Ax8igUvJiVghNO7djzafhrEjDKzS8=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=P4X8e8q+9fuYlpGx9bPeXhabrJXdBbTseJ4PcU7XsXdbW46xpkeXe2FQ9L04A4SzU
 j1xOIJFvwYJZXJ+/5enUXe0FK0JMHGCpIPH2xj1bMJpFSPnHncaG2Dw8WZKP+sIjKl
 MfAtp/n1d2jHsTFcVJqDKr38nPKmNhuY1rvibLaZII7GaM4AlfacY34NAcEuP/gHCe
 ILuHoIedKOLOIKdqXncH90/YOsokHvSH2IYbIqHR3SGLUdDMm2L4w8O944HfHhxGcY
 2Ze29bM21B+4V2uGl+4AUA6NKYF6R2c5//EAJDzWLZX3FCxHRZvJmgzU6rXUdq/cgw
 FrdjXeZtBFTyA==
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 67A4780292;
 Wed, 23 Aug 2023 17:27:58 -0400 (EDT)
Received: from pastel (unknown [104.247.227.249])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 417C912022B;
 Wed, 23 Aug 2023 17:27:58 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Heime <heimeborgia@HIDDEN>
Subject: Re: bug#65459: completing-read INITIAL-VALUE unaware of COLLECTION
 and REQUIRE-MATCH
In-Reply-To: <b1bTYvprIGDrU8iKzoUE-JcUPusjV8zhTc34hcSS6CksX1VYMyHUTBQPX_XtjjE973BcbpdA8acOLsTUuSNV3ilEwtM9ZaRj25lzp7am7NM=@protonmail.com>
 (Heime's message of "Wed, 23 Aug 2023 18:12:22 +0000")
Message-ID: <jwvedjt78ti.fsf-monnier+emacs@HIDDEN>
References: <Z37akRtOZpCa8uyj_2oyIonmlmfE70EiqztTtZtYAVk_9eSK7BeC61kXORi4yHKRvkkF1Lnp87hvWQQ4ZnJ4TZr6Txhh3QgW-pfNAD2wSb0=@protonmail.com>
 <83jztmro8z.fsf@HIDDEN>
 <jVMlYwpHISTfEDJ7n7XwoXWq_e0TEmP6YI5KpgniW2tmVKr3POo7AKrr6-OXPn9bVWAH7XHPALB4dxrtLmZFBix-adNtRfPYZhre6rCE4zg=@protonmail.com>
 <jwvv8d57wdc.fsf-monnier+emacs@HIDDEN>
 <WGPneIBtyarvwY_U4xDeNuwtGXJIGuLxxvX2PFDeFHH01k8NRYg0fuQIEcrnkmGagCNWILPuTDtbh3tc1bqkp5DKdTEPolnkb_AgdJNfVa8=@protonmail.com>
 <jwv4jkpoj61.fsf-monnier+emacs@HIDDEN>
 <fvqSmekfcbFxYmnHMLbj8FTVXP7zY0afjAsxgtCMbZWeyhdTBWYa9g-R9nFxWBwZGeaZtUGJ9xYBIyYhdgAvqmrtY1G9w7dQnt6YAy2gGzs=@protonmail.com>
 <jwv7cpln1o8.fsf-monnier+emacs@HIDDEN>
 <b1bTYvprIGDrU8iKzoUE-JcUPusjV8zhTc34hcSS6CksX1VYMyHUTBQPX_XtjjE973BcbpdA8acOLsTUuSNV3ilEwtM9ZaRj25lzp7am7NM=@protonmail.com>
Date: Wed, 23 Aug 2023 17:27:56 -0400
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 AWL 0.090 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain
 DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from
 domain
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 65459
Cc: Eli Zaretskii <eliz@HIDDEN>, 65459 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

>> The normal/recommended call looks like:
>> 
>> (let ((cseq '("alpha" "beta" "gamma" "delta" "epsilon" "zeta" "eta")))
>> (completing-read (format-prompt "Grapheme" "alpha")
>> cseq nil t nil nil "alpha"))
>> 
>> [ Yes, it's a bit cumbersome: hysterical raisins :-( ] - Stefan
>
> Correct.  The solution involves an unwieldy parameter configurations, and possibly
> using convoluted workarounds to achieve the desired behavior.  This scenario implies
> that using the function as intended requires a level of effort, understanding, and
> manipulation that goes beyond direct usage.

Agreed.  That argues in favor of introducing a new function.  But that
new function would be so similar to `completing-read` that it will lead
to users wondering when to use which or why there are two unless we mark
`completing-read` as obsolete, which would in turn cause a lot of
warnings in a lot of packages and code churn.

So, we've been hesitating to make this change for a while, not sure
which choice is least bad.

But at this point do you consider the behavior of

    (let ((cseq '("alpha" "beta" "gamma" "delta" "epsilon" "zeta" "eta")))
      (completing-read (format-prompt "Grapheme" "alpha")
                       cseq nil t nil nil "alpha"))

to be a good solution for your original problem?

[ BTW, to me the main benefit of a new function is that we could try
  and make it so that the user can choose between a UI where the default
  is not inserted in the initial minibuffer (as in the above code), or
  one where it is (presumably pre-selected so you can delete it with
  a simple DEL), as is common in many other applications.  ]


        Stefan





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#65459; Package emacs. Full text available.

Message received at 65459 <at> debbugs.gnu.org:


Received: (at 65459) by debbugs.gnu.org; 23 Aug 2023 18:12:50 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Aug 23 14:12:50 2023
Received: from localhost ([127.0.0.1]:35147 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qYsLZ-0003eH-OV
	for submit <at> debbugs.gnu.org; Wed, 23 Aug 2023 14:12:50 -0400
Received: from mail-40130.protonmail.ch ([185.70.40.130]:29753)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <heimeborgia@HIDDEN>) id 1qYsLX-0003e1-1c
 for 65459 <at> debbugs.gnu.org; Wed, 23 Aug 2023 14:12:48 -0400
Date: Wed, 23 Aug 2023 18:12:22 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com;
 s=protonmail3; t=1692814357; x=1693073557;
 bh=vk+mNUF8nSTIaGXQpk/EKK8ZoWTmD0pigHJP55RcNNc=;
 h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References:
 Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID:
 Message-ID:BIMI-Selector;
 b=uTkdqfaoo2R07F+2KO5GvyPAQf7jTxBZHm379cS/Och7VSKMDwB+E3VXpI4Ed6TeH
 2l0dIfFC5Tn6Xc40DvVrvaovg2jfAGjso8bd6I6VQQYgwHlHKVrB2+shVwnP5iBDuS
 CCXH+d5mtW9lJ9y0vHXcjqSh1/BwNt0ipnX0VVZ4ic8Xh0YdRJN56z15eLnUPdv5UJ
 ZAaF6jPMff8TtwPSr9O+torXtv/EMQM6u+/o5QV1fKZtuVMZfcytXnCntzOnpXe/aP
 oiiUKck7p6OuAsq7Zly68Yc/zbPg8wDRQGZjiV2rIuL9EfHx8xkn2L9vOrhY+fs8uj
 TR/cTK33ar2xw==
To: Stefan Monnier <monnier@HIDDEN>
From: Heime <heimeborgia@HIDDEN>
Subject: Re: bug#65459: completing-read INITIAL-VALUE unaware of COLLECTION
 and REQUIRE-MATCH
Message-ID: <b1bTYvprIGDrU8iKzoUE-JcUPusjV8zhTc34hcSS6CksX1VYMyHUTBQPX_XtjjE973BcbpdA8acOLsTUuSNV3ilEwtM9ZaRj25lzp7am7NM=@protonmail.com>
In-Reply-To: <jwv7cpln1o8.fsf-monnier+emacs@HIDDEN>
References: <Z37akRtOZpCa8uyj_2oyIonmlmfE70EiqztTtZtYAVk_9eSK7BeC61kXORi4yHKRvkkF1Lnp87hvWQQ4ZnJ4TZr6Txhh3QgW-pfNAD2wSb0=@protonmail.com>
 <83jztmro8z.fsf@HIDDEN>
 <jVMlYwpHISTfEDJ7n7XwoXWq_e0TEmP6YI5KpgniW2tmVKr3POo7AKrr6-OXPn9bVWAH7XHPALB4dxrtLmZFBix-adNtRfPYZhre6rCE4zg=@protonmail.com>
 <jwvv8d57wdc.fsf-monnier+emacs@HIDDEN>
 <WGPneIBtyarvwY_U4xDeNuwtGXJIGuLxxvX2PFDeFHH01k8NRYg0fuQIEcrnkmGagCNWILPuTDtbh3tc1bqkp5DKdTEPolnkb_AgdJNfVa8=@protonmail.com>
 <jwv4jkpoj61.fsf-monnier+emacs@HIDDEN>
 <fvqSmekfcbFxYmnHMLbj8FTVXP7zY0afjAsxgtCMbZWeyhdTBWYa9g-R9nFxWBwZGeaZtUGJ9xYBIyYhdgAvqmrtY1G9w7dQnt6YAy2gGzs=@protonmail.com>
 <jwv7cpln1o8.fsf-monnier+emacs@HIDDEN>
Feedback-ID: 57735886:user:proton
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 65459
Cc: Eli Zaretskii <eliz@HIDDEN>, 65459 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)






Sent with Proton Mail secure email.

------- Original Message -------
On Thursday, August 24th, 2023 at 4:58 AM, Stefan Monnier <monnier@HIDDEN=
treal.ca> wrote:


> > > Could you give a bit more context about why/where you'd want to do th=
at
> > > so I can better imagine how to attack the problem?
> > >=20
> > > Hopefully it would explain why you want "alpha epsilon ..." first but
> > > "alpha beta .." later.
> >=20
> > In such instance one considers collection as a cyclic list for the case=
 of
> > simple cycling. But with possibility of starting from a particular inde=
x.
>=20
>=20
> So the initial "alpha" is simply not considered, OK, that makes sense,
> so given that the ordering of COLLECTION happens to be preserved, you
> can get the above behavior if you reorder COLLECTION before the call, as
> in:
>=20
> (let ((cseq '("epsilon" "zeta" "eta" "alpha" "beta" "gamma" "delta")))
> (completing-read "Grapheme: " cseq nil t "alpha"))
=20
> > > Also for such uses of `completing-read` we usually recommend against =
a
> > > non-nil value for INITIAL-INPUT, so that context should try to explai=
n
> > > why you use "alpha" as INITIAL-INPUT. - Stefan
> > > Because using INITIAL is the only way available to pre-insert a value=
 in
> > > the minibuffer.
>=20
> That's a bit tautological.
> What I meant is why do you need to preinsert a value?

In particular cases, the pre-insertion indicates to the user
the kind of input structure of collection that can help him
apply a completion strategy for traversing the possibilities.

=20
> The normal/recommended call looks like:
>=20
> (let ((cseq '("alpha" "beta" "gamma" "delta" "epsilon" "zeta" "eta")))
> (completing-read (format-prompt "Grapheme" "alpha")
> cseq nil t nil nil "alpha"))
>=20
> [ Yes, it's a bit cumbersome: hysterical raisins :-( ] - Stefan

Correct.  The solution involves an unwieldy parameter configurations, and p=
ossibly=20
using convoluted workarounds to achieve the desired behavior.  This scenari=
o implies
that using the function as intended requires a level of effort, understandi=
ng, and=20
manipulation that goes beyond direct usage.






Information forwarded to bug-gnu-emacs@HIDDEN:
bug#65459; Package emacs. Full text available.

Message received at 65459 <at> debbugs.gnu.org:


Received: (at 65459) by debbugs.gnu.org; 23 Aug 2023 16:58:55 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Aug 23 12:58:55 2023
Received: from localhost ([127.0.0.1]:35040 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qYrC3-0001R9-Gf
	for submit <at> debbugs.gnu.org; Wed, 23 Aug 2023 12:58:55 -0400
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:53821)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1qYrBz-0001Qu-Jd
 for 65459 <at> debbugs.gnu.org; Wed, 23 Aug 2023 12:58:54 -0400
Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1])
 by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 9056744233C;
 Wed, 23 Aug 2023 12:58:42 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1692809921;
 bh=8OaCzKn/+Y6tHhCq+6DFJ0lxSfn670K4cwxAfYwnyUI=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=euUyJVFyiR5ucf37k5XJUWNFVmyTDAvp/+aaCSRfweUfX4Z4+aKh9pTGJt1nKSc3I
 TmBIxvtMEiYW95IGi4nZCD+b4lhCDPv+wKfu1NzAmVJ3nvafjqFFbNyPFVL7DAwe0+
 k582FALsluukmoHRtBUX6L714L7qyJAWgL9bMyRgJIsgYRmQmuA4dG01yj1KySipOU
 oskli6XQRTZFvvhUdaMMsBuJ57c81WZmTBCa3Bf+hhSyocJTHg654WIcmchuZJaniu
 0v5tvsW33HTSOm6PA+ZMhBy9DeCkScydtumn2clnbF0x7CrkuwhitqLlwntfu03ADi
 RR83fy/sv4nvA==
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 11843442329;
 Wed, 23 Aug 2023 12:58:41 -0400 (EDT)
Received: from alfajor (unknown [23.233.149.155])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id E555B1200DB;
 Wed, 23 Aug 2023 12:58:40 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Heime <heimeborgia@HIDDEN>
Subject: Re: bug#65459: completing-read INITIAL-VALUE unaware of COLLECTION
 and REQUIRE-MATCH
In-Reply-To: <fvqSmekfcbFxYmnHMLbj8FTVXP7zY0afjAsxgtCMbZWeyhdTBWYa9g-R9nFxWBwZGeaZtUGJ9xYBIyYhdgAvqmrtY1G9w7dQnt6YAy2gGzs=@protonmail.com>
 (Heime's message of "Wed, 23 Aug 2023 16:39:52 +0000")
Message-ID: <jwv7cpln1o8.fsf-monnier+emacs@HIDDEN>
References: <Z37akRtOZpCa8uyj_2oyIonmlmfE70EiqztTtZtYAVk_9eSK7BeC61kXORi4yHKRvkkF1Lnp87hvWQQ4ZnJ4TZr6Txhh3QgW-pfNAD2wSb0=@protonmail.com>
 <83jztmro8z.fsf@HIDDEN>
 <jVMlYwpHISTfEDJ7n7XwoXWq_e0TEmP6YI5KpgniW2tmVKr3POo7AKrr6-OXPn9bVWAH7XHPALB4dxrtLmZFBix-adNtRfPYZhre6rCE4zg=@protonmail.com>
 <jwvv8d57wdc.fsf-monnier+emacs@HIDDEN>
 <WGPneIBtyarvwY_U4xDeNuwtGXJIGuLxxvX2PFDeFHH01k8NRYg0fuQIEcrnkmGagCNWILPuTDtbh3tc1bqkp5DKdTEPolnkb_AgdJNfVa8=@protonmail.com>
 <jwv4jkpoj61.fsf-monnier+emacs@HIDDEN>
 <fvqSmekfcbFxYmnHMLbj8FTVXP7zY0afjAsxgtCMbZWeyhdTBWYa9g-R9nFxWBwZGeaZtUGJ9xYBIyYhdgAvqmrtY1G9w7dQnt6YAy2gGzs=@protonmail.com>
Date: Wed, 23 Aug 2023 12:58:40 -0400
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 AWL 0.018 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain
 DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from
 domain
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 65459
Cc: Eli Zaretskii <eliz@HIDDEN>, 65459 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

>> Could you give a bit more context about why/where you'd want to do that
>> so I can better imagine how to attack the problem?
>> 
>> Hopefully it would explain why you want "alpha epsilon ..." first but
>> "alpha beta .." later. 
>
> In such instance one considers collection as a cyclic list for the case of 
> simple cycling.  But with possibility of starting from a particular index.

So the initial "alpha" is simply not considered, OK, that makes sense,
so given that the ordering of COLLECTION happens to be preserved, you
can get the above behavior if you reorder COLLECTION before the call, as
in:

    (let ((cseq '("epsilon" "zeta" "eta" "alpha" "beta" "gamma" "delta")))
      (completing-read "Grapheme: " cseq nil t "alpha"))

>> Also for such uses of `completing-read` we usually recommend against a 
>> non-nil value for INITIAL-INPUT, so that context should try to explain 
>> why you use "alpha" as INITIAL-INPUT. - Stefan
> Because using INITIAL is the only way available to pre-insert a value in 
> the minibuffer.

That's a bit tautological.
What I meant is why do you need to preinsert a value?

The normal/recommended call looks like:

    (let ((cseq '("alpha" "beta" "gamma" "delta" "epsilon" "zeta" "eta")))
      (completing-read (format-prompt "Grapheme" "alpha")
                       cseq nil t nil nil "alpha"))

[ Yes, it's a bit cumbersome: hysterical raisins :-(  ]


        Stefan





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#65459; Package emacs. Full text available.

Message received at 65459 <at> debbugs.gnu.org:


Received: (at 65459) by debbugs.gnu.org; 23 Aug 2023 16:40:28 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Aug 23 12:40:28 2023
Received: from localhost ([127.0.0.1]:34983 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qYqu9-0000rE-Ps
	for submit <at> debbugs.gnu.org; Wed, 23 Aug 2023 12:40:28 -0400
Received: from mail-4325.protonmail.ch ([185.70.43.25]:45627)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <heimeborgia@HIDDEN>) id 1qYqu5-0000qr-F7
 for 65459 <at> debbugs.gnu.org; Wed, 23 Aug 2023 12:40:24 -0400
Date: Wed, 23 Aug 2023 16:39:52 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com;
 s=protonmail3; t=1692808811; x=1693068011;
 bh=z96a5ip/dto3umT51lqm+ND1/iogpO3wrYWDPfwFnT0=;
 h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References:
 Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID:
 Message-ID:BIMI-Selector;
 b=c0tKPJVpKz1bg5GNEe+Egsg/aWSsmZxQjPqU1fLk3D2NFK1VwRWTl6zEm1iR+FpFN
 qKGzb5JSP5JWEF9JQgVYsIzC5TT2vhJ5Nk+6WCA9M1Q0KidYMmW85E3MHa4AIXYwy9
 J7QZiF9LNX12lntxYZrWgcxIkvVg2vxCzyPWzSIPz4kXMVr4R7vdu7zpxORPLT/I9N
 saS1UPW7Szwf/E6iY8fO4mw+myP6Jwb26gcAxuPJJ+x6HsPBX5+1tKufL34xr+dkBA
 xSqigolASsDIAibbTtaYgkxB8dlQnEk9aM3lCHR95boiowTBirJa754QTiwzT/IoCF
 7955AXr7oUtSQ==
To: Stefan Monnier <monnier@HIDDEN>
From: Heime <heimeborgia@HIDDEN>
Subject: Re: bug#65459: completing-read INITIAL-VALUE unaware of COLLECTION
 and REQUIRE-MATCH
Message-ID: <fvqSmekfcbFxYmnHMLbj8FTVXP7zY0afjAsxgtCMbZWeyhdTBWYa9g-R9nFxWBwZGeaZtUGJ9xYBIyYhdgAvqmrtY1G9w7dQnt6YAy2gGzs=@protonmail.com>
In-Reply-To: <jwv4jkpoj61.fsf-monnier+emacs@HIDDEN>
References: <Z37akRtOZpCa8uyj_2oyIonmlmfE70EiqztTtZtYAVk_9eSK7BeC61kXORi4yHKRvkkF1Lnp87hvWQQ4ZnJ4TZr6Txhh3QgW-pfNAD2wSb0=@protonmail.com>
 <83jztmro8z.fsf@HIDDEN>
 <jVMlYwpHISTfEDJ7n7XwoXWq_e0TEmP6YI5KpgniW2tmVKr3POo7AKrr6-OXPn9bVWAH7XHPALB4dxrtLmZFBix-adNtRfPYZhre6rCE4zg=@protonmail.com>
 <jwvv8d57wdc.fsf-monnier+emacs@HIDDEN>
 <WGPneIBtyarvwY_U4xDeNuwtGXJIGuLxxvX2PFDeFHH01k8NRYg0fuQIEcrnkmGagCNWILPuTDtbh3tc1bqkp5DKdTEPolnkb_AgdJNfVa8=@protonmail.com>
 <jwv4jkpoj61.fsf-monnier+emacs@HIDDEN>
Feedback-ID: 57735886:user:proton
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 65459
Cc: Eli Zaretskii <eliz@HIDDEN>, 65459 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)


------- Original Message -------
On Thursday, August 24th, 2023 at 4:05 AM, Stefan Monnier <monnier@HIDDEN=
treal.ca> wrote:

> > Then, repeatedly hit <down>. You get
> >=20
> > alpha alpha beta gamma delta epsilon zeta eta alpha beta gamma and-so-o=
n
>=20
> Ah, OK, yes, that sounds like a problem (one I've heard before).
> I think it's a problem in the cycling code rather than in INITIAL-VALUE
> or COLLECTION. E.g. the same problem occurs if the initial input is
> empty and the user types `alpha C-n`.

That has been my assessment as well.  It is not a problem of INITIAL-VALUE,
but a problem in the cycling mechanism.
=20
> > You do actually get that the consecutive entries appearing in the
> > minibuffer have direct correspondence to the order found in COLLECTION.
>=20
> For that form of cycling, apparently so, yes. I don't categorize it as
> "completion" so I haven't looked very closely at that code :-)
> There are other ways to do cycling which use a different ordering.

Correct, it is not categorised as completion.
=20
> The cycling through completions via `next-line-or-history-element` is
> not very configurable, AFAICT.
>=20
> > Once INITIAL is inserted, I cannot instruct completing-read to continue
> > sequentially starting from a particular element.
>=20
> Indeed.
>=20
> > For instance, I cannot get the following result when using simple cycli=
ng
> > through collection options when repeatedly hitting the <down> key.
> >=20
> > To achieve
> >=20
> > alpha epsilon zeta eta alpha beta gamma delta epsilon and-so-on
>=20
> Could you give a bit more context about why/where you'd want to do that
> so I can better imagine how to attack the problem?
>=20
> Hopefully it would explain why you want "alpha epsilon ..." first but
> "alpha beta .." later.=20

In such instance one considers collection as a cyclic list for the case of=
=20
simple cycling.  But with possibility of starting from a particular index.

> Also for such uses of `completing-read` we usually recommend against a=20
> non-nil value for INITIAL-INPUT, so that context should try to explain=20
> why you use "alpha" as INITIAL-INPUT. - Stefan

Because using INITIAL is the only way available to pre-insert a value in=20
the minibuffer.

Hence, if I want a pre-insertion candidate for the first element in collect=
ion
I get 'alpha' repeated twice.  First from the insertion via INITIAL, and th=
en=20
again through the simple cycling of collection (that starts from 'alpha'). =
=20

If one can instruct the starting position in collection and subsequently co=
nsider
collection as a cyclic list, the problem of ending with the following is so=
lved.

alpha alpha beta gamma delta epsilon zeta eta alpha and-so-on

which means

INITIAL COLLECTION(0) COLLECTION(1) and-so-on.

--------

Starting from entry 1 of collection, you would get

alpha beta gamma delta epsilon zeta eta alpha and-so-on

which means

INITIAL COLLECTION(1) COLLECTION(2) and-so-on

--------

And in general

INITIAL COLLECTION(i) COLLECTION(i+1) ... COLLECTION(0) COLLECTION(1) and-s=
o-on
















Information forwarded to bug-gnu-emacs@HIDDEN:
bug#65459; Package emacs. Full text available.

Message received at 65459 <at> debbugs.gnu.org:


Received: (at 65459) by debbugs.gnu.org; 23 Aug 2023 16:05:56 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Aug 23 12:05:55 2023
Received: from localhost ([127.0.0.1]:34959 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qYqMi-0008Oo-1j
	for submit <at> debbugs.gnu.org; Wed, 23 Aug 2023 12:05:55 -0400
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:15454)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1qYqMc-0008OX-Qq
 for 65459 <at> debbugs.gnu.org; Wed, 23 Aug 2023 12:05:51 -0400
Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1])
 by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 805B4442240;
 Wed, 23 Aug 2023 12:05:37 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1692806736;
 bh=A1fea5D8014B8LAg/jo2jBliOl/3CzuvCzmyA/dWv4s=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=RAgZH599oZuOLWGUI6xJuxgQ479UUrm4v1aagkDoe1K3uJn2oa16qgMrmo8JFL0IF
 YGBfxea6Y5O/jgn+C79UBF9jfP+L1GZ+nyXb8nVZVuehWukxuj0cUx21cPLbGAAf9y
 nzvRIhWV16h6YPv4E3/V5Smvx8fNCH9X/PjpUNwaW5E26hsU762UVdDQF3Aad2i447
 SFoTOLzZG1hcztbtcRGVLt7ERnW1H4zPmA0oxSevmdH3kH93kg5zHzQBv93hUZlqZA
 TCQEEIdNefcBMEU1sCSPEfMaTP7L4tE6mHI+dgM2HbLceeQL2yFl4RejlcS1afVZCW
 eSlUcRg3FDAUg==
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id ED664442243;
 Wed, 23 Aug 2023 12:05:35 -0400 (EDT)
Received: from alfajor (unknown [23.233.149.155])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id D0C401202A8;
 Wed, 23 Aug 2023 12:05:35 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Heime <heimeborgia@HIDDEN>
Subject: Re: bug#65459: completing-read INITIAL-VALUE unaware of COLLECTION
 and REQUIRE-MATCH
In-Reply-To: <WGPneIBtyarvwY_U4xDeNuwtGXJIGuLxxvX2PFDeFHH01k8NRYg0fuQIEcrnkmGagCNWILPuTDtbh3tc1bqkp5DKdTEPolnkb_AgdJNfVa8=@protonmail.com>
 (Heime's message of "Wed, 23 Aug 2023 15:29:53 +0000")
Message-ID: <jwv4jkpoj61.fsf-monnier+emacs@HIDDEN>
References: <Z37akRtOZpCa8uyj_2oyIonmlmfE70EiqztTtZtYAVk_9eSK7BeC61kXORi4yHKRvkkF1Lnp87hvWQQ4ZnJ4TZr6Txhh3QgW-pfNAD2wSb0=@protonmail.com>
 <83jztmro8z.fsf@HIDDEN>
 <jVMlYwpHISTfEDJ7n7XwoXWq_e0TEmP6YI5KpgniW2tmVKr3POo7AKrr6-OXPn9bVWAH7XHPALB4dxrtLmZFBix-adNtRfPYZhre6rCE4zg=@protonmail.com>
 <jwvv8d57wdc.fsf-monnier+emacs@HIDDEN>
 <WGPneIBtyarvwY_U4xDeNuwtGXJIGuLxxvX2PFDeFHH01k8NRYg0fuQIEcrnkmGagCNWILPuTDtbh3tc1bqkp5DKdTEPolnkb_AgdJNfVa8=@protonmail.com>
Date: Wed, 23 Aug 2023 12:05:35 -0400
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 AWL -0.016 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain
 DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from
 domain
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 65459
Cc: Eli Zaretskii <eliz@HIDDEN>, 65459 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Then, repeatedly hit <down>.  You get
>
> alpha alpha beta gamma delta epsilon zeta eta alpha beta gamma and-so-on

Ah, OK, yes, that sounds like a problem (one I've heard before).
I think it's a problem in the cycling code rather than in INITIAL-VALUE
or COLLECTION.  E.g. the same problem occurs if the initial input is
empty and the user types `alpha C-n`.

> You do actually get that the consecutive entries appearing in the
> minibuffer have direct correspondence to to order found in COLLECTION.

For that form of cycling, apparently so, yes.  I don't categorize it as
"completion" so I haven't looked very closely at that code :-)
There are other ways to do cycling which use a different ordering.

The cycling through completions via `next-line-or-history-element` is
not very configurable, AFAICT.

> Once INITIAL is inserted, I cannot instruct completing-read to continue
> sequentially starting from a particular element.

Indeed.

> For instance, I cannot get the following result when using simple cycling 
> through collection options when repeatedly hitting the <down> key.
>
> To achieve
>
> alpha epsilon zeta eta alpha beta gamma delta epsilon and-so-on

Could you give a bit more context about why/where you'd want to do that
so I can better imagine how to attack the problem?

Hopefully it would explain why you want "alpha epsilon ..." first but
"alpha beta .." later.  Also for such uses of `completing-read` we
usually recommend against a non-nil value for INITIAL-INPUT, so that
context should try to explain why you use "alpha" as INITIAL-INPUT.


        Stefan





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#65459; Package emacs. Full text available.

Message received at 65459 <at> debbugs.gnu.org:


Received: (at 65459) by debbugs.gnu.org; 23 Aug 2023 15:30:33 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Aug 23 11:30:33 2023
Received: from localhost ([127.0.0.1]:34916 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qYpoX-0007RB-8R
	for submit <at> debbugs.gnu.org; Wed, 23 Aug 2023 11:30:33 -0400
Received: from mail-4324.protonmail.ch ([185.70.43.24]:57893)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <heimeborgia@HIDDEN>) id 1qYpoS-0007Qt-7r
 for 65459 <at> debbugs.gnu.org; Wed, 23 Aug 2023 11:30:31 -0400
Date: Wed, 23 Aug 2023 15:29:53 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com;
 s=protonmail3; t=1692804618; x=1693063818;
 bh=XvssCcR+ksKM3tZI5V/wcdQlg4y0WUVt6386Vjx1F6Q=;
 h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References:
 Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID:
 Message-ID:BIMI-Selector;
 b=Do6UnrxvEoR/gMLtFLUAjGNjQB8HvRkkKDYAaML4meaAKcPjf0jLWRZLPFai/wxXW
 +AR/vVhm1plaSf6wnGlqUHz54mjSCqvn308dS9bVXUZmyrPLh39COodpZ2doB++HeI
 DViI/EwyFt+T9gmTAbXMhioBXsYvWIC8zuymLIS9J365N1y0zMwjGbhPVlY+O5z/7x
 KqWnqDJq5jonqYtGo5sB0t8AabToohuqN5aMcjXZlVwlkaVw3CkFln/ZKECgt3Sx7X
 Ba97OZo0YiNRBfMjNd39DfUUMpqTcdivVmIRsdPpKZT24BrhL5ZQ88a9pVRVgEAJgO
 4TtIZKzSerquA==
To: Stefan Monnier <monnier@HIDDEN>
From: Heime <heimeborgia@HIDDEN>
Subject: Re: bug#65459: completing-read INITIAL-VALUE unaware of COLLECTION
 and REQUIRE-MATCH
Message-ID: <WGPneIBtyarvwY_U4xDeNuwtGXJIGuLxxvX2PFDeFHH01k8NRYg0fuQIEcrnkmGagCNWILPuTDtbh3tc1bqkp5DKdTEPolnkb_AgdJNfVa8=@protonmail.com>
In-Reply-To: <jwvv8d57wdc.fsf-monnier+emacs@HIDDEN>
References: <Z37akRtOZpCa8uyj_2oyIonmlmfE70EiqztTtZtYAVk_9eSK7BeC61kXORi4yHKRvkkF1Lnp87hvWQQ4ZnJ4TZr6Txhh3QgW-pfNAD2wSb0=@protonmail.com>
 <83jztmro8z.fsf@HIDDEN>
 <jVMlYwpHISTfEDJ7n7XwoXWq_e0TEmP6YI5KpgniW2tmVKr3POo7AKrr6-OXPn9bVWAH7XHPALB4dxrtLmZFBix-adNtRfPYZhre6rCE4zg=@protonmail.com>
 <jwvv8d57wdc.fsf-monnier+emacs@HIDDEN>
Feedback-ID: 57735886:user:proton
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 65459
Cc: Eli Zaretskii <eliz@HIDDEN>, 65459 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)


------- Original Message -------
On Thursday, August 24th, 2023 at 1:07 AM, Stefan Monnier <monnier@HIDDEN=
treal.ca> wrote:


> > How can we describe it - primitive - then. What lots am I missing about
> > the behaviour of INITIAL-VALUE being independent about the state of the
> > other variables ?
>=20
> I can't really answer that because I don't fully understand what it is
> you're trying to do and feel that you can't do with this API.
>=20
> Maybe you're missing what other people usually miss:
> `completing-read` is also used for completion of things that have
> structure, like file-names, and where the INITIAL-INPUT may be a good
> starting point for the user while not being a valid end point
> (i.e. a choice rejected by REQUIRE-MATCH).

I am aware and have no problem with the points mentioned - structured compl=
etion and
INITIAL-INPUT not being a valid end point with regards to REQUIRE-MATCH as =
't'.
=20
> > And that entries in collection always start from index
> > zero when cycling is used.
>=20
> Don't know what you mean by that. Could you clarify?
>=20
> By and large the COLLECTION argument is treated as a set, i.e. without
> any ordering. Instead, the ordering is chosen by the UI (i.e. the
> completion code) and can depend on various user config choices, so
> I don't know what you mean by "always start from index zero".

Consider simple cycling through completion options using the down arrow key=
 (<down>) in=20
the completing-read function.  When using completing-read, you can cycle th=
rough the=20
available completion options by pressing the 'down' arrow key.

Consider

  (interactive
    (let ( (cseq '("alpha" "beta" "gamma" "delta" "epsilon" "zeta" "eta")) =
)
      (list
        (completing-read "Grapheme: " cseq nil t "alpha")) ))

I have no problem with possibility of having INITIAL not in COLLECTION.
But, suppose that I pre-insert the first element in collection as INITIAL
value in minibuffer.
=20
Then, repeatedly hit <down>.  You get

alpha alpha beta gamma delta epsilon zeta eta alpha beta gamma and-so-on

You do actually get that the consecutive entries appearing in the minibuffe=
r
have direct correspondence to to order found in COLLECTION.

Once INITIAL is inserted, I cannot instruct completing-read to continue
sequentially starting from a particular element.

For instance, I cannot get the following result when using simple cycling=
=20
through collection options when repeatedly hitting the <down> key.

To achieve

alpha epsilon zeta eta alpha beta gamma delta epsilon and-so-on

> I'm also not sure what you mean by "when cycling is used". Are you
> referring to the first choice offered by `minibuffer-complete` when
> `completion-cycle-threshold` is set to something like t?
>=20
> > I have found its capability limited, having actually used it.
>=20
>=20
> Are you talking about "used it" as an end-user or as a coder?

As a coder and after some tests mimicking a user using only simple cycling.=
=20
=20
> > I expected that as the functionalities get enhanced, some deficiencies
> > also get pumped up. Giving more control to the programmer about what
> > gets displayed in the minibuffer.
>=20
>=20
> The intention is to try and make room for 3 parts:
>=20
> - what the programmer provides to `completing-read`.
> - what the end-user sees.
> - between those two, the specific completion UI chosen by the end-user.
>=20
> So indeed, we don't want to offer too much control to the programmer who
> calls `completing-read`, so as to give more freedom to the
> completion UI. - Stefan

My school of thought is always allow the programmer to define how much free=
dom
he intends to give the completion UI.





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#65459; Package emacs. Full text available.

Message received at 65459 <at> debbugs.gnu.org:


Received: (at 65459) by debbugs.gnu.org; 23 Aug 2023 13:08:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Aug 23 09:08:09 2023
Received: from localhost ([127.0.0.1]:33144 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qYnai-0002xh-V8
	for submit <at> debbugs.gnu.org; Wed, 23 Aug 2023 09:08:09 -0400
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:22798)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1qYnad-0002x9-Dk
 for 65459 <at> debbugs.gnu.org; Wed, 23 Aug 2023 09:08:07 -0400
Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1])
 by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id A60041000AD;
 Wed, 23 Aug 2023 09:07:54 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1692796073;
 bh=oC1LhtphNNyUUPr87vmyZVuRWmbdGaVItcP1K1JGc+4=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=gd0gBQhGr3hxEMrhvwMB47oOGwfbGww4JdW6ENzG4+2kJXpR6s9EuCUjigET0GuCO
 0UYGIB36K9sdG1gWrETXFE8ptROPywunSWO9dOKoeCYUeNS0tHCKEhHAJwgen3jjFu
 gBD4LnkmUARUwpxZAKm9u14wy6YLA/pigGMt/thPENwwrMgvmTnEd6ZD1hgPeiBm6a
 nBuXN0U9HtMs8FDh9ZJPLI0nyTYQ0RHScDyLvAEYgaBYIPQgMRMh8AaXp/vgc22Sx7
 WenpdPf90AlPg3fibkcD6OFahqedq354LKNB+a+kyK1YGhEfjbJbydKOHXEg0BvmDo
 zkYmBM+MFwscw==
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 79174100064;
 Wed, 23 Aug 2023 09:07:53 -0400 (EDT)
Received: from pastel (unknown [104.247.227.249])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 541A01202D5;
 Wed, 23 Aug 2023 09:07:53 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Heime <heimeborgia@HIDDEN>
Subject: Re: bug#65459: completing-read INITIAL-VALUE unaware of COLLECTION
 and REQUIRE-MATCH
In-Reply-To: <jVMlYwpHISTfEDJ7n7XwoXWq_e0TEmP6YI5KpgniW2tmVKr3POo7AKrr6-OXPn9bVWAH7XHPALB4dxrtLmZFBix-adNtRfPYZhre6rCE4zg=@protonmail.com>
 (Heime's message of "Wed, 23 Aug 2023 11:57:55 +0000")
Message-ID: <jwvv8d57wdc.fsf-monnier+emacs@HIDDEN>
References: <Z37akRtOZpCa8uyj_2oyIonmlmfE70EiqztTtZtYAVk_9eSK7BeC61kXORi4yHKRvkkF1Lnp87hvWQQ4ZnJ4TZr6Txhh3QgW-pfNAD2wSb0=@protonmail.com>
 <83jztmro8z.fsf@HIDDEN>
 <jVMlYwpHISTfEDJ7n7XwoXWq_e0TEmP6YI5KpgniW2tmVKr3POo7AKrr6-OXPn9bVWAH7XHPALB4dxrtLmZFBix-adNtRfPYZhre6rCE4zg=@protonmail.com>
Date: Wed, 23 Aug 2023 09:07:52 -0400
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 AWL -0.088 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain
 DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from
 domain
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 65459
Cc: Eli Zaretskii <eliz@HIDDEN>, 65459 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> How can we describe it - primitive - then.  What lots am I missing about
> the behaviour of INITIAL-VALUE being independent about the state of the
> other variables ?

I can't really answer that because I don't fully understand what it is
you're trying to do and feel that you can't do with this API.

Maybe you're missing what other people usually miss:
`completing-read` is also used for completion of things that have
structure, like file-names, and where the INITIAL-INPUT may be a good
starting point for the user while not being a valid end point
(i.e. a choice rejected by REQUIRE-MATCH).

> And that entries in collection always start from index
> zero when cycling is used.

Don't know what you mean by that.  Could you clarify?

By and large the COLLECTION argument is treated as a *set*, i.e. without
any ordering.  Instead, the ordering is chosen by the UI (i.e. the
completion code) and can depend on various user config choices, so
I don't know what you mean by "always start from index zero".

I'm also not sure what you mean by "when cycling is used".  Are you
referring to the first choice offered by `minibuffer-complete` when
`completion-cycle-threshold` is set to something like t?

> I have found its capability limited, having actually used it.

Are you talking about "used it" as an end-user or as a coder?

> I expected that as the functionalities get enhanced, some deficiencies
> also get pumped up.  Giving more control to the programmer about what
> gets displayed in the minibuffer.

The intention is to try and make room for 3 parts:

- what the programmer provides to `completing-read`.
- what the end-user sees.
- between those two, the specific completion UI chosen by the end-user.

So indeed, we don't want to offer too much control to the programmer who
calls `completing-read`, so as to give more freedom to the
completion UI.


        Stefan





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#65459; Package emacs. Full text available.

Message received at 65459 <at> debbugs.gnu.org:


Received: (at 65459) by debbugs.gnu.org; 23 Aug 2023 11:58:22 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Aug 23 07:58:22 2023
Received: from localhost ([127.0.0.1]:33059 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qYmVC-00010L-89
	for submit <at> debbugs.gnu.org; Wed, 23 Aug 2023 07:58:22 -0400
Received: from mail-4324.protonmail.ch ([185.70.43.24]:28799)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <heimeborgia@HIDDEN>) id 1qYmV9-000105-Bp
 for 65459 <at> debbugs.gnu.org; Wed, 23 Aug 2023 07:58:20 -0400
Date: Wed, 23 Aug 2023 11:57:55 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com;
 s=protonmail3; t=1692791889; x=1693051089;
 bh=ZW48oK5gfr17Vf/wg+Yvq/wcJvzFl4/mMyEViB0kmhs=;
 h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References:
 Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID:
 Message-ID:BIMI-Selector;
 b=GPz5dAYa6UnqCsB18eQUw+xobbqjEBWn/DU+eT5on3kbbkvcEecfB0ugu/kRK3WDI
 EiiBD4atSKtQdxKy5okUezt3T2TXmIw12MlhhB0zqQM3+m6K6AqvDIiF6DhMnp8Ap+
 hnvMeOP6FE6NPdR1IFXiXyqIWoK3pci/qYx1sJQg8t8GsbFVV8ByYJVLgZH7w6Ys+c
 /wXGjCGZO7XRd+/rxJBPnhgltQkoDZsPNDrFGwtmdJoRdvcugnJerc48MVdoXaGPG2
 N5foxOD8IeRgWl2zHrVnA2dCvgAKGFJo4Lc9pCO0tI36QH+YAoYicR0h/pqsdhZ6RE
 LBUvqG2S7iyHA==
To: Eli Zaretskii <eliz@HIDDEN>
From: Heime <heimeborgia@HIDDEN>
Subject: Re: bug#65459: completing-read INITIAL-VALUE unaware of COLLECTION
 and REQUIRE-MATCH
Message-ID: <jVMlYwpHISTfEDJ7n7XwoXWq_e0TEmP6YI5KpgniW2tmVKr3POo7AKrr6-OXPn9bVWAH7XHPALB4dxrtLmZFBix-adNtRfPYZhre6rCE4zg=@protonmail.com>
In-Reply-To: <83jztmro8z.fsf@HIDDEN>
References: <Z37akRtOZpCa8uyj_2oyIonmlmfE70EiqztTtZtYAVk_9eSK7BeC61kXORi4yHKRvkkF1Lnp87hvWQQ4ZnJ4TZr6Txhh3QgW-pfNAD2wSb0=@protonmail.com>
 <83jztmro8z.fsf@HIDDEN>
Feedback-ID: 57735886:user:proton
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 65459
Cc: 65459 <at> debbugs.gnu.org, Stefan Monnier <monnier@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)






Sent with Proton Mail secure email.

------- Original Message -------
On Wednesday, August 23rd, 2023 at 11:29 PM, Eli Zaretskii <eliz@HIDDEN> w=
rote:


> > Date: Tue, 22 Aug 2023 22:04:06 +0000
> > From: Heime via "Bug reports for GNU Emacs,
> > the Swiss army knife of text editors" bug-gnu-emacs@HIDDEN
> >=20
> > The completing-read function in Emacs allows you to create a simple
> > interactive prompt where the user can type to complete a string based
> > on a given collection. REQUIRE-MATCH determines whether the input
> > must match an item in the collection.
> >=20
> > I find the design of completing-read as half-baked because INITIAL-VALU=
E
> > always works as an independent entity, always unaware of COLLECTION and
> > REQUIRE-MATCH
>=20
>=20
> "Half-baked" is a harsh qualification. I don't think it makes your
> arguments more attractive or convincing, so my advice is to avoid such
> derogatory epithets on issues which you have just recently learned and
> about which you might still be missing quite a lot.

How can we describe it - primitive - then.  What lots am I missing about=20
the behaviour of INITIAL-VALUE being independent about the state of the=20
other variables ?  And that entries in collection always start from index
zero when cycling is used.  I have found its capability limited, having
actually used it.

Nevertheless, if I am missing on things, I would be glad to be corrected=20
so that I can change my code accordingly.=20
=20
> In any case, from where I stand, any significant changes in the API of
> completing-read that are backward incompatible are out of the question
> at this stage, and if this discussion leads to a conclusion that an
> incompatible API could be useful, it will have to be a separate API.

I expected that as the functionalities get enhanced, some deficiencies
also get pumped up.  Giving more control to the programmer about what=20
gets displayed in the minibuffer.


=20
> > Thus, there exists no capabilities for possible interactions that could
> > influence how the completion works.
> >=20
> > For instance, suppose you want INITIAL-INPUT to be takes from collectio=
n,
> > and then have cycling start from a certain element after INITIAL-INPUT
> > is displayed. You can't. The only thing you can do is select an option
> > by automatically completing as much as possible.
> >=20
> > As for the cycling part, no proper functionality has been introduced. I=
NITIAL-INPUT
> > is there just to insert something to the minibuffer without any regard =
to possible
> > restriction that one might want imposed on it and what gets displayed a=
fter INITIAL-VALUE.
>=20
>=20
> Adding Stefan.
> 




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#65459; Package emacs. Full text available.

Message received at 65459 <at> debbugs.gnu.org:


Received: (at 65459) by debbugs.gnu.org; 23 Aug 2023 11:28:56 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Aug 23 07:28:56 2023
Received: from localhost ([127.0.0.1]:33015 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qYm2i-00061e-9v
	for submit <at> debbugs.gnu.org; Wed, 23 Aug 2023 07:28:56 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:53950)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1qYm2f-00061P-6k
 for 65459 <at> debbugs.gnu.org; Wed, 23 Aug 2023 07:28:54 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1qYm2V-0006TN-Ka; Wed, 23 Aug 2023 07:28:43 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date:
 mime-version; bh=6ndCUylhLV+Kcx5+mUUjeBkCaZ+SFP2ZbhfC19mqFwY=; b=XpCAl5w2q8Ko
 v1I90pPaleiWnNi+guxIhCw0jl/ne8sciD0FVeV99Se69bCpKP44eT/adINNvkqcltraiuAPSqF6E
 zLNmFkzIo3bGqWN35yukFxw2c1VXHraG4ese8IbJ65Uo+/qdBMRDwEJ//tLTYnXbkXpxGpQGoley2
 MGH5dPfOnjVvAsi67IJnlAcXfa6NZQbF8/QsX5FYnkBzcwXCPCUMnnzDqz6eYAEf4DYt1ReaehJ3Y
 yZv0oYukFWqakojcPCR9ReZq9Svzn1pLQotLW0bkLAFNiWcAa2zha5PPIDqyDUqgUNCSIqP+HmR5s
 ZFzUQSCjJxS118ZS77Y/Yw==;
Date: Wed, 23 Aug 2023 14:29:00 +0300
Message-Id: <83jztmro8z.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Heime <heimeborgia@HIDDEN>,
 Stefan Monnier <monnier@HIDDEN>
In-Reply-To: <Z37akRtOZpCa8uyj_2oyIonmlmfE70EiqztTtZtYAVk_9eSK7BeC61kXORi4yHKRvkkF1Lnp87hvWQQ4ZnJ4TZr6Txhh3QgW-pfNAD2wSb0=@protonmail.com>
 (bug-gnu-emacs@HIDDEN)
Subject: Re: bug#65459: completing-read INITIAL-VALUE unaware of COLLECTION and
 REQUIRE-MATCH
References: <Z37akRtOZpCa8uyj_2oyIonmlmfE70EiqztTtZtYAVk_9eSK7BeC61kXORi4yHKRvkkF1Lnp87hvWQQ4ZnJ4TZr6Txhh3QgW-pfNAD2wSb0=@protonmail.com>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 65459
Cc: 65459 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Date: Tue, 22 Aug 2023 22:04:06 +0000
> From:  Heime via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs@HIDDEN>
> 
> 
> The completing-read function in Emacs allows you to create a simple 
> interactive prompt where the user can type to complete a string based
> on a given collection.  REQUIRE-MATCH determines whether the input 
> must match an item in the collection.
> 
> I find the design of completing-read as half-baked because INITIAL-VALUE 
> always works as an independent entity, always unaware of COLLECTION and 
> REQUIRE-MATCH

"Half-baked" is a harsh qualification.  I don't think it makes your
arguments more attractive or convincing, so my advice is to avoid such
derogatory epithets on issues which you have just recently learned and
about which you might still be missing quite a lot.

In any case, from where I stand, any significant changes in the API of
completing-read that are backward incompatible are out of the question
at this stage, and if this discussion leads to a conclusion that an
incompatible API could be useful, it will have to be a separate API.

> Thus, there exists no capabilities for possible interactions that could 
> influence how the completion works.
> 
> For instance, suppose you want INITIAL-INPUT to be takes from collection,
> and then have cycling start from a certain element after INITIAL-INPUT
> is displayed.  You can't.  The only thing you can do is select an option
> by automatically completing as much as possible.  
> 
> As for the cycling part, no proper functionality has been introduced.  INITIAL-INPUT
> is there just to insert something to the minibuffer without any regard to possible 
> restriction that one might want imposed on it and what gets displayed after INITIAL-VALUE.  

Adding Stefan.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#65459; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 22 Aug 2023 22:04:42 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Aug 22 18:04:42 2023
Received: from localhost ([127.0.0.1]:60568 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1qYZUQ-0004FD-Cn
	for submit <at> debbugs.gnu.org; Tue, 22 Aug 2023 18:04:42 -0400
Received: from lists.gnu.org ([2001:470:142::17]:44054)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <heimeborgia@HIDDEN>) id 1qYZUO-0004F0-Rr
 for submit <at> debbugs.gnu.org; Tue, 22 Aug 2023 18:04:41 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <heimeborgia@HIDDEN>)
 id 1qYZUG-0000wb-Ai
 for bug-gnu-emacs@HIDDEN; Tue, 22 Aug 2023 18:04:32 -0400
Received: from mail-40137.protonmail.ch ([185.70.40.137])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <heimeborgia@HIDDEN>)
 id 1qYZUD-00081M-M2
 for bug-gnu-emacs@HIDDEN; Tue, 22 Aug 2023 18:04:32 -0400
Date: Tue, 22 Aug 2023 22:04:06 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com;
 s=protonmail3; t=1692741867; x=1693001067;
 bh=H45OzXHxFxj/UduQCG/CqIznIBVmqZaGo6FF4s69WjY=;
 h=Date:To:From:Subject:Message-ID:Feedback-ID:From:To:Cc:Date:
 Subject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector;
 b=da77cYc6h86WsDlqaQ6az5q4byJ6zI0C5dZDKJhuasaeb1GakcWNy/BmdUgHiBsaT
 RBr5d2OywMSnWAsnghhlEpxHR7fpbapR88A3mUnKKXj1kecqMjLYtKRTbY/EwPUSlM
 GUK0X4/XrnfIPdGidHMho2xAimCbY1vIFJGF0103tGY26gOrVZm6XblancoUqe4Mg9
 FDKjRAZlQlnsB7muf4EqMz320ruENdl1r3b0Jle1y8zZWjfkelMbSKGJEVh3OSV3tj
 1zG5Ivw/phDdBhV0kNYR++623hhjhaieWcSCfICPriVSXfK+zhi6NaMF7b8Mkmpzwt
 +MKc3g/gMRj/A==
To: "bug-gnu-emacs@HIDDEN" <bug-gnu-emacs@HIDDEN>
From: Heime <heimeborgia@HIDDEN>
Subject: completing-read INITIAL-VALUE unaware of COLLECTION and REQUIRE-MATCH
Message-ID: <Z37akRtOZpCa8uyj_2oyIonmlmfE70EiqztTtZtYAVk_9eSK7BeC61kXORi4yHKRvkkF1Lnp87hvWQQ4ZnJ4TZr6Txhh3QgW-pfNAD2wSb0=@protonmail.com>
Feedback-ID: 57735886:user:proton
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
Received-SPF: pass client-ip=185.70.40.137;
 envelope-from=heimeborgia@HIDDEN; helo=mail-40137.protonmail.ch
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_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)


The completing-read function in Emacs allows you to create a simple=20
interactive prompt where the user can type to complete a string based
on a given collection.  REQUIRE-MATCH determines whether the input=20
must match an item in the collection.

I find the design of completing-read as half-baked because INITIAL-VALUE=20
always works as an independent entity, always unaware of COLLECTION and=20
REQUIRE-MATCH

Thus, there exists no capabilities for possible interactions that could=20
influence how the completion works.

For instance, suppose you want INITIAL-INPUT to be takes from collection,
and then have cycling start from a certain element after INITIAL-INPUT
is displayed.  You can't.  The only thing you can do is select an option
by automatically completing as much as possible. =20

As for the cycling part, no proper functionality has been introduced.  INIT=
IAL-INPUT
is there just to insert something to the minibuffer without any regard to p=
ossible=20
restriction that one might want imposed on it and what gets displayed after=
 INITIAL-VALUE. =20







Acknowledgement sent to Heime <heimeborgia@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#65459; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Tue, 5 Sep 2023 13:30:03 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.