From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.help Subject: Re: can vertico approximate this ido setup? Date: Mon, 05 Jun 2023 09:08:03 +0200 Message-ID: <87jzwijs04.fsf@gnu.org> References: <87zg5f37j1.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="18918"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.11.6; emacs 30.0.50 Cc: help-gnu-emacs@gnu.org To: Samuel Wales Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jun 05 09:20:29 2023 Return-path: Envelope-to: geh-help-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 1q64Vw-0004ki-P8 for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 05 Jun 2023 09:20:28 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q64VD-0003WM-Db; Mon, 05 Jun 2023 03:19:43 -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 1q64V5-0003VI-1A for help-gnu-emacs@gnu.org; Mon, 05 Jun 2023 03:19:37 -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 1q64V1-0001AJ-H0; Mon, 05 Jun 2023 03:19:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-reply-to:Date:Subject:To:From: References; bh=iUafmtfNoPA2PSVdYJFq1262duaq5926A37zoiJ3EbA=; b=T8YBOX9YJmTf6p RBDSyLbaH+6+LitMzP16mAhAsfk0U+c/KHj1jXkbT8eqAvEILQvq4jeWOvq4T6/OQrKvwleDnr919 K5xKbGEZmJdjEU1ylexshKEla/yNkXzTf5YrdQY92CF93eVKNObwk7waORPfuZROYa5ErY7y4M8XJ /Jg5H41Q96chhs309xjJH+v5lQigJcPHH1FdgXtDQgkZgINmvuw4q9gXNxxyog1s8VyaCocP3uIkO 2fyBUN/Pazy8wib1SXGGaSJ6y+gXT2+GmGCeOM7EYNXta0dd0C5CNsUivE6RuFptMaLmPAmTq4OwH zbwp83ORKyMOmV4O+7fQ==; Original-Received: from auth1-smtp.messagingengine.com ([66.111.4.227]) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q64V1-0005dB-3F; Mon, 05 Jun 2023 03:19:31 -0400 Original-Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailauth.nyi.internal (Postfix) with ESMTP id ED1FB27C0054; Mon, 5 Jun 2023 03:19:28 -0400 (EDT) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Mon, 05 Jun 2023 03:19:28 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfeelkedguddukecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhepfhgfhffvvefuffgjkfggtgesth dtredttdertdenucfhrhhomhepvfgrshhsihhlohcujfhorhhnuceothhsughhsehgnhhu rdhorhhgqeenucggtffrrghtthgvrhhnpeeugeetueeguedvfefhkeelgfeuieekieevle ffkeekkeduudehhfetfeektdfhhfenucffohhmrghinhepghhithhhuhgsrdgtohhmnecu vehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepthhhohhrnh domhgvshhmthhprghuthhhphgvrhhsohhnrghlihhthidqkeeijeefkeejkeegqdeifeeh vdelkedqthhsughhpeepghhnuhdrohhrghesfhgrshhtmhgrihhlrdhfmh X-ME-Proxy: Feedback-ID: ib2b94485:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 5 Jun 2023 03:19:26 -0400 (EDT) In-reply-to: X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:143870 Archived-At: Samuel Wales writes: > On 6/4/23, Tassilo Horn wrote: > >> FWIW, I see that you put the flex and orderless completion style in >> completion-styles. You have to be aware that at least flex matches very >> distant candidates, e.g., foo matches after-some-root. Ok, that's the > > ok. > > my sequening sounds like it could be bad. Since you are pushing, you append very unspecific styles at the front, yes. > to me, above would be more desirable if f were not a single letter. > to match above i might do ftoot not foo or foot. > > i think ido-clever-match got that right: > https://github.com/Bogdanp/ido-clever-match . it is almost perfect. You might want to play around with flex-score-match-tightness for the flex style, > btw i have trouble understanding the emacs manual on completion. the > completion styles don't make sense to me whent they talk about text > after point. idk what i am missing there. Do emacs -Q (and probably set one completion-style at a time), enter something and move point forward again. At least some styles seem to ignore text after point or at least handle it differently. > here is a big long quote from ido-clever-match exactly what it does. > i wonder if vertico/orderless can do it similarly? Vertico doesn't come into play here and I don't know orderless well enough. I think it's similar to partial-completion where the order of words doesn't matter. >> purpose of the style but I think it's only useful if you place it at the >> very end of completion-styles with more exact styles at the beginning, >> e.g. (partial-completion substring flex). > > ok. even after orderless? Yes, think (... orderless flex) would be most sensible but of course that's a matter of preference. >> Also, I have the experience that some completion styles work great for >> one kind/category of completion but not for others, so I use >> completion-category-overrides. >> >> --8<---------------cut here---------------start------------->8--- >> (setopt completion-styles '(partial-completion substring flex)) > > ok so we are out of the territory of cl-pushnew or add-to-list i think > now and i have to do my own setopt. like setq? Yes, setopt is like setq but would also do what the customize machinery would do. But it doesn't make a difference for those variables. Using setq/setopt instead of cl-pushnew/add-to-list just ensures the order and that you get what you want in cases the defaults might change. >> (setopt completion-category-overrides >> '((project-file >> (styles partial-completion substring initials)) > >> (file >> (styles partial-completion substring initials)) > > i'd want almple or alcp to match .../alpha-completion.el. not sure if > this would do it without flex? I think, it does. One thing to note is that with completion-styles (a b c) is that b won't kick in as long as a delivers matches and c won't kick in as long as b finds matches. Bye, Tassilo