From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.devel Subject: Re: Add user customization fido-completion-styles Date: Tue, 02 Jun 2020 17:40:50 +0200 Message-ID: <87lfl5fpbx.fsf@gnu.org> References: <87r1uzn018.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="28015"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Jun 02 17:41:26 2020 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 1jg92b-00077o-Oy for ged-emacs-devel@m.gmane-mx.org; Tue, 02 Jun 2020 17:41:25 +0200 Original-Received: from localhost ([::1]:55186 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jg92a-0002Ou-R4 for ged-emacs-devel@m.gmane-mx.org; Tue, 02 Jun 2020 11:41:24 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54794) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jg925-0001uw-TU for emacs-devel@gnu.org; Tue, 02 Jun 2020 11:40:53 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:46745) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jg925-00066D-A3; Tue, 02 Jun 2020 11:40:53 -0400 Original-Received: from auth2-smtp.messagingengine.com ([66.111.4.228]:46179) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.82) (envelope-from ) id 1jg925-0002R1-3c; Tue, 02 Jun 2020 11:40:53 -0400 Original-Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailauth.nyi.internal (Postfix) with ESMTP id A968A27C005A; Tue, 2 Jun 2020 11:40:52 -0400 (EDT) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute7.internal (MEProxy); Tue, 02 Jun 2020 11:40:52 -0400 X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrudefjedgjedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufhfffgjkfgfgggtgfesthhqredttderjeenucfhrhhomhepvfgrshhs ihhlohcujfhorhhnuceothhsughhsehgnhhurdhorhhgqeenucggtffrrghtthgvrhhnpe ffieetveehkefhgeefueetueegudevveejgeefkedugfejfffgleefueettdfhueenucff ohhmrghinhepghhithhhuhgsrdgtohhmnecukfhppeegiedrkedtrdejhedrvdefgeenuc evlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehthhhorhhn odhmvghsmhhtphgruhhthhhpvghrshhonhgrlhhithihqdekieejfeekjeekgedqieefhe dvleekqdhtshguhheppehgnhhurdhorhhgsehfrghsthhmrghilhdrfhhm X-ME-Proxy: Original-Received: from thinkpad-t440p (p2e504bea.dip0.t-ipconnect.de [46.80.75.234]) by mail.messagingengine.com (Postfix) with ESMTPA id BAB55328005E; Tue, 2 Jun 2020 11:40:51 -0400 (EDT) Mail-Followup-To: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= , Andrew Schwartzmeyer , emacs-devel@gnu.org In-Reply-To: <87r1uzn018.fsf@gmail.com> (=?utf-8?Q?=22Jo=C3=A3o_T=C3=A1vor?= =?utf-8?Q?a=22's?= message of "Mon, 01 Jun 2020 00:43:15 +0100") X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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" Xref: news.gmane.io gmane.emacs.devel:251760 Archived-At: Jo=C3=A3o T=C3=A1vora writes: Hi Jo=C3=A3o, >> Users of fido-mode (like me) may want to customize the completion >> style it uses, so add a variable to allow them to do so. >> >> For instance, I really like using the =E2=80=9Cinitials=E2=80=9D style s= o =E2=80=9Cvlm=E2=80=9D >> quickly completes visual-line-mode, and then falling back to >> flex. There are also neat packages like orderless >> (https://github.com/oantolin/orderless) which add a new >> completion-style, which folks may want to plug-in and use. Anyway, it >> seems like it ought to be customizable. > > Actually, it is, just not with custom. These two lines should do the tri= ck: > > (add-hook 'icomplete-minibuffer-setup-hook 'my-flex-styles) > (defun my-flex-styles () (setq-local completion-styles '(initials flex)= )) > > Or just use a lambda, which is even shorter. I'd like to avoid a > duplicate version of completion-styles customization vars.=20=20 I guess fido-mode sets `completion-styles' locally in order to achieve ido-like defaults, right? But as a user with customized `completion-styles' and `completion-category-overrides', I wish there was a simple way to just use them with fido, too. Especially, I can't see how I could figure out the right category override. Is the completion metadata accessible in icomplete-minibuffer-setup-hook? I would like to use fido (more than icomplete) because the keybindings suite my intuition but I'd like to keep my completion styles and overrides as I have them. Bye, Tassilo