From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Emacs should provide more modern item completion out of the box Date: Tue, 28 Jan 2020 22:09:06 -0500 Message-ID: References: <87eevje3tm.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="51034"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: ndame , "emacs-devel@gnu.org" , Dmitry Gutov To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Jan 29 04:09:44 2020 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 1iwdjc-000DEU-8u for ged-emacs-devel@m.gmane-mx.org; Wed, 29 Jan 2020 04:09:44 +0100 Original-Received: from localhost ([::1]:40164 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iwdjb-0001LS-5i for ged-emacs-devel@m.gmane-mx.org; Tue, 28 Jan 2020 22:09:43 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38342) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iwdj8-0000uB-Ei for emacs-devel@gnu.org; Tue, 28 Jan 2020 22:09:15 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iwdj5-0007Ul-NU for emacs-devel@gnu.org; Tue, 28 Jan 2020 22:09:13 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:18029) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iwdj5-0007TV-Jg for emacs-devel@gnu.org; Tue, 28 Jan 2020 22:09:11 -0500 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 0FBDB80D7D; Tue, 28 Jan 2020 22:09:10 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id DCE7480BB1; Tue, 28 Jan 2020 22:09:07 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1580267347; bh=DA36A60ckTwrcq4vzj5CzDFBn+JVHyzfwIN3hIC+m28=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=LWbGUqMX6kOUsmky3y7kEel3aY1B31rmasg5PC5cmXEn9DtBv8S6PkmqK/S7WmA02 piCwXQbuuVn5NjpG2aaUJQzhLqGR6PkAZqO2tvqlGkuuyDLv7PKEe0MX2ZoxAxR5E6 kVd7U/c0hfiGkesH+Q670sX3xiuNO9XnCxZPQXEiq/54akF1hWmoxsdtPiUndJh5ny lATFZIzINU8ccrAYmHrAXONgY6H8PauIhN0Og98sSZd7CK0I5Zq9W2m0WB7+hv0zja nteRMIPE6dIwh7o3t00dfevy4BaoBNLcPQT60cqQxiaKKqvqDWv32NATLgRUEhapVI 9csrw33GK/1TA== Original-Received: from alfajor (unknown [45.72.213.248]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 97209120B01; Tue, 28 Jan 2020 22:09:07 -0500 (EST) In-Reply-To: <87eevje3tm.fsf@mail.linkov.net> (Juri Linkov's message of "Tue, 28 Jan 2020 23:54:29 +0200") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 132.204.25.50 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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" Xref: news.gmane.io gmane.emacs.devel:244734 Archived-At: > Using a vertical display while keeping instant feedback of icomplete-mode > that doesn't require pressing TABs should be easy to do as well: [,,,] > (defun minibuffer-quick-update () > (when (>= (length (minibuffer-contents)) minibuffer-quick-min) > (let ((completion-styles '(flex)) > (last-command nil)) > (minibuffer-complete)))) Why `minibuffer-complete`? This will actually perform completion (i.e. it may modify the content of the minibuffer). I think you want to use `minibuffer-completion-help` instead (and I'm not sure why you bind `completion-styles` since it will only take effect during the display but not when the user finally hits RET). Also, you probably want to run this within a `while-no-input` of some kind. Stefan