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


Message #101 received at 78719 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Phil Sainty <psainty <at> orcon.net.nz>
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: Re: bug#78719: 30.1; [PATCH] Add functions `string-common-prefix'
 and `string-try-completion'
Date: Fri, 18 Jul 2025 09:29:16 +0300
> Date: Fri, 18 Jul 2025 16:01:08 +1200
> From: Phil Sainty <psainty <at> orcon.net.nz>
> Cc: Eli Zaretskii <eliz <at> gnu.org>, monnier <at> iro.umontreal.ca,
>  78719 <at> debbugs.gnu.org, drew.adams <at> oracle.com, juri <at> linkov.net
> 
> On 2025-07-06 03:29, Daniel Mendler wrote:
> > Then we can maybe convince Eli that the following calling convention is
> > better, since the filtering arguments STRING and REGEXP-LIST are
> > deprioritized? The STRING and REGEXP-LIST arguments are
> > completion-related, while IGNORE-CASE is needed for basic
> > case-insensitive prefix computation.
> > 
> > (string-common-prefix LIST &optional IGNORE-CASE STRING REGEXP-LIST)
> > 
> > Alternatively we could go with the simplest form and suggest to use
> > `try-completion' if additional filtering is needed.
> > 
> > (string-common-prefix LIST &optional IGNORE-CASE)
> 
> I'm happy to proceed with either option.

My vote is for the much simpler latter API, even after reading your
benchmarks.  I thought having such a simple API was the goal from the
get-go.




This bug report was last modified 58 days ago.

Previous Next


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