From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Spencer Baugh Newsgroups: gmane.emacs.bugs Subject: bug#70217: [PATCH] Add substring-partial-completion style Date: Tue, 28 May 2024 14:51:37 -0400 Message-ID: References: <86a5kpgdo7.fsf@gnu.org> <86ttilvsy8.fsf@gnu.org> <86ikz0wozc.fsf@gnu.org> <86o78qt1hl.fsf@gnu.org> <86fru1u6km.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4372"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 70217@debbugs.gnu.org, monnier@iro.umontreal.ca To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue May 28 20:52:11 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sC1vf-0000x5-B0 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 28 May 2024 20:52:11 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sC1vP-00080W-1D; Tue, 28 May 2024 14:51:55 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sC1vN-00080E-Cn for bug-gnu-emacs@gnu.org; Tue, 28 May 2024 14:51:53 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sC1vN-0006Nb-1m for bug-gnu-emacs@gnu.org; Tue, 28 May 2024 14:51:53 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sC1vW-0008Nn-5x for bug-gnu-emacs@gnu.org; Tue, 28 May 2024 14:52:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Spencer Baugh Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 28 May 2024 18:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70217 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 70217-submit@debbugs.gnu.org id=B70217.171692231532204 (code B ref 70217); Tue, 28 May 2024 18:52:02 +0000 Original-Received: (at 70217) by debbugs.gnu.org; 28 May 2024 18:51:55 +0000 Original-Received: from localhost ([127.0.0.1]:52137 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sC1vP-0008NM-2d for submit@debbugs.gnu.org; Tue, 28 May 2024 14:51:55 -0400 Original-Received: from mxout1.mail.janestreet.com ([38.105.200.78]:33063) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sC1vM-0008N0-Gh for 70217@debbugs.gnu.org; Tue, 28 May 2024 14:51:53 -0400 In-Reply-To: <86fru1u6km.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 28 May 2024 21:36:41 +0300") DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com; s=waixah; t=1716922297; bh=6KIu0FQSGworhQhaSSXklnS/3cIN2jYLBQNoHFlfkMw=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=ZqaQ4P0Al7PpV6ocrC4yUuZLu3DiE9c4DpDoTFK4H3+5LcmU3UQzrQDIsRmx0sXzf aHyh/p0A9rmcwucjHfeRHXRRA7cbbPFlWaf8WvqIHg8KbPRlFyLr9yozrF5EtdkA6u 6j+rQiu5w6ElZFCz0J0rofCwyXNVPqjd3tdjd+ho8LnldMtc6EJDdwUbEwe5J2NSEZ LgLNLbzY4A323zRpDtfm6RFaN+ZYlLnPMBnFCQh2+5+cucbbuC1NCJe7DzYoge9XB6 rg5GzvqhbPkRlU5PKxEtL8f9oED2Xara608WIbuSduW6ZN6fN2Ymup6Pd4vVv5T4Lg ouq3tr52ngmag== X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:286115 Archived-At: Eli Zaretskii writes: >> From: Spencer Baugh >> 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.