From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#65137: 29.1; completion-substring-try-completion doesn't return the longest common substring Date: Fri, 25 Aug 2023 03:40:43 +0300 Message-ID: <665cd10a-17d9-5586-927e-12b2808c0a71@gutov.dev> References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23583"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 To: Spencer Baugh , 65137@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Aug 25 02:41:25 2023 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 1qZKt8-0005vH-Ok for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 25 Aug 2023 02:41:23 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qZKsl-0005I2-Qj; Thu, 24 Aug 2023 20:40:59 -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 ) id 1qZKsk-0005Hu-II for bug-gnu-emacs@gnu.org; Thu, 24 Aug 2023 20:40:58 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qZKsk-00079u-84 for bug-gnu-emacs@gnu.org; Thu, 24 Aug 2023 20:40:58 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qZKso-00029R-8A for bug-gnu-emacs@gnu.org; Thu, 24 Aug 2023 20:41:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 25 Aug 2023 00:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65137 X-GNU-PR-Package: emacs Original-Received: via spool by 65137-submit@debbugs.gnu.org id=B65137.16929240608254 (code B ref 65137); Fri, 25 Aug 2023 00:41:02 +0000 Original-Received: (at 65137) by debbugs.gnu.org; 25 Aug 2023 00:41:00 +0000 Original-Received: from localhost ([127.0.0.1]:38834 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qZKsl-000294-Sn for submit@debbugs.gnu.org; Thu, 24 Aug 2023 20:41:00 -0400 Original-Received: from out2-smtp.messagingengine.com ([66.111.4.26]:47693) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qZKsj-00028k-3x for 65137@debbugs.gnu.org; Thu, 24 Aug 2023 20:40:58 -0400 Original-Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 9A31B5C0294; Thu, 24 Aug 2023 20:40:45 -0400 (EDT) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Thu, 24 Aug 2023 20:40:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm3; t= 1692924045; x=1693010445; bh=ASGWAdo+sa+qwsZCajqgqLPXed2w9h6dKq4 hFeSAa+c=; b=TwvtiVN/u4o+XHyNJzFAnfUwUS2+CqoxPCPzut0wArwi+L7G1ES fHQZXkvyrIjCASghZILheDPqPlbtUr/hKw5xIcqLU/5qI7Spa800jPrwIp3rSZJB MEI1QQKsMxMDM+SmNcLvK2O1wJO8GEAPwTJBhtd16l360UaiGhEquVe4h7s2/aQR yAorEmTSnIdxnp5VRnfWKvuvz8kUahSufxPmzUZYTaA9ulitSLiRawnhOYnA/L+N c6QLKEggXJ0LApPfstcVCy8uv1TZ16TZ4oqosiRlyidbz6IyK/ReGhp93pYAwIEt 3jVKcwkEHoK8rPWgmdxdpbq7SO3WjscGoYw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1692924045; x= 1693010445; bh=ASGWAdo+sa+qwsZCajqgqLPXed2w9h6dKq4hFeSAa+c=; b=E j/9FbF6FtbP8lIl2djUMCgOdESizV56m002dnoXb58dzCAu3POxTeZ2jW2hWUMfm vhFYmkRncrWnYKZtaP/OWFfsjlAqp52iQokgbN4wlGRq89U1Esb+7VzumHnaiume eUzqZyG4JP60xjUnM/lJ1mosDsWEcbqPHkTPW2M/JV5TpEDh3oD16Y3mKC4rd1UM IdZk5jjv6nhgdBbXihBm0IX/QaMJA0r0MP0E7n34MqBLAGhnb5zD60LPE1+vLl/n wplnxI+ngBfZtvMOPUxm+vuvnrMVQO9Oc1o/cll3ix1Iaengaj4+6EGEEMpzydUY +oURVQdvYWlKtOg0X0bsg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedruddvjedgfeeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvfhfhjggtgfesthejredttdefjeenucfhrhhomhepffhmihht rhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvghvqeenucggtffrrghtth gvrhhnpeeghedthedujeeiteeutddtjeekheejteeukeehffdutdejuedvfeevueeviedu udenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegumh hithhrhiesghhuthhovhdruggvvh X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 24 Aug 2023 20:40:44 -0400 (EDT) Content-Language: en-US In-Reply-To: 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:268374 Archived-At: Hi Spencer! On 08/08/2023 02:24, Spencer Baugh wrote: > However, even this does not work in the project-file and xref-location > completion categories, for which the "basic" style is not included in > completion-category-defaults. For such completion categories, there's > simply no way to use completion to insert a common prefix. This is bad, > because a filename or identifier might easily be a prefix of another > filename or identifier. Could you describe the usage scenario a little more? From my brief testing, the current behavior seems okay most of the time: you still get the short input which matches a bunch of strings (e.g. filenames), you can type a little more chars and narrow down. With your change, TAB will insert the most common prefix for all those completions, which in case of project-file can be a pretty long string. Not a huge problem, but on the face of it that doesn't seem like an improvement. So which scenario would that make better?