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.devel Subject: Re: master 6b7ff60a5e7: Highlight the suffix in *Completions* buffer in 'basic' style too Date: Thu, 13 Jun 2024 17:11:00 +0300 Message-ID: References: <171823002031.28307.18221225159709452537@vcs2.savannah.gnu.org> <20240612220700.A0F4DC1FB4C@vcs2.savannah.gnu.org> 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="26631"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird To: Eshel Yaron , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Jun 13 16:11:48 2024 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 1sHlB6-0006ki-4h for ged-emacs-devel@m.gmane-mx.org; Thu, 13 Jun 2024 16:11:48 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sHlAT-0004H4-DM; Thu, 13 Jun 2024 10:11:09 -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 1sHlAS-0004GV-1K for emacs-devel@gnu.org; Thu, 13 Jun 2024 10:11:08 -0400 Original-Received: from wfhigh5-smtp.messagingengine.com ([64.147.123.156]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sHlAP-0001wI-IZ for emacs-devel@gnu.org; Thu, 13 Jun 2024 10:11:07 -0400 Original-Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailfhigh.west.internal (Postfix) with ESMTP id D567018000A6; Thu, 13 Jun 2024 10:11:03 -0400 (EDT) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Thu, 13 Jun 2024 10:11:04 -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:subject:subject:to:to; s=fm3; t=1718287863; x=1718374263; bh=mTLI0kS78trSsdZWzWGoTtR6OamECSTSQ4msvzgpa8o=; b= QwPeJCHNziZWzRB7+COv/0LfxDoBIHLgKAI8Jke6VcIs0xyYxQmmNYM0T4FayGA0 E+S/L+FTLRsqGduE285Ro9GUIvBZed0+7xCPhffioU/Q8bj+Mq5GteUCupDWLi3M nKKOr8vPDIKAV3z/yKwSyK2DfYU5GFthrZJgOApv5mqwBoAep8pjeiKsOd9mpILd fbTZGfO9QWZJNNYfJwCLobpaj5gh93WVHfl2Ysj8d8kIIENpvVHwARb9POu0golL SH/Y+q9YZHUaomTlatIi1Q4LTL/elzU6sTvm0jqWosfP4Zj/OpjSDpjcckCDRKzg uEEH2oKJgjFkZEa+Px5bSA== 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:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1718287863; x= 1718374263; bh=mTLI0kS78trSsdZWzWGoTtR6OamECSTSQ4msvzgpa8o=; b=Y 8kg592wQXcACkZKrrzKrmL73rLVArjiuKYLaDvXjpPMIC5lJpZg9j3jRpZngBC3B MbxeyVb2JuVUQfH5lgyfcJ8jHOOTm+Q13GS04YRygcRR5cecqjmgmv1tmLiH/6py 20wbHKb7edh8Hlc1oY8Bfi3ZqVudsZtDGgrbiUUX0gW3ASmJQ1ZQHjcS4myo6W/S uV1bFqrHM8bYulhG//nknjrowY8mQHWzRM817sCQXD1FEyYU/UjMoqcNzh6yCs8l z8igkRZVqyJuMkx9EJe3gQ0KFwUI2u8jbZXSVRSCi28RFhVxm6ntH4P7cBY+AKll 5Gq+oXvnhUqzJ++y4+znw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrfedujedgjedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefkffggfgfuvfhfhfgjtgfgsehtje ertddtvdejnecuhfhrohhmpeffmhhithhrhicuifhuthhovhcuoegumhhithhrhiesghhu thhovhdruggvvheqnecuggftrfgrthhtvghrnheptdfhuedvtdevleegueelvedvjeevhe ffveevhedvuefftdefhfdvueeggfetgfdtnecuvehluhhsthgvrhfuihiivgeptdenucfr rghrrghmpehmrghilhhfrhhomhepughmihhtrhihsehguhhtohhvrdguvghv X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 13 Jun 2024 10:11:02 -0400 (EDT) Content-Language: en-US In-Reply-To: Received-SPF: pass client-ip=64.147.123.156; envelope-from=dmitry@gutov.dev; helo=wfhigh5-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:320023 Archived-At: Hi! On 13/06/2024 11:20, Eshel Yaron wrote: > Note that unlike completion-hilit-commonality, > completion-pcm--hilit-commonality does not add the base size to the last > cdr of the result. So this breaks e.g. file name completion: > > 1. emacs -Q in emacs.git checkout root directory > 2. C-x C-f lisp/fo TAB > 3.*Completions* pops up with some completion candidates > 4. M- > > The minibuffer should now contain something like > ~/checkouts/emacs/lisp/foldout.el but after this commit it instead > contains just foldout.el. Thanks for your vigilance. ;) > Something like the following should fix this issue: > > diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el > index 144cda8cfdc..0a0b17b3850 100644 > --- a/lisp/minibuffer.el > +++ b/lisp/minibuffer.el > @@ -3816,7 +3816,9 @@ completion-basic-all-completions > 'point > (substring afterpoint 0 (cdr bounds))))) > (all (completion-pcm--all-completions prefix pattern table pred))) > - (completion-pcm--hilit-commonality pattern all))) > + (when all > + (nconc (completion-pcm--hilit-commonality pattern all) > + (car bounds))))) > > ;;; Partial-completion-mode style completion. Please install, if you have access.