From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: unwind-protect within while-no-input Date: Tue, 28 May 2024 20:39:11 -0400 Message-ID: References: <86msp1a24a.fsf@gnu.org> <86jzk4a5ck.fsf@gnu.org> <8634qs9yl0.fsf@gnu.org> <861q6c9wdj.fsf@gnu.org> <86r0ec87d5.fsf@gnu.org> <86edab8rml.fsf@gnu.org> <5f76435b-0ceb-4ec6-94fc-3de23587b459@gutov.dev> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20766"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: emacs-devel@gnu.org To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed May 29 02:40:07 2024 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sC7MN-0005BW-6V for ged-emacs-devel@m.gmane-mx.org; Wed, 29 May 2024 02:40:07 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sC7Lf-0002ob-H4; Tue, 28 May 2024 20:39:23 -0400 Original-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 ) id 1sC7Ld-0002ns-KN for emacs-devel@gnu.org; Tue, 28 May 2024 20:39:21 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sC7Lb-0002vU-Qu for emacs-devel@gnu.org; Tue, 28 May 2024 20:39:21 -0400 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 41DAB44491F; Tue, 28 May 2024 20:39:18 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1716943152; bh=gXI1ZgsyhaBttV2IhFJ4pkVJr5IDgRV1g9Wqo8cDT+o=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=BqUi90vxrFQkFcrj1g9r8qk8l29Oz7V0vj+OYb5gkpwy5bvxyVWkgtcDc7XyuXB/N fArRKflUllOp5nObTvD5rr7zbBOa8HlVT4HinnfqqpnLx1j1W+A2EZV7m2Vw4CGZ9Z VdHUojYReSgcFJsS9phjcBm5kpQ90lwRCARKs8yhnB8MYj+924Y9kd3w8grvZewDSG Ml2OEzL8E+jt1DUySuNSikiAIyuEspdMtawy/Dh0tpsHMjykKqF0+dTs7XtcDq22zL xBD8a+XzPSctwlBd39G6GUYC2HnciopuFqQ+0hmyzRgB3l0LXO6Rm7Q4BJyStsPtaE koHDSxxW3U15A== Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id C9CEF44491E; Tue, 28 May 2024 20:39:12 -0400 (EDT) Original-Received: from pastel (unknown [24.140.236.196]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id A30A712047A; Tue, 28 May 2024 20:39:12 -0400 (EDT) In-Reply-To: (Dmitry Gutov's message of "Mon, 27 May 2024 01:56:16 +0300") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:319663 Archived-At: >>> All right. Would you say that the general class of circumstances like >>> >>> - completion is performed when Emacs is idle >>> - non-essential is t >>> - called by icomplete to show completion hints >>> >>> is a good general rule to apply while-no-input? >> Yes, basically the choice should be made on the UI side. The completion >> table itself doesn't know why the caller wants the info so it can't know >> whether user input makes the request pointless. > > Yeah, definitely. I was just wondering whether we should make that choice > entirely in the UI, or make it additionally opt-in for completion tables > (telling the UI that it's fine with such treatment). Maybe it would be useful for completion tables to be able to tell the UI whether `while-no-input` is "supported", but I'm not sure we have enough evidence to suggest it would be useful. BTW, in practice completion tables can already "override" a UI's `while-no-input`, if necessary, by rebinding `throw-on-input` to nil. Stefan