From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Heime via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#65348: INITIAL-INPUT in completing-read repeats same entry twice consecutively Date: Sat, 19 Aug 2023 01:55:14 +0000 Message-ID: References: <6lEyA2hwLwT0gnrhQsH91Us8wQDf0Cj8-hfYtge1iLDBFEsG5Hj_i80te8w4f52fgOS-g9Z908HRkYHlE05wBV9ccB5h1bFjV755l9nvYh0=@protonmail.com> <83y1i93t7x.fsf@gnu.org> Reply-To: Heime Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31511"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , "65348@debbugs.gnu.org" <65348@debbugs.gnu.org> To: Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Aug 19 03:56:20 2023 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 1qXBCN-0007ym-TL for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 19 Aug 2023 03:56:20 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qXBCB-0006gE-PQ; Fri, 18 Aug 2023 21:56:08 -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 1qXBC6-0006g2-Bo for bug-gnu-emacs@gnu.org; Fri, 18 Aug 2023 21:56:02 -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 1qXBC6-0002EE-4F for bug-gnu-emacs@gnu.org; Fri, 18 Aug 2023 21:56:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qXBC6-0001gW-GD for bug-gnu-emacs@gnu.org; Fri, 18 Aug 2023 21:56:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Heime Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 19 Aug 2023 01:56:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65348 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: notabug Original-Received: via spool by 65348-submit@debbugs.gnu.org id=B65348.16924101446429 (code B ref 65348); Sat, 19 Aug 2023 01:56:02 +0000 Original-Received: (at 65348) by debbugs.gnu.org; 19 Aug 2023 01:55:44 +0000 Original-Received: from localhost ([127.0.0.1]:49097 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qXBBn-0001fd-QB for submit@debbugs.gnu.org; Fri, 18 Aug 2023 21:55:44 -0400 Original-Received: from mail-40135.protonmail.ch ([185.70.40.135]:50049) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qXBBl-0001fK-7O for 65348@debbugs.gnu.org; Fri, 18 Aug 2023 21:55:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1692410133; x=1692669333; bh=cRTYC2GL7ZvH0vMwoG0cWGf3ITvD1yUpiKipucMcaBs=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=JbTwU6x8z+SC2tKneIAUMv4fKY6J/oq6shVCwOc9WdIhR7jVE3MD46ixj8kXE64Is UOkhqTpPdaVagkAN7sBOauIvosY7v5hewKdlFVlvDWerZQhZixEIPnPB0fNSpGxvi7 obcJ0wCbtU4HrHf8htzgt8dLzkiNw2jDKErDUrQal3OqUzn0wT+v3No5aVBPVYGcMc /RDLo3bqOuHCxanNPTV8T3wQnODBlYWKx1+sqa2d3mf+FPujlI70zh/uxHw8c33M2B dMgWypaxyr6B7TZOBPlkLcSipWRG0Hta7qd111m6OZq9uf0f93ociCgvyKKo0HFRv/ a/CtJ2uI3YEVw== In-Reply-To: Feedback-ID: 57735886:user:proton 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:267803 Archived-At: ------- Original Message ------- On Saturday, August 19th, 2023 at 9:03 AM, Drew Adams wrote: > > > Cycling can be helpful for accessing COLLECTION > > > matches or for accessing history elements. But > > > cycling is an inherently dumb, inefficient way > > > to find a needle in a haystack. A magnet works > > > better than checking each bit of hay in turn. > >=20 > > I use completing-read so I do not have to remember > > collection matches. >=20 >=20 > "Remember collection matches?" > No idea what you're on about, there. >=20 > The point is that cycling among `completing-read' completion candidates, = just like cycling among` completing-read' history elements, is a slow, > single-step, brute-force way to access choices. > If there are many candidates then it becomes a > ridiculous way to get what you want. In that case > you're far better off filtering the candidates. >=20 > When you use `completing-read', you do sometimes > type some text in the minibuffer, to filter the > choices, don't you? Why do you do that, instead > of just cycling blindly among ALL the candidates > in the domain (COLLECTION)? Because it's stupid > & slow to cycle when there are zillions of choices. >=20 > M-x TAB ... > > You DON'T do that to enter a command, do you? I > truly hope you type some text before hitting TAB. I do actually and without hitting TAB. Did not know about that trick. =20 > The same thing applies to accessing a choice among > any set of candidates, whether it's completions, > history elements, query-replace matches,... >=20 > Filtering is far more efficient than cycling > when the set of candidates is large. Emacs makes > a point of giving users ways to filter instead of > just checking each blade of straw to see if it > might be a needle. >=20 > Filter first, well, and often, and it will boost > the value of cycling. Same for sorting: sort > well and you needn't cycle much. Cycling on its > own is like reading a novel one letter at a time. I like to categorise rather than sort. =20 > Cycling is the last thing to do, after you've > narrowed the selection down to a few choices and > if it's more trouble than it's worth to narrow it > down to a single choice by filtering further. >=20 > If you can present the choices in a good order > (sorting) then it might not matter how many there > are, because you have, in effect, narrowed the > choices down to those at the start of the list. >=20 > Being able to sort completion candidates on the > fly is powerful, as is being able to filter them > on the fly - and to filter again and again, with > different criteria/patterns. >=20 > Vanilla Emacs doesn't offer filtering again and > again; and it doesn't offer sorting on the fly. > It should offer both. It should as you say. =20 > https://www.emacswiki.org/emacs/Icicles_-_Nutshell_View#ProgressiveComple= tion >=20 > https://www.emacswiki.org/emacs/Icicles_-_Sorting_Candidates >=20 > https://www.emacswiki.org/emacs/Icicles_-_Sorting_Candidates#screenshots