From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: Emacs should provide more modern item completion out of the box Date: Thu, 30 Jan 2020 01:00:28 +0200 Organization: LINKOV.NET Message-ID: <87v9otkgvn.fsf@mail.linkov.net> 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="3763"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.60 (x86_64-pc-linux-gnu) Cc: ndame , "emacs-devel@gnu.org" , Dmitry Gutov To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Jan 30 00:45:56 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 1iwx1u-0000vU-OZ for ged-emacs-devel@m.gmane-mx.org; Thu, 30 Jan 2020 00:45:54 +0100 Original-Received: from localhost ([::1]:53072 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iwx1t-00045c-Op for ged-emacs-devel@m.gmane-mx.org; Wed, 29 Jan 2020 18:45:53 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40538) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iwx0a-0002dv-78 for emacs-devel@gnu.org; Wed, 29 Jan 2020 18:44:33 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iwx0Z-0003XZ-4c for emacs-devel@gnu.org; Wed, 29 Jan 2020 18:44:32 -0500 Original-Received: from bisque.elm.relay.mailchannels.net ([23.83.212.18]:51758) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iwx0Y-0003Vp-SI for emacs-devel@gnu.org; Wed, 29 Jan 2020 18:44:31 -0500 X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 5F885141DF1; Wed, 29 Jan 2020 23:44:29 +0000 (UTC) Original-Received: from pdx1-sub0-mail-a85.g.dreamhost.com (100-96-92-25.trex.outbound.svc.cluster.local [100.96.92.25]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id E56E9141BD8; Wed, 29 Jan 2020 23:44:28 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from pdx1-sub0-mail-a85.g.dreamhost.com ([TEMPUNAVAIL]. [64.90.62.162]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.18.5); Wed, 29 Jan 2020 23:44:29 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Irritate-Belong: 16f275eb126ccfe5_1580341469210_511882062 X-MC-Loop-Signature: 1580341469210:4256521935 X-MC-Ingress-Time: 1580341469210 Original-Received: from pdx1-sub0-mail-a85.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a85.g.dreamhost.com (Postfix) with ESMTP id 685D07F012; Wed, 29 Jan 2020 15:44:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=linkov.net; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=linkov.net; bh=HDMAzcNN3bNdCNBk41AHxas/AWY=; b= JfjHXOkvX+4obg+O8KSd6dXa13ztA3qv6pXFIqZZtrj2W47MWb5M/gJb3wKK7tvo 1hKet+QkaUsVBihJjvmbckA9FTp1Tcw1SJq7mKIwUJzSe0uOKyt0RrvdFbX7YgR6 sJR72rpp1yqbBK9aPCWnvPMReyC60xODMsFxsfuZQ74= Original-Received: from mail.jurta.org (m91-129-105-126.cust.tele2.ee [91.129.105.126]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: jurta@jurta.org) by pdx1-sub0-mail-a85.g.dreamhost.com (Postfix) with ESMTPSA id D12A97F009; Wed, 29 Jan 2020 15:44:24 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a85 In-Reply-To: (Stefan Monnier's message of "Tue, 28 Jan 2020 22:09:06 -0500") X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedugedrfeejgdduudcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucggtfgfnhhsuhgsshgtrhhisggvpdfftffgtefojffquffvnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffuohhfffgjkfgfgggtsehttdertddtredtnecuhfhrohhmpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqnecukfhppeeluddruddvledruddthedruddvieenucevlhhushhtvghrufhiiigvpedvnecurfgrrhgrmhepmhhouggvpehsmhhtphdphhgvlhhopehmrghilhdrjhhurhhtrgdrohhrghdpihhnvghtpeeluddruddvledruddthedruddviedprhgvthhurhhnqdhprghthheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqedpmhgrihhlfhhrohhmpehjuhhriheslhhinhhkohhvrdhnvghtpdhnrhgtphhtthhopehmohhnnhhivghrsehirhhordhumhhonhhtrhgvrghlrdgtrg X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 23.83.212.18 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:244758 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 Ah, I completely forgot about the key `?' (never used it since TAB is more DWIM-ish). > (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). This part I don't understand - it seems its main point is to take effect during the display. But anyway completion styles should be customized separately, e.g. I think 'partial-completion' is more usable than 'flex' :) > Also, you probably want to run this within a `while-no-input` of some kind. 'while-no-input' feels still too laggy when tried with this: (defun minibuffer-quick-update () (when (and minibuffer-completion-table (>= (length (minibuffer-contents)) minibuffer-quick-min)) (let ((non-essential t)) (while-no-input (minibuffer-completion-help))))) Maybe better to use run-with-idle-timer that could be customized with a number of seconds to delay.