GNU bug report logs - #78719
30.1; [PATCH] Add functions `string-common-prefix' and `string-try-completion'

Previous Next

Package: emacs;

Reported by: Phil Sainty <psainty <at> orcon.net.nz>

Date: Sun, 8 Jun 2025 12:05:01 UTC

Severity: normal

Tags: patch

Found in version 30.1

Full log


View this message in rfc822 format

From: Phil Sainty <psainty <at> orcon.net.nz>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: mail <at> daniel-mendler.de, juri <at> linkov.net, monnier <at> iro.umontreal.ca, drew.adams <at> oracle.com, 78719 <at> debbugs.gnu.org
Subject: bug#78719: 30.1; [PATCH] Add functions `string-common-prefix' and `string-try-completion'
Date: Sun, 29 Jun 2025 15:45:14 +1200
On 2025-06-11 03:32, Eli Zaretskii wrote:
>> (string-common-prefix COLLECTION &optional IGNORE-CASE STRING
>> REGEXP-LIST PREDICATE)
> 
> I think STRING should come before IGNORE-CASE.  Otherwise, LGTM,
> thanks.

I've pushed the revisions to scratch/string-common-prefix

After fetching, the revised changes will be:

git diff master...origin/scratch/string-common-prefix


My remaining niggle about having STRING before IGNORE-CASE is that
STRING, REGEXP-LIST, and PREDICATE all fall under the same category
of "filtering the COLLECTION prior to determining a common prefix",
so this order interrupts that logical grouping.

I've described the three filtering arguments together as a group in
the documentation, for better readability.  I don't mind switching
the order in the code to match if you change your mind about that;
otherwise I think this is ready to go, if you don't spot any issues.


-Phil





This bug report was last modified 57 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.