GNU bug report logs -
#78719
30.1; [PATCH] Add functions `string-common-prefix' and `string-try-completion'
Previous Next
Full log
View this message in rfc822 format
> I think it is confusing if the function respects the
> `completion-regexp-list' and `completion-ignore-case' dynamic
> variables,
Strong agreement, here. It's arguably already a problem to use those
dynbound variables in `try-completion`, so it's even worse here for
a function which wants to be unrelated to completion.
> and if we end up with three functions
> `try-completion', `string-try-completion', and
> `completions-try-completion'.
>
> Why not only provide a single function `string-expand-prefix' with
> additional keyword or optional arguments:
>
> (cl-defun string-common-prefix (strings &key ignore-case regexps predicate))
The "try completion" part of the name sounds like it's motivated by the
historical accident of how we got to it, so if we want to help those
who're not familiar with (or thinking about) completion, a name like
`string-common-prefix` sounds better, indeed.
Do we have reasons to believe callers will want/need those `&key`
arguments? My gut tells me we don't need the `predicate` and
`regexps` options.
> (cl-defun string-common-prefix (strings &key prefix ignore-case regexps predicate))
At this point, you might as well call `try-completion`.
Stefan
This bug report was last modified 5 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.