From mboxrd@z Thu Jan  1 00:00:00 1970
Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail
From: sbaugh@catern.com
Newsgroups: gmane.emacs.devel
Subject: Updating *Completions* as you type
Date: Thu, 12 Oct 2023 19:53:53 -0400
Message-ID: <87bkd3z9bi.fsf@catern.com>
Mime-Version: 1.0
Content-Type: text/plain
Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214";
	logging-data="35896"; mail-complaints-to="usenet@ciao.gmane.io"
User-Agent: Gnus/5.13 (Gnus v5.13)
To: emacs-devel@gnu.org
Cancel-Lock: sha1:6ijbxml9CDevvHwLA+0Ry9y6JBE=
Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Oct 13 07:31:18 2023
Return-path: <emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org>
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 <emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org>)
	id 1qrAlY-000954-Ry
	for ged-emacs-devel@m.gmane-mx.org; Fri, 13 Oct 2023 07:31:16 +0200
Original-Received: from localhost ([::1] helo=lists1p.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.90_1)
	(envelope-from <emacs-devel-bounces@gnu.org>)
	id 1qrAkp-0002p9-I5; Fri, 13 Oct 2023 01:30:31 -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 <ged-emacs-devel@m.gmane-mx.org>)
 id 1qr5VS-0005Vn-Ks
 for emacs-devel@gnu.org; Thu, 12 Oct 2023 19:54:18 -0400
Original-Received: from ciao.gmane.io ([116.202.254.214])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ged-emacs-devel@m.gmane-mx.org>)
 id 1qr5VC-0007d2-SX
 for emacs-devel@gnu.org; Thu, 12 Oct 2023 19:54:18 -0400
Original-Received: from list by ciao.gmane.io with local (Exim 4.92)
 (envelope-from <ged-emacs-devel@m.gmane-mx.org>) id 1qr5VA-0002z7-FG
 for emacs-devel@gnu.org; Fri, 13 Oct 2023 01:54:00 +0200
X-Injected-Via-Gmane: http://gmane.org/
Received-SPF: pass client-ip=116.202.254.214;
 envelope-from=ged-emacs-devel@m.gmane-mx.org; helo=ciao.gmane.io
X-Spam_score_int: -15
X-Spam_score: -1.6
X-Spam_bar: -
X-Spam_report: (-1.6 / 5.0 requ) BAYES_00=-1.9,
 HEADER_FROM_DIFFERENT_DOMAINS=0.25, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=no autolearn_force=no
X-Spam_action: no action
X-Mailman-Approved-At: Fri, 13 Oct 2023 01:30:30 -0400
X-BeenThere: emacs-devel@gnu.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Emacs development discussions." <emacs-devel.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/emacs-devel>,
 <mailto:emacs-devel-request@gnu.org?subject=unsubscribe>
List-Archive: <https://lists.gnu.org/archive/html/emacs-devel>
List-Post: <mailto:emacs-devel@gnu.org>
List-Help: <mailto:emacs-devel-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/emacs-devel>,
 <mailto:emacs-devel-request@gnu.org?subject=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:311423
Archived-At: <http://permalink.gmane.org/gmane.emacs.devel/311423>


It would be nice if there was a built-in customization which caused
*Completions* to update as you type, as long as that buffer is visible.
I imagine such a request has been made before, so what is the obstacle
to adding it?

I would like to figure out a solution which everyone is happy with, and
then I would be happy to implement it.  It seems to me that it's just a
matter of, after each keystroke, triggering (for minibuffer completion)
minibuffer-completion-help or (for buffer completion) some new function
to populate *Completions* with all-completions output.  This could (I
guess) be done with after-change-functions, although maybe others have a
better idea.

(Btw, if we had this behavior, it also seems like it would help with
another long-time request: asynchronous completion support.  A
programmed completion table could internally do something asynchronous
and stateful, and accumulate results over time, and return more and more
results each time Emacs calls all-completions/try-completion.  If Emacs
automatically called all-completions with such a programmed completion
table, the resulting behavior would be an acceptable approximation of
asynchronous completion, without having to complicate the programmed
completion API.)