From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#70217: [PATCH] Add substring-partial-completion style Date: Wed, 08 May 2024 13:14:34 -0400 Message-ID: References: Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38388"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 70217@debbugs.gnu.org To: Spencer Baugh Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed May 08 19:16:06 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 1s4kth-0009s2-97 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 08 May 2024 19:16:05 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s4ktO-0007kg-AN; Wed, 08 May 2024 13:15:46 -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 1s4ktF-0007jp-8S for bug-gnu-emacs@gnu.org; Wed, 08 May 2024 13:15:43 -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 1s4ktE-0006C6-WC for bug-gnu-emacs@gnu.org; Wed, 08 May 2024 13:15:37 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s4kte-0006B9-DM for bug-gnu-emacs@gnu.org; Wed, 08 May 2024 13:16:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 08 May 2024 17:16: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.171518851223727 (code B ref 70217); Wed, 08 May 2024 17:16:02 +0000 Original-Received: (at 70217) by debbugs.gnu.org; 8 May 2024 17:15:12 +0000 Original-Received: from localhost ([127.0.0.1]:49867 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s4ksp-0006Ad-M1 for submit@debbugs.gnu.org; Wed, 08 May 2024 13:15:11 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:51734) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s4ksl-0006AG-TE for 70217@debbugs.gnu.org; Wed, 08 May 2024 13:15:10 -0400 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id C31D244353F; Wed, 8 May 2024 13:14:35 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1715188474; bh=nv873z3C32Ob9//woA3Y1s2zlWeGWAvw35rSTMgDcV0=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=WY9aF9hCwhXOFDzmSUODiOMA3hdnfdDdZDy/dqsATjUzwJrlZU+SLlu56b/y/QJ2I BSPCLuavqdb+bJIkJpzRjAO190ueJojzobw5wUaRr3oPpdoaI2zePPzdqp4TlAVvGb WN0z3XD7w6gDhW9WKcmT6dpehq8h14TnX/qHfB7HIrVFyiqctWR1E+FVWfiV77teRZ dWCgvr64miV6gTLbVpmHiu/cBELYxETbRhBQ9UwqjvpaFguxYWaLbvHNvuT0c0EEWx dIa9Bnn/6+QNwS1gppEadb8i00REStJt7wgiOz1fkXfUCy2haR0Cpx93JC4IaCPy6h 2LdlgEQYFeO/Q== Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 70998443542; Wed, 8 May 2024 13:14:34 -0400 (EDT) Original-Received: from lechazo (lechon.iro.umontreal.ca [132.204.27.242]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 62CAE120472; Wed, 8 May 2024 13:14:34 -0400 (EDT) In-Reply-To: (Spencer Baugh's message of "Wed, 08 May 2024 12:46:32 -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:284684 Archived-At: > * lisp/minibuffer.el (completion-emacs22-use-pcm) > (completion-substring-use-pcm): Add. (bug#70217) > (completion-emacs22-try-completion) > (completion-emacs22-all-completions): Check completion-emacs22-use-pcm. > (completion-pcm--string->pattern, completion-pcm--find-all-completions) > (completion-pcm-all-completions, completion-pcm--merge-try) > (completion-pcm-try-completion): Add "startglob" optional argument and > pass through. > (completion-substring-try-completion) > (completion-substring-all-completions): Check > completion-substring-use-pcm and pass startglob=t. I'm not super happy about this `startglob` everywhere. Two things bother me about it: - Its name and doc (in my view of what "glob" means, there's no such thing as a "leading glob"; I think you're talking about a leading wildcard (which is one of the things that can appear in a glob pattern)). - Its spreading all over the place. I don't have the time to dig into the second problem (which might be fixable by combining this info into the `string` argument (which wouldn't be just a string as more, so it could have too-far reaching consequences)), but for the first I suspect a "standard" name for this idea is `anchored`. Other than that, I don't have a strong opinion on whether to introduce the feature via new styles or as custom vars that affect existing styles. Either way works for me. Stefan