From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#72425: 29.2.50; substring (and other PCM styles) fails with candidates containing newlines Date: Tue, 13 Aug 2024 20:51:28 -0400 Message-ID: References: Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="23736"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 72425@debbugs.gnu.org, Dmitry Gutov To: Spencer Baugh Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Aug 14 02:52:47 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 1se2Fq-00064v-M0 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 14 Aug 2024 02:52:46 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1se2Fa-00031Y-Gx; Tue, 13 Aug 2024 20:52:30 -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 1se2FY-00031M-Rj for bug-gnu-emacs@gnu.org; Tue, 13 Aug 2024 20:52:28 -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 1se2FY-0003bQ-1t for bug-gnu-emacs@gnu.org; Tue, 13 Aug 2024 20:52:28 -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=9JapUMshcUL/g6w6Ya4HSfRKLPpmGiF9zcftvuyDSuA=; b=Q3soNNQdmEtR6tua3v1cs0YQdEDKor78xhkeGwbcRU5MNgJfPnKNNXR8n1TwWInqHwUpdKsuLpe/Sg4gJUAxnHQD1cRvC4q/tXzKzFkrA0zOrZ463tVPWN/TcZDh28mBTjIkiW8RfXTwyLfU/RIxDkX5DMEEWqA757aqMNyDgisbzxM8aCe1VYaSXB0fDwIapPUwqewOnsnVrIZ+DN6kdYfQE7rJiKe9TtCVMB7j/sjN2l2h5OYZMR92ZAJWPmxY2u4Ca6Q6luqQiv5tlbmCeWJwzWxVBdynWxcflmskAGbJ1i0NZXKe3i32+1vSx5/fvLGoPA3vGvLAbgQnpfuAvQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1se2G6-0000T0-3N for bug-gnu-emacs@gnu.org; Tue, 13 Aug 2024 20:53:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 14 Aug 2024 00:53:02 +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.17235967341713 (code B ref 72425); Wed, 14 Aug 2024 00:53:02 +0000 Original-Received: (at 72425) by debbugs.gnu.org; 14 Aug 2024 00:52:14 +0000 Original-Received: from localhost ([127.0.0.1]:45737 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1se2FK-0000RY-2T for submit@debbugs.gnu.org; Tue, 13 Aug 2024 20:52:14 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:62212) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1se2FI-0000RG-2x for 72425@debbugs.gnu.org; Tue, 13 Aug 2024 20:52:12 -0400 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 8EE60808A4; Tue, 13 Aug 2024 20:51:31 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1723596689; bh=4i/bCgx++UIykA5+Zjht4+yNAbBsxIDAeFetIVJCYxw=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=GaG76uBhPpMi567KkUF/1BvW6etTdk35/jjqE/aoA63HHD96tjCzGu7Cff1xY6EPN 6Ew2gbOdQLeuHt/XYWyrLYSse9YXg/QrqDt5i023Q6gm9kepGgnFSSreNkoaFx+T3m sFnZs1pV24Eixe7WbQmpcDLjT4F0dBa4+XAcQ1Rx208CrUl0nBCe0vYcyaYoDaaHBl 4IznVpc70GbeJty43LQjiXS/P4s9y+DDWj0UZYcBwuZ5qxOCjucaa1Dlrux3P1SL+7 vxTx/tTZMjRRqSl++gZT1F2nFLcuc9tlRZYhpN0vRlLp1R05fZhqFCVvEzzHsfqtzA YBkJYU1LTXcVA== Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id E248080821; Tue, 13 Aug 2024 20:51:29 -0400 (EDT) Original-Received: from pastel (unknown [216.154.9.87]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id B387D1206B0; Tue, 13 Aug 2024 20:51:29 -0400 (EDT) In-Reply-To: (Spencer Baugh's message of "Fri, 02 Aug 2024 12:17:19 -0400") 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:290102 Archived-At: > Patch to fix: > > 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 contain= ing > 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))) Looks fine to me. I find [^z-a] a bit too magical, so maybe an `rx` pattern would be more clear. My guess is that completion of thingies with newlines is probably going to bump into other problems. =F0=9F=99=82 Stefan