From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#70217: [PATCH] Add substring-partial-completion style Date: Tue, 28 May 2024 22:21:02 +0300 Message-ID: <86bk4pu4ip.fsf@gnu.org> References: <86a5kpgdo7.fsf@gnu.org> <86ttilvsy8.fsf@gnu.org> <86ikz0wozc.fsf@gnu.org> <86o78qt1hl.fsf@gnu.org> <86fru1u6km.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4293"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 70217@debbugs.gnu.org, monnier@iro.umontreal.ca To: Spencer Baugh Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue May 28 21:22:09 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 1sC2Oe-0000pO-1y for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 28 May 2024 21:22:08 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sC2OQ-0008BD-B4; Tue, 28 May 2024 15:21:54 -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 1sC2OO-0008AI-G3 for bug-gnu-emacs@gnu.org; Tue, 28 May 2024 15:21:52 -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 1sC2OO-0002GE-7b for bug-gnu-emacs@gnu.org; Tue, 28 May 2024 15:21:52 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sC2OX-00014S-Kx for bug-gnu-emacs@gnu.org; Tue, 28 May 2024 15:22:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 28 May 2024 19:22:01 +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.17169240844039 (code B ref 70217); Tue, 28 May 2024 19:22:01 +0000 Original-Received: (at 70217) by debbugs.gnu.org; 28 May 2024 19:21:24 +0000 Original-Received: from localhost ([127.0.0.1]:53389 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sC2Nv-000131-LE for submit@debbugs.gnu.org; Tue, 28 May 2024 15:21:24 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:39266) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sC2Nt-00012S-L4 for 70217@debbugs.gnu.org; Tue, 28 May 2024 15:21:22 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sC2Ne-0002Dn-5O; Tue, 28 May 2024 15:21:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=zovdfYTYdZGrHj6/NG7Pyec8uv8J3+Iy++Rx7DvLwHg=; b=kdhsj/VctYEu /bD+qMxTAS6Ny+kzpRo4Wf46p7n6Nlb8wSJNuXSVksjWmoESRxcRspZd9DzOxlTQmorzny4Vmwxw6 F46iH1/cD3m1gB6HFrjmSePbzRayJPRuZrGNhIy/Yw7JlRAK9Z9FpEAPBBAKN1svwLnk9YEclb9Rp mtpORZpP4qoJ5/NliwRkJvF0lMdKAcS7XThH54t3UUx9mDJUNtPP/7joJkdFEhM1oxmb//nSygITs w0mSsw4zEFvxcEpujDyOmn3KJ5T4FhCQ7EkYlxa3FcDY1w4j8u2OTl/sc3Imea1jwbukhsliYLq8L J6FCTqm04glG4EBEGKKm6g==; In-Reply-To: (message from Spencer Baugh on Tue, 28 May 2024 14:51:37 -0400) 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:286117 Archived-At: > From: Spencer Baugh > Cc: 70217@debbugs.gnu.org, monnier@iro.umontreal.ca > Date: Tue, 28 May 2024 14:51:37 -0400 > > 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. I know. But you are not talking about partial completion in that text, you are talking about strings that match or don't match. The natural way of describing those is regular expressions. If you don't want to use regular expressions here, you will need to explain them in words. That's fine by me, but it will make the job harder for you, and the text will be longer. That's why I suggested to use regexps.