From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: sbaugh@catern.com Newsgroups: gmane.emacs.bugs Subject: bug#62836: [PATCH] Provide an example of using fuzzier completion. Date: Sat, 15 Apr 2023 22:22:09 +0000 (UTC) Message-ID: <87y1mslran.fsf@catern.com> References: <83a5z9ee6m.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21965"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 62836@debbugs.gnu.org, Spencer Baugh To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Apr 16 00:23:25 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 1pnoIk-0005RY-IV for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 16 Apr 2023 00:23:23 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pnoIR-000711-6q; Sat, 15 Apr 2023 18:23:03 -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 1pnoIQ-00070j-9N for bug-gnu-emacs@gnu.org; Sat, 15 Apr 2023 18:23:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pnoIQ-0000Nq-16 for bug-gnu-emacs@gnu.org; Sat, 15 Apr 2023 18:23:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pnoIP-0007hQ-MC for bug-gnu-emacs@gnu.org; Sat, 15 Apr 2023 18:23:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: sbaugh@catern.com Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 15 Apr 2023 22:23:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62836 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 62836-submit@debbugs.gnu.org id=B62836.168159734229530 (code B ref 62836); Sat, 15 Apr 2023 22:23:01 +0000 Original-Received: (at 62836) by debbugs.gnu.org; 15 Apr 2023 22:22:22 +0000 Original-Received: from localhost ([127.0.0.1]:50259 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pnoHm-0007gD-5J for submit@debbugs.gnu.org; Sat, 15 Apr 2023 18:22:22 -0400 Original-Received: from s.wrqvtbkv.outbound-mail.sendgrid.net ([149.72.123.24]:17030) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pnoHf-0007fs-8r for 62836@debbugs.gnu.org; Sat, 15 Apr 2023 18:22:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=catern.com; h=from:subject:in-reply-to:references:mime-version:to:cc:content-type: content-transfer-encoding:cc:content-type:from:subject:to; s=s1; bh=7Q8WyotP6sO6EOIKp5L+zrO7ZjrtmbauA8IvZ3bP6aY=; b=xiHQ1XTy1tt3qQnqS9GqgyHMeoTFmi1TcMtPDuUYzwvHszAG6L0U56i7OzgE3xu08s6T cEi301fnIYUtsxnh8pHGzriRn7tv4g9tvE0EHgvnEEE3w/13KoUZvfyMXP4tleUbiFeKbp 0zIIH/h2/o+cy6S52O0pJmVonS/og74TU99YHeaCcUUeEdQXazqvabeXtikARzmMecmH0f mVnvOOFcTqwRp6SFS2ihcYUp7DxphuGEglGwclwiTkcfk3AUVehZgs6qC2GD0qhVtqZDVG mj0cWVL96QrVwuDA6OeUiXbKEbXfv0qAC+nq8ecLUR8XDNOLvU/c5GSey8cnPmaw== Original-Received: by filterdrecv-7457b4c9b5-9d89m with SMTP id filterdrecv-7457b4c9b5-9d89m-1-643B2391-8 2023-04-15 22:22:09.18852178 +0000 UTC m=+4574942.830357359 Original-Received: from earth.catern.com (unknown) by geopod-ismtpd-8 (SG) with ESMTP id dJ-YUCydTs2piBzVrprBxg Sat, 15 Apr 2023 22:22:08.899 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=::1; helo=localhost; envelope-from=sbaugh@catern.com; receiver= Original-Received: from localhost (localhost [IPv6:::1]) by earth.catern.com (Postfix) with ESMTPSA id 4570C6009C; Sat, 15 Apr 2023 18:22:08 -0400 (EDT) In-Reply-To: <83a5z9ee6m.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 15 Apr 2023 11:34:57 +0300") X-SG-EID: ZgbRq7gjGrt0q/Pjvxk7wM0yQFRdOkTJAtEbkjCkHbKCW/2SR57vI90/Y3AcqXSe3v7DmyU4cZHRqNwg9APfsuDLnSnld0Awo0wvsEHA5zDd2MnTiYxlDxKTtlpr98dRulb/1OTUueuCIH4OmiFZkQdk7lr9GS6EhKo+XkmeweNd03FSdtPiQo6JDObkVRXnL5rQymlyM70IA0UID7syQw== X-Entity-ID: d/0VcHixlS0t7iB1YKCv4Q== 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:260081 Archived-At: Eli Zaretskii writes: >> From: Spencer Baugh >> Date: Fri, 14 Apr 2023 11:01:54 -0400 >> >> >From b8d081b19cb46965c6fc170253702c53d53f2ee2 Mon Sep 17 00:00:00 2001 >> From: Spencer Baugh >> Date: Fri, 14 Apr 2023 10:58:17 -0400 >> Subject: [PATCH] Provide an example of using fuzzier completion. >> >> In my experience, new users of vanilla Emacs often complain about the >> lack of fuzzy completion by default. However, the "basic" completion >> style provides a decent amount of fuzziness out of the box. We should >> explain this a little more to users. (I myself have often had to >> explain this.) > > Are the examples you suggest to add really considered as "fuzzy > completion"? True, this feature isn't fuzzy completion at all. But in my experience it is a partial substitute for fuzzy completion - it solve some of the same use cases. (for example, if you know two substrings of the string you're trying to complete, you can use fuzzy completion to find the target string or you can use this feature) >> + @key{TAB} also works while point is not at the end of the >> +minibuffer. If you type @kbd{M-x a u t o c m o d e}, then @kbd{C-b} >> +several times to move point back before the @samp{mode}, you can hit >> +@key{TAB} to insert text between @samp{autoc} and @samp{mode} >> +so that the minibuffer contains @code{autoconf-mode}. >> + >> + When point is not at the end of the minibuffer and you hit >> +@kbd{TAB}, completion will fill in text both at point and at the end >> +of the minibuffer. So you could also type @kbd{M-x a u t o c m o}, >> +@kbd{C-b} twice to move point back before the @samp{mo}, and then >> +@key{TAB} will insert the text @samp{onf-} at point and @samp{de} at >> +the end of the minibuffer, so that the minibuffer contains >> +@code{autoconf-mode}. > > I'd prefer to have only the second example, as it demonstrates the > more general behavior, which includes the one described by the first > example. Agreed, makes sense. > Also, we use @kbd{M-x autocmo}, without the spaces between characters, > in such cases. (It is actually enough to type "M-x autocm" followed > by a single C-b, to show the behavior in this case.) > > Please be consistent about your markup: if you use @samp{onf-}, > pleased also use @samp{autoconf-mode}. > > Finally, please use @kbd{@key{TAB}} in the context that calls for the > user to press the TAB key. Hm, the text already present in the "Completion Example" section doesn't use @kbd{@key{TAB}}, should it be doing that? Here's the revised version incorporating all of these: @key{TAB} also works while point is not at the end of the minibuffer. In that case, it will fill in text both at point and at the end of the minibuffer. If you type @kbd{M-x autocm}, then press @kbd{C-b} to move point before the @samp{m}, you can type @kbd{@key{TAB}} to insert the text @samp{onf-} at point and @samp{ode} at the end of the minibuffer, so that the minibuffer contains @samp{autoconf-mode}.