Subject: Re: bug#72425: 29.2.50; substring (and other PCM styles) fails with candidates containing newlines

From: Stefan Monnier <[email-masked]>
Date: Tue, 13 Aug 2024 20:51:28 -0400

> Patch to fix:
>
> From dfac112fa23d503b671fa5f9901411a4556bf054 Mon Sep 17 00:00:00 2001
> From: Spencer Baugh <[email-masked]>
> 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)))

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.  🙂

        Stefan