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.devel Subject: Re: master 69ec333eab0: Allow customizing partial-completion to be more like substring Date: Sat, 31 Aug 2024 12:30:17 +0300 Message-ID: <865xrhca52.fsf@gnu.org> References: <172449136475.5211.17507793835510648935@vcs2.savannah.gnu.org> <20240824092245.2C0C9C41F06@vcs2.savannah.gnu.org> <87frqu6xbe.fsf@gmx.de> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38356"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Michael Albinus , sbaugh@janestreet.com Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Aug 31 11:31:31 2024 Return-path: Envelope-to: ged-emacs-devel@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 1skKSA-0009pG-Nk for ged-emacs-devel@m.gmane-mx.org; Sat, 31 Aug 2024 11:31:30 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1skKRU-0004B1-Uo; Sat, 31 Aug 2024 05:30:48 -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 1skKRS-0004Ah-DQ for emacs-devel@gnu.org; Sat, 31 Aug 2024 05:30:46 -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 1skKRQ-00061L-6h; Sat, 31 Aug 2024 05:30:44 -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=9Kxv9BWdRhtYq+Z1rpD+HiztN2zCx+iUqAoHlCqbKUc=; b=Rm11SIIQki/F KG/6yz8/WvD9ItIbzylG1ZrrVriroIvw7yXK8nYSr65C8195LRZo5rQyYpvBUx59rREHmkmmGO6TO 3AEQ+Qyp5Eijz/suxMsjN/o8OJlSMlX5Y+0bEtjbUSHqSjz81gwcDcOLYsMUOX/cHKnNV6x849KgB q2KLNQvDzceEHFcv6OzKTXOxBGrEb2GTR0S5u8OfbeaE8ZX1+iExGGLjXgl4VtpSEFZ5RrimkHgr0 XryiBuq0WmgHcrkW8B6Dmt/BMMMMMfYQ4Kh9jrdPUG+VYhYE1xHlhAeZcP8weItulHCVdKYZzohpe x0XrFqSlmDpbkKiIeKesDg==; In-Reply-To: <87frqu6xbe.fsf@gmx.de> (message from Michael Albinus on Sat, 24 Aug 2024 12:15:49 +0200) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:323234 Archived-At: Spencer, would you please take care of these gotchas? > From: Michael Albinus > Cc: Spencer Baugh > Date: Sat, 24 Aug 2024 12:15:49 +0200 > > Eli Zaretskii writes: > > Hi, > > > diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el > > index 3beb3c06a18..6fae62b3904 100644 > > --- a/lisp/minibuffer.el > > +++ b/lisp/minibuffer.el > > @@ -1141,7 +1141,15 @@ and DOC describes the way this style of completion works.") > > ;; and simply add "bar" to the end of the result. > > emacs22) > > "List of completion styles to use. > > -The available styles are listed in `completion-styles-alist'. > > +An element should be a symbol which is listed in > > +`completion-styles-alist'. > > + > > +An element can also be a list of the form > > +(STYLE ((VARIABLE VALUE) ...)) > > +STYLE must be a symbol listed in `completion-styles-alist', followed by > > +a `let'-style list of variable/value pairs. VARIABLE will be bound to > > +VALUE (without evaluating it) while the style is handling completion. > > +This allows repeating the same style with different configurations. > > The :type of completion-styles should be adapted in order to reflect > this change. Furthermore, this warrants a change of the :version, I > believe. > > Just being curious: why must it be a form (STYLE ((VARIABLE VALUE) ...)) ? > Wouldn't it be sufficient to use (STYLE (VARIABLE VALUE) ...) ? > > > +(defcustom completion-pcm-leading-wildcard nil > > + "If non-nil, partial-completion completes as if there's a leading wildcard. > > + > > +If nil (the default), partial-completion requires a matching completion > > +alternative to have the same beginning as the first \"word\" in the > > +minibuffer text, where \"word\" is determined by > > +`completion-pcm-word-delimiters'. > > + > > +If non-nil, partial-completion allows any string of characters to occur > > +at the beginning of a completion alternative, as if a wildcard such as > > +\"*\" was present at the beginning of the minibuffer text. This makes > > +partial-completion behave more like the substring completion style." > > + :version "30.1" > > + :type 'boolean) > > This doesn't look right, it should be :version "31.1". > > Best regards, Michael. > >