From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stephen Berman Newsgroups: gmane.emacs.bugs Subject: bug#38476: 27.0.50; substring completion feature request Date: Fri, 20 May 2022 14:28:23 +0200 Message-ID: <87h75k1j88.fsf@gmx.net> References: <87fti1w6fs.fsf@gmx.net> <87ilq0301d.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21304"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: Stefan Monnier , 38476@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri May 20 14:29:10 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1ns1kk-0005NB-Pp for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 20 May 2022 14:29:10 +0200 Original-Received: from localhost ([::1]:44908 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ns1kj-0001vb-AO for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 20 May 2022 08:29:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57980) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ns1kc-0001v1-8g for bug-gnu-emacs@gnu.org; Fri, 20 May 2022 08:29:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:44008) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ns1kc-0001v1-03 for bug-gnu-emacs@gnu.org; Fri, 20 May 2022 08:29:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ns1kb-0007IW-RL for bug-gnu-emacs@gnu.org; Fri, 20 May 2022 08:29:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stephen Berman Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 20 May 2022 12:29:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 38476 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 38476-submit@debbugs.gnu.org id=B38476.165304971728016 (code B ref 38476); Fri, 20 May 2022 12:29:01 +0000 Original-Received: (at 38476) by debbugs.gnu.org; 20 May 2022 12:28:37 +0000 Original-Received: from localhost ([127.0.0.1]:37905 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ns1kC-0007Ho-VL for submit@debbugs.gnu.org; Fri, 20 May 2022 08:28:37 -0400 Original-Received: from mout.gmx.net ([212.227.15.18]:40363) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ns1k9-0007HV-T9 for 38476@debbugs.gnu.org; Fri, 20 May 2022 08:28:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1653049705; bh=x2BxYzoxpvfC5QtirB8CNZLFZN+6I4jq9dQ5YN3MHyU=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=cCeY9HNJnu1C/JK+L8o4UbkoF67mN1xJGTSWzZE8hmtgZsPK0sH2+fIfkpkrHdA2n VBmvziBXCKyue4yFGQ1Jlagc4ofaaoyxB3u0bfj+6TytgpoRC2cSAakX5+Yqv0nk9X RLRYHAolLjlbrdwmUwXM2PoQkaiGzwj4ZWK/ttwQ= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from strobelfs2 ([89.246.38.130]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1N4hvR-1nhH2s1RAN-011ijg; Fri, 20 May 2022 14:28:25 +0200 In-Reply-To: <87ilq0301d.fsf@gnus.org> (Lars Ingebrigtsen's message of "Fri, 20 May 2022 13:39:58 +0200") X-Provags-ID: V03:K1:QNFLqxB445WMz7JQL2PbwJrJ/hj1R99GzWcG60kdRq0GUaT66o5 fW/bti5paV9UxZ5QcGJvjD19dGmDme7Frj6eOnP/uXwIUVYnxi3cPK4jcdQ526izr8FNWlM MqnnTQhXB24gwQZCnk2qXmpPaA0cpyG2QcU7QPMzJSY60mNXPApV5Y9oYOGktgBoE0Uh3x3 40BHehnPFQdw3YD26Tnhw== X-UI-Out-Filterresults: notjunk:1;V03:K0:rOUZ2TRSUGs=:7bG9J9V5Eq+wcv7vzCxsjd gvj7l9/P1EhFFMPEb7Ws015AI1XqKdIgdALmzgLPDsLY+RzpiPMA4HdmmCXJC3jeClkgkNLBJ qFFyXKTSUdho/w2KovyMVoITAeY9BJ79lCG9ZEIl5VBHdYgNGMT4IAWgMrMwa2Zk1jT0aFyge oSmcTuCVTEJ57kfI0V27Zt9mUch/Yjy5Ms8viDC8M6mVpKCJjXY/XFUVOQkuOxwpU2me+uTrS k3ci2mKA8t1xSVyMEOhj/H7HHtBJsV0vdsNdBSxdlFBsmL+HsHYQwiV6KUoPwqU03ym3nLl2B O+JmY3xiYbcL3M1Amwg8IW7EXtYNdt/Dilxe0n7TpZLghj/i+qQpRfxfSpFA7EvVE33wrwFqN Ny8y8j8ahIkGh644Vxgf1D6QbrI+jWr4PYL1Xmg3UhCHOOh2nJoWe8ywNVLy+w3TsUe6E6GzI yvHaMUzGZBnnURSHXVkk1D+AuCUozGawS88oFaeNjLayZtvTTP0kvPA69qskSkuoE1t8y/X98 P4Q38iyt/CZWMftMbcgo+KAfbngD4rnavWWXDebUWEvNid+NqIaL4LTURmctMjQ3VP8HoLvRG q4MVdaXDFbgIL3o9i5p2XqRr3MHMJ/yvIoYmS+X3dfGfpSUPWV+zPyeAVDgcm+dZNL19nDn/u e8PitwpLoY1dXOCY9ZxsUBdNa/N8Y7LLh3ZU46dXJwNU8w7EZ29zZZ28t2MeCRI8HFkMcNmyA ZKgkfxRpyahjuRLhJxQumWk0r4q2/DQCZwyrQ0MqhFmiD2qtQ1Gnb7gfP7JmDUkZT0XJVccu X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:232751 Archived-At: On Fri, 20 May 2022 13:39:58 +0200 Lars Ingebrigtsen wrot= e: > Stephen Berman writes: > >> The placement of point in substring completion is sometimes suboptimal. >> E.g. if there two files (or buffers) file1test and file2test and you >> enter `fi TAB' then it completes to `file' with point after the `e', >> which is fine for further input; but if you enter `te TAB' then it >> completes to `test' with point after the second `t', so you have to mov= e >> point to complete the name. It would be nice if in such cases point >> were placed at the start rather than the end of the partial match. > > (I'm going through old bug reports that unfortunately weren't resolved > at the time.) > > I'm not able to reproduce this in Emacs 29 -- it just says "no match" > with "te TAB". Sorry, my bug report was woefully incomplete. It was filed as a followup to bug bug#38458 at the request of Stefan Monnier, but I should have made it self-contained. Here's the recipe: 0. $ mkdir /tmp/test; touch /tmp/test/{file1test,file2test} 1. $ emacs-master -Q --eval "(setq completion-category-overrides '((buffer (styles substring)) (file (styles substring))))" 2. Type `C-x C-f /tmp/test/te TAB' =3D> The minibuffer displays the following, with point at the end of the l= ine: Find file: /tmp/test/test Typing TAB a second time pops up a the *Completions* buffer showing file1test and file2test as the two possible completions. But to complete either of these in the minibuffer you have to move point. That's the bug (or feature request). > With "*te TAB" it completes to file*test with point after *, which seems > correct, too. Yes, that input didn't occur to me when I filed the report. I just now scrolled through the Completion node of the Emacs manual and didn't see a reference to it; is it documented? If not, perhaps it should be. Anyway, using * comes close to satisfying the feature request, so if it's too hard to make it work without the *, I can live with having to use *. Steve Berman