[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#70217: [PATCH] Add substring-partial-completion style
From: |
Spencer Baugh |
Subject: |
bug#70217: [PATCH] Add substring-partial-completion style |
Date: |
Tue, 28 May 2024 14:51:37 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Eli Zaretskii <eliz@gnu.org> writes:
>> From: Spencer Baugh <sbaugh@janestreet.com>
>> Cc: 70217@debbugs.gnu.org, monnier@iro.umontreal.ca
>> Date: Tue, 28 May 2024 14:16:30 -0400
>>
>> > and (b) please do not use examples with repeated characters, because
>> > they can lead readers to make the wrong conclusions due to accidental
>> > situations. For example, AFAIU valid candidates for "b*/c*" include
>> > "bcdxyz/c1234" and also "b/x/y/z/c/1/2/3", but readers might
>> > mistakenly think that "b*" stands for a string made only of "b", or
>> > that there can be only one slash and it must precede "c". Avoiding
>> > repeated characters prevents such misunderstandings.
>>
>> Excellent point, fixed.
>
> Thanks.
>
>> > But please (a) don't use "glob" and file wildcard notation, use
>> > regexps instead;
>>
>> True, I removed the word "glob", I agree that's confusing since
>> e.g. [a-z] or {foo,bar} are valid globs but not valid in
>> partial-completion.
>>
>> Note however that "*" is literally valid syntax with partial-completion,
>> where as the regexp notation (".*") is not. The partial-completion
>> documentation already mentions this in (info "(emacs) Completion
>> Styles"). So I slightly reworded it and continued using "*".
>
> Please don't. I really meant what I wrote: "glob" is confusing to
> users, because of the file-name wildcards connotation.
>
> The natural way of describing string patterns in Emacs is regular
> expressions, not globs.
Just to be clear, if you type C-h v ffap-*-path TAB it will complete to
variables whose name starts with "ffap-" and end with "-path". This is
a partial-completion feature which has nothing to do with globs.
I agree that the natural way of describing string patterns in Emacs is
regular expressions, not globs. There are no globs in this docstring.
I am mentioning only * which is what partial-completion natively
supports. * has nothing to do with globs, it is a feature of
partial-completion which is similar but distinct from shell globs.
partial-completion works in terms of * not regular expressions, so it
would be confusing to use a regular expression here.
- bug#70217: [PATCH] Add substring-partial-completion style, (continued)
- bug#70217: [PATCH] Add substring-partial-completion style, Eli Zaretskii, 2024/05/26
- bug#70217: [PATCH] Add substring-partial-completion style, Spencer Baugh, 2024/05/26
- bug#70217: [PATCH] Add substring-partial-completion style, Eli Zaretskii, 2024/05/26
- bug#70217: [PATCH] Add substring-partial-completion style, Spencer Baugh, 2024/05/28
- bug#70217: [PATCH] Add substring-partial-completion style, Eli Zaretskii, 2024/05/28
- bug#70217: [PATCH] Add substring-partial-completion style, Spencer Baugh, 2024/05/28
- bug#70217: [PATCH] Add substring-partial-completion style, Eli Zaretskii, 2024/05/28
- bug#70217: [PATCH] Add substring-partial-completion style,
Spencer Baugh <=
- bug#70217: [PATCH] Add substring-partial-completion style, Eli Zaretskii, 2024/05/28
- bug#70217: [PATCH] Add substring-partial-completion style, Spencer Baugh, 2024/05/28