From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eshel Yaron Newsgroups: gmane.emacs.devel Subject: Re: master 6b7ff60a5e7: Highlight the suffix in *Completions* buffer in 'basic' style too Date: Thu, 13 Jun 2024 16:51:40 +0200 Message-ID: References: <171823002031.28307.18221225159709452537@vcs2.savannah.gnu.org> <20240612220700.A0F4DC1FB4C@vcs2.savannah.gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6621"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: emacs-devel@gnu.org To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Jun 13 16:52:54 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 1sHlos-0001Vr-5Z for ged-emacs-devel@m.gmane-mx.org; Thu, 13 Jun 2024 16:52:54 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sHlnn-0002Ln-Jy; Thu, 13 Jun 2024 10:51:47 -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 1sHlnm-0002LG-Pw for emacs-devel@gnu.org; Thu, 13 Jun 2024 10:51:46 -0400 Original-Received: from mail.eshelyaron.com ([107.175.124.16] helo=eshelyaron.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sHlnk-0001R9-FM for emacs-devel@gnu.org; Thu, 13 Jun 2024 10:51:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eshelyaron.com; s=mail; t=1718290302; bh=Nv1n3stiTsPSX0ySia38md6xpU6j5BDUpgLLg4mfO2M=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=Pz5qGXOMUD9ltGvFEs6G8Qn65tKUDJqFWU6CMseLRjtjkYjtrEp31W3hO6pCNaN9A 3m0nfrg/zWPQW5y0gQy1QeCSsy+dvmzLy9Mr5zc5Ann0hU0FgPoO9Ou0x+4WutyTUr IXxPongZDDjxU6jgZbhwJ3rwh5sTJ2rf4UT9PI6vgKGjeo+GaFW5JePcJP2rFNSGGG r6CfEizOJj0B04KLWKV5UpIboI+VB8HzK3X/9+yOm4fEhOnZvUiZ1TsxCkPQbLVp5G Dce8vlgQVm0AAdG0Zd5DzV8k10p/xwRVZrNRMj6KawhoO9WQZ4p1fp7Usg+YN65V7L jGlJ9D5J1nFUw== In-Reply-To: (Dmitry Gutov's message of "Thu, 13 Jun 2024 17:11:00 +0300") Received-SPF: pass client-ip=107.175.124.16; envelope-from=me@eshelyaron.com; helo=eshelyaron.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, 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:320025 Archived-At: Dmitry Gutov writes: > 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. ;) No problem :) >> 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. Done in commit 56537ab0228. Eshel