From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Spencer Baugh Newsgroups: gmane.emacs.bugs Subject: bug#72425: 29.2.50; substring (and other PCM styles) fails with candidates containing newlines Date: Fri, 02 Aug 2024 12:17:19 -0400 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26233"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Dmitry Gutov , Stefan Monnier To: 72425@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Aug 02 18:17:50 2024 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 1sZuyT-0006fW-7O for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 02 Aug 2024 18:17:49 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sZuyQ-0007v5-1C; Fri, 02 Aug 2024 12:17:46 -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 1sZuyN-0007nX-VM for bug-gnu-emacs@gnu.org; Fri, 02 Aug 2024 12:17:44 -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 1sZuyN-000439-Kh for bug-gnu-emacs@gnu.org; Fri, 02 Aug 2024 12:17:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=Ut2wW9VsDWeYlu0W5VYxZmRn4bUN/kNDovtmIZNwXAI=; b=Cj7k7ZS+dvZecaHjrpjKXzK3iv0bGOZ0kAZ5n3sFl+0wvv3goAL+9S4jwl5rqVkOghZb8W3HjW5I0KU47U4k7YCIcV2BY0i827A/ET8m9CMz9k5P3n+R9iVWzLYWC4XaADdLRgQq99wlK6KTiFAQdWWXlkNhdp8ZiqKUWDFoZjLfMwOm00gEgRfLzS8/c1TjgTS2Do1q5N+aoINGPSe5dCfd7HjkTARNBuvRaTxC1F9J6RBoBFOuy+8XrMq8sbRJXWP/JkhRC1R+D91MZW83WowQwO+/3d4Udko63tgQ7HOuxvDgVOvNZlaan8H0xlnWnvozdDAa2GvrmT+xNga0iA==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sZuyg-00059R-0w for bug-gnu-emacs@gnu.org; Fri, 02 Aug 2024 12:18:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Spencer Baugh Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 02 Aug 2024 16:18:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72425 X-GNU-PR-Package: emacs Original-Received: via spool by 72425-submit@debbugs.gnu.org id=B72425.172261546519775 (code B ref 72425); Fri, 02 Aug 2024 16:18:01 +0000 Original-Received: (at 72425) by debbugs.gnu.org; 2 Aug 2024 16:17:45 +0000 Original-Received: from localhost ([127.0.0.1]:53697 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sZuyP-00058s-6T for submit@debbugs.gnu.org; Fri, 02 Aug 2024 12:17:45 -0400 Original-Received: from mxout1.mail.janestreet.com ([38.105.200.78]:51125) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sZuyN-00058e-5n for 72425@debbugs.gnu.org; Fri, 02 Aug 2024 12:17:43 -0400 In-Reply-To: (Spencer Baugh's message of "Fri, 02 Aug 2024 12:14:56 -0400") DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com; s=waixah; t=1722615439; bh=Ut2wW9VsDWeYlu0W5VYxZmRn4bUN/kNDovtmIZNwXAI=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=GyQazKS1iix+FBLW1jHiNETUwNB92Pl8oQIZjvg48MkxOUxp8nZ3OQo0sAe+LVaiM je8Pep1vDTpN7QLuvZlgdiksL9I6N3SDRssBmZct8diNUCtn9M2D6vHfh+jXOje2qp FRyIFC4Rq5eINVYP4gHdBnp2xB4N+l4do8X9ehDhVwEyPKMjS7IYW45RU1DceCHq2Z NAAIF4zhtBhsc2+6XrQLRLmu1OJtHr/avO0MVTZ1WmvhFEF1u4OhWSzoRhSm0JW+J2 xTmFXsIxYSyF8RLoP1jVdERv4m2LOVHWc1FvE4FCUQJcCNXix0Y/dSqqS7ROCGRDdI J1Cl6o6DyyxXA== 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:289645 Archived-At: --=-=-= Content-Type: text/plain Patch to fix: --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-Fix-partial-completion-for-completion-candidates-con.patch >From dfac112fa23d503b671fa5f9901411a4556bf054 Mon Sep 17 00:00:00 2001 From: Spencer Baugh Date: Fri, 2 Aug 2024 12:15:58 -0400 Subject: [PATCH] Fix partial-completion for completion candidates containing newlines partial-completion tries to match a pattern containing wildcards (such as `any' or `prefix') against completion candidates. Wildcards are supposed to match any sequence of characters, but completion-pcm--pattern->regex transformed the wildcards into ".*", which won't match sequences containing newlines. Fix this to properly match anything by using "[^z-a]*" instead. (That's (rx (* anything))) * lisp/minibuffer.el (completion-pcm--pattern->regex): Fix regex. (bug#72425) --- lisp/minibuffer.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index 5860c4238c2..cefd4247370 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el @@ -3896,7 +3896,7 @@ completion-pcm--pattern->regex (t (let ((re (if (eq x 'any-delim) (concat completion-pcm--delim-wild-regex "*?") - ".*?"))) + "[^z-a]*?"))) (if (if (consp group) (memq x group) group) (concat "\\(" re "\\)") re))))) -- 2.39.3 --=-=-=--