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: Tue, 28 Jan 2020 23:54:29 +0200 Organization: LINKOV.NET Message-ID: <87eevje3tm.fsf@mail.linkov.net> References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="6410"; 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: Dmitry Gutov , "emacs-devel@gnu.org" To: ndame Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Jan 29 00:17:55 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 1iwa7G-0001Zg-Ha for ged-emacs-devel@m.gmane-mx.org; Wed, 29 Jan 2020 00:17:54 +0100 Original-Received: from localhost ([::1]:38557 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iwa7F-0004rR-KF for ged-emacs-devel@m.gmane-mx.org; Tue, 28 Jan 2020 18:17:53 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48284) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iwa6Q-0004NK-JK for emacs-devel@gnu.org; Tue, 28 Jan 2020 18:17:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iwa6M-0004pr-AR for emacs-devel@gnu.org; Tue, 28 Jan 2020 18:16:59 -0500 Original-Received: from crocodile.birch.relay.mailchannels.net ([23.83.209.45]:36334) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iwa6K-0004gB-PA for emacs-devel@gnu.org; Tue, 28 Jan 2020 18:16:57 -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 5B979601455; Tue, 28 Jan 2020 23:16:53 +0000 (UTC) Original-Received: from pdx1-sub0-mail-a93.g.dreamhost.com (100-96-6-67.trex.outbound.svc.cluster.local [100.96.6.67]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id D492B600B5D; Tue, 28 Jan 2020 23:16:52 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jurta@jurta.org Original-Received: from pdx1-sub0-mail-a93.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); Tue, 28 Jan 2020 23:16:53 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jurta@jurta.org X-MailChannels-Auth-Id: dreamhost X-Shrill-Towering: 48e038221c7486d2_1580253413186_1824209960 X-MC-Loop-Signature: 1580253413186:3161743987 X-MC-Ingress-Time: 1580253413186 Original-Received: from pdx1-sub0-mail-a93.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a93.g.dreamhost.com (Postfix) with ESMTP id 5BDE180F9D; Tue, 28 Jan 2020 15:16:47 -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=sBWscH0smhz2C+0i5YrBzT/fVJc=; b= WvJxvcAXysGhssGwTF/MA3KZ0i37AkBuKbBK2zQL+sUQvr8Ia2n2OjZfy7yF5MFs c49J8gueswMfNiLAC0q7ZzDnao1/1Aop1jNpE+7kDYItVCt7BLl7GIf6J4c8ciCN Ggyf3l/+vUDwBnQYitMqM2PCsMhYsBq0b5h/AY6G75E= 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-a93.g.dreamhost.com (Postfix) with ESMTPSA id EF13480F9A; Tue, 28 Jan 2020 15:16:44 -0800 (PST) X-DH-BACKEND: pdx1-sub0-mail-a93 In-Reply-To: (ndame's message of "Fri, 3 Jan 2020 05:39:47 +0000 (GMT)") X-VR-OUT-STATUS: OK X-VR-OUT-SCORE: -100 X-VR-OUT-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedugedrfeeggdduieehucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgdpffftgfetoffjqffuvfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufhofhffjgfkfgggtgesthdtredttdertdenucfhrhhomheplfhurhhiucfnihhnkhhovhcuoehjuhhriheslhhinhhkohhvrdhnvghtqeenucfkphepledurdduvdelrddutdehrdduvdeinecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmohguvgepshhmthhppdhhvghlohepmhgrihhlrdhjuhhrthgrrdhorhhgpdhinhgvthepledurdduvdelrddutdehrdduvdeipdhrvghtuhhrnhdqphgrthhhpefluhhrihcunfhinhhkohhvuceojhhurhhisehlihhnkhhovhdrnhgvtheqpdhmrghilhhfrhhomhepjhhurhhisehlihhnkhhovhdrnhgvthdpnhhrtghpthhtohepvghmrggtshhushgvrhesfhhrvggvmhgrihhlrdhhuh X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 23.83.209.45 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:244732 Archived-At: >> There are several. For M-x, the easiest one to try out is 'M-x icomplete-mode'. >> Turn it on and see how you like the new 'M-x' experience. > > I tried it. It has the immediate feedback, but it still requires > pressing TABs, lacks flex matching and has no recency bias. Indeed, flex matching should be customized separately for icomplete-mode (tho fido-mode uses it by default), but actually none of them requires pressing TABs, and both have recency bias. > Also, the horizontal format makes it only suitable for selecting from > short items. When you have long items in your candidate list > (e.g. different long paths from all over the file sytem) then it > doesn't work. That's why modern systems use a vertical display, > or support it also, besides the horizontal format. Using a vertical display while keeping instant feedback of icomplete-mode that doesn't require pressing TABs should be easy to do as well: #+BEGIN_SRC emacs-lisp (define-minor-mode minibuffer-quick-mode "Toggle minibuffer quick completion mode." :global t :group 'minibuffer (if minibuffer-quick-mode (add-hook 'minibuffer-setup-hook 'minibuffer-quick-setup) (remove-hook 'minibuffer-setup-hook 'minibuffer-quick-setup))) (defun minibuffer-quick-setup () (add-hook 'post-command-hook #'minibuffer-quick-update nil t)) (defvar minibuffer-quick-min 1 "Minimal length of minibuffer contents to show completion.") (defun minibuffer-quick-update () (when (>= (length (minibuffer-contents)) minibuffer-quick-min) (let ((completion-styles '(flex)) (last-command nil)) (minibuffer-complete)))) (minibuffer-quick-mode) #+END_SRC