From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 14 11:02:01 2023 Received: (at submit) by debbugs.gnu.org; 14 Apr 2023 15:02:01 +0000 Received: from localhost ([127.0.0.1]:47291 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pnKw4-0006Iu-Q5 for submit@debbugs.gnu.org; Fri, 14 Apr 2023 11:02:01 -0400 Received: from lists.gnu.org ([209.51.188.17]:39948) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pnKw2-0006Im-Hl for submit@debbugs.gnu.org; Fri, 14 Apr 2023 11:01:59 -0400 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 1pnKw2-0007y4-BG for bug-gnu-emacs@gnu.org; Fri, 14 Apr 2023 11:01:58 -0400 Received: from mxout5.mail.janestreet.com ([64.215.233.18]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pnKvz-0002I9-Rw for bug-gnu-emacs@gnu.org; Fri, 14 Apr 2023 11:01:58 -0400 From: Spencer Baugh To: bug-gnu-emacs@gnu.org Subject: [PATCH] Provide an example of using fuzzier completion. Date: Fri, 14 Apr 2023 11:01:54 -0400 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=64.215.233.18; envelope-from=sbaugh@janestreet.com; helo=mxout5.mail.janestreet.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) --=-=-= Content-Type: text/plain Tags: patch Hopefully a useful documentation improvement. In GNU Emacs 29.0.60 (build 3, x86_64-pc-linux-gnu, X toolkit, cairo version 1.15.12, Xaw scroll bars) of 2023-03-13 built on igm-qws-u22796a Repository revision: e759905d2e0828eac4c8164b09113b40f6899656 Repository branch: emacs-29 Windowing system distributor 'The X.Org Foundation', version 11.0.12011000 System Description: CentOS Linux 7 (Core) Configured using: 'configure --with-x-toolkit=lucid --with-modules --with-gif=ifavailable' --=-=-= Content-Type: text/patch Content-Disposition: attachment; filename=0001-Provide-an-example-of-using-fuzzier-completion.patch >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.) * doc/emacs/mini.texi (Completion Example): Provide an example of using more advanced "basic" completion. --- doc/emacs/mini.texi | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/doc/emacs/mini.texi b/doc/emacs/mini.texi index 6fb312ec321..812218d1ab2 100644 --- a/doc/emacs/mini.texi +++ b/doc/emacs/mini.texi @@ -326,6 +326,20 @@ Completion Example Hence, typing just @kbd{a u @key{TAB} - f @key{TAB}} allows you to enter @samp{auto-fill-mode}. + @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}. + @node Completion Commands @subsection Completion Commands -- 2.30.2 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 15 04:35:09 2023 Received: (at 62836) by debbugs.gnu.org; 15 Apr 2023 08:35:09 +0000 Received: from localhost ([127.0.0.1]:48191 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pnbNF-0002js-7T for submit@debbugs.gnu.org; Sat, 15 Apr 2023 04:35:09 -0400 Received: from eggs.gnu.org ([209.51.188.92]:55268) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pnbNC-0002jD-G1 for 62836@debbugs.gnu.org; Sat, 15 Apr 2023 04:35:07 -0400 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 1pnbN6-00081E-OO; Sat, 15 Apr 2023 04:35:00 -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=B/6zecAnJUnFTCGOQZsLSJKBeULuOj15neB6pvl8V7Q=; b=IwUj8Vye12NL jANzz3lJ6Hlz/qxlwVQ8UI6mjdPbuvz1yFGXWrbl5mkWGEeg6x4hQ0fqL3mB8KB5rSvvANDS7mGnJ XxeQqs4OlsGUOZ7uTWfgWz55HVInutjiEfZt1ePN+wVa/qzdGkthunMcF9WMAvvjVsRh/BRFijsZS aiOFOJqKSk5UPUl7k4p09jT6P9c6i18L8TykdCY4ERkyi18uHc7HzIqsQXv/Tta3i0Pqedp03JT6D k+ET0yAT4e/OnGqeIfUCB/LEpfWUcbahowVj46dxjsh2BKNLxbJQ99i8n+bzTvYdKcsgxZRYpm9k9 xig+9mm7Zpnk55MfsFuX2A==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pnbN4-0003FR-6E; Sat, 15 Apr 2023 04:35:00 -0400 Date: Sat, 15 Apr 2023 11:34:57 +0300 Message-Id: <83a5z9ee6m.fsf@gnu.org> From: Eli Zaretskii To: Spencer Baugh In-Reply-To: (message from Spencer Baugh on Fri, 14 Apr 2023 11:01:54 -0400) Subject: Re: bug#62836: [PATCH] Provide an example of using fuzzier completion. References: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 62836 Cc: 62836@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > 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"? > + @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. 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. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 15 18:22:22 2023 Received: (at 62836) by debbugs.gnu.org; 15 Apr 2023 22:22:22 +0000 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 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== 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 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= Received: from localhost (localhost [IPv6:::1]) by earth.catern.com (Postfix) with ESMTPSA id 4570C6009C; Sat, 15 Apr 2023 18:22:08 -0400 (EDT) From: sbaugh@catern.com Subject: Re: bug#62836: [PATCH] Provide an example of using fuzzier completion. In-Reply-To: <83a5z9ee6m.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 15 Apr 2023 11:34:57 +0300") References: <83a5z9ee6m.fsf@gnu.org> Date: Sat, 15 Apr 2023 22:22:09 +0000 (UTC) Message-ID: <87y1mslran.fsf@catern.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 X-SG-EID: =?us-ascii?Q?ZgbRq7gjGrt0q=2FPjvxk7wM0yQFRdOkTJAtEbkjCkHbKCW=2F2SR57vI90=2FY3AcqX?= =?us-ascii?Q?Se3v7DmyU4cZHRqNwg9APfsuDLnSnld0Awo0wvs?= =?us-ascii?Q?EHA5zDd2MnTiYxlDxKTtlpr98dRulb=2F1OTUueuC?= =?us-ascii?Q?IH4OmiFZkQdk7lr9GS6EhKo+XkmeweNd03FSdtP?= =?us-ascii?Q?iQo6JDObkVRXnL5rQymlyM70IA0UID7syQw=3D=3D?= To: Eli Zaretskii X-Entity-ID: d/0VcHixlS0t7iB1YKCv4Q== Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 62836 Cc: 62836@debbugs.gnu.org, Spencer Baugh X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.2 (/) 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}. From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 16 01:57:49 2023 Received: (at 62836) by debbugs.gnu.org; 16 Apr 2023 05:57:49 +0000 Received: from localhost ([127.0.0.1]:50491 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pnvOW-0004Ry-Sa for submit@debbugs.gnu.org; Sun, 16 Apr 2023 01:57:49 -0400 Received: from eggs.gnu.org ([209.51.188.92]:46664) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pnvOV-0004Rl-7D for 62836@debbugs.gnu.org; Sun, 16 Apr 2023 01:57:47 -0400 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 1pnvOM-0005p4-7W; Sun, 16 Apr 2023 01:57:41 -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=xjRo+ctDLsMfpqxMzOdQz1BjLjOgHgklP70xYx22y9E=; b=ep/gzTOsB75I DFMo20W4jPRDYi4cXDRf4AfKJpFPEP5e1dRRaNBrX2cQlK6JwYsHEPHrlVMWrwToH/ypK5i6pRyDw phZ/3pPkYVAWMeariPkSfzrWV7iZKbBR2RNLz2sS5g3CeYxG23hfFiw9riehlAMFl8xJJkdRfpvrJ OhvWapKqRcnBIqrXlNjXSWGvO+CT4I+L1XVPptddhFND319dekqbi8g/BrJ1w0PczjUZ/NjudhYjK 53nAfN1kBRquZVEFIeZ0VfMw4jb8EsilZlSLKeNtdED5BhEpX6P/qN8Wwkgervn6cfY6JyFax/a30 i/aBfKOvS+i/0R311WUZog==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pnvOK-0007k9-0F; Sun, 16 Apr 2023 01:57:37 -0400 Date: Sun, 16 Apr 2023 08:57:39 +0300 Message-Id: <83sfd0bc8c.fsf@gnu.org> From: Eli Zaretskii To: sbaugh@catern.com In-Reply-To: <87y1mslran.fsf@catern.com> (sbaugh@catern.com) Subject: Re: bug#62836: [PATCH] Provide an example of using fuzzier completion. References: <83a5z9ee6m.fsf@gnu.org> <87y1mslran.fsf@catern.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 62836 Cc: 62836@debbugs.gnu.org, sbaugh@janestreet.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: sbaugh@catern.com > Date: Sat, 15 Apr 2023 22:22:09 +0000 (UTC) > Cc: Spencer Baugh , 62836@debbugs.gnu.org > > Eli Zaretskii writes: > > > 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? Those are mistakes--these 2 paragraphs: If you type @key{TAB} again immediately, it cannot determine the next character; it could be @samp{-}, @samp{a}, or @samp{c}. So it does not add any characters; instead, @key{TAB} displays a list of all possible completions in another window. Next, type @kbd{-f}. The minibuffer now contains @samp{auto-f}, and the only command name that starts with this is @code{auto-fill-mode}. If you now type @key{TAB}, completion fills in the rest of the argument @samp{auto-fill-mode} into the minibuffer. should use @kbd{@key{TAB}} where they say "when you type". Feel free to fix those blunders as part of the patch. > 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}. LGTM, thanks. From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 18 18:07:36 2023 Received: (at 62836) by debbugs.gnu.org; 18 Apr 2023 22:07:36 +0000 Received: from localhost ([127.0.0.1]:60611 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1potU7-0001Ho-QM for submit@debbugs.gnu.org; Tue, 18 Apr 2023 18:07:36 -0400 Received: from mxout6.mail.janestreet.com ([64.215.233.21]:39581) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1potU4-0001HY-Vk for 62836@debbugs.gnu.org; Tue, 18 Apr 2023 18:07:34 -0400 From: Spencer Baugh To: Eli Zaretskii Subject: Re: bug#62836: [PATCH] Provide an example of using fuzzier completion. In-Reply-To: <83sfd0bc8c.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 16 Apr 2023 08:57:39 +0300") References: <83a5z9ee6m.fsf@gnu.org> <87y1mslran.fsf@catern.com> <83sfd0bc8c.fsf@gnu.org> Date: Tue, 18 Apr 2023 18:07:26 -0400 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 62836 Cc: 62836@debbugs.gnu.org, sbaugh@catern.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain Eli Zaretskii writes: >> From: sbaugh@catern.com >> Date: Sat, 15 Apr 2023 22:22:09 +0000 (UTC) >> Cc: Spencer Baugh , 62836@debbugs.gnu.org >> >> Eli Zaretskii writes: >> >> > 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? > > Those are mistakes--these 2 paragraphs: > > If you type @key{TAB} again immediately, it cannot determine the > next character; it could be @samp{-}, @samp{a}, or @samp{c}. So it > does not add any characters; instead, @key{TAB} displays a list of all > possible completions in another window. > > Next, type @kbd{-f}. The minibuffer now contains @samp{auto-f}, and > the only command name that starts with this is @code{auto-fill-mode}. > If you now type @key{TAB}, completion fills in the rest of the > argument @samp{auto-fill-mode} into the minibuffer. > > should use @kbd{@key{TAB}} where they say "when you type". Feel free > to fix those blunders as part of the patch. > >> 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}. > > LGTM, thanks. Cool, here's the patch then: --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-Give-an-example-of-completion-with-point-not-at-end-.patch >From 592541aaec70400e69f27d9f2f2a6972f203e30f Mon Sep 17 00:00:00 2001 From: Spencer Baugh Date: Tue, 18 Apr 2023 18:03:36 -0400 Subject: [PATCH] Give an example of completion with point not at end of minibuffer This can be a useful substitute for full-on fuzzy completion, as provided by other completion styles and completion packages. * doc/emacs/mini.texi (Completion Example): Give an example of completion with point not at end of minibuffer. Also, use @kbd{@key{TAB}} when telling the user to hit TAB. --- doc/emacs/mini.texi | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/doc/emacs/mini.texi b/doc/emacs/mini.texi index 812218d1ab2..c75d68b4f69 100644 --- a/doc/emacs/mini.texi +++ b/doc/emacs/mini.texi @@ -313,14 +313,14 @@ Completion Example called @code{authorize-me} was defined, Emacs could only complete as far as @samp{aut}.) - If you type @key{TAB} again immediately, it cannot determine the -next character; it could be @samp{-}, @samp{a}, or @samp{c}. So it -does not add any characters; instead, @key{TAB} displays a list of all -possible completions in another window. + If you type @kbd{@key{TAB}} again immediately, it cannot determine +the next character; it could be @samp{-}, @samp{a}, or @samp{c}. So +it does not add any characters; instead, @key{TAB} displays a list of +all possible completions in another window. Next, type @kbd{-f}. The minibuffer now contains @samp{auto-f}, and the only command name that starts with this is @code{auto-fill-mode}. -If you now type @key{TAB}, completion fills in the rest of the +If you now type @kbd{@key{TAB}}, completion fills in the rest of the argument @samp{auto-fill-mode} into the minibuffer. Hence, typing just @kbd{a u @key{TAB} - f @key{TAB}} allows you to @@ -340,6 +340,14 @@ Completion Example the end of the minibuffer, so that the minibuffer contains @code{autoconf-mode}. + @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}. + @node Completion Commands @subsection Completion Commands -- 2.30.2 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 19 08:26:16 2023 Received: (at 62836) by debbugs.gnu.org; 19 Apr 2023 12:26:17 +0000 Received: from localhost ([127.0.0.1]:32977 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pp6t6-0005TD-JX for submit@debbugs.gnu.org; Wed, 19 Apr 2023 08:26:16 -0400 Received: from eggs.gnu.org ([209.51.188.92]:36538) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pp6t1-0005Sv-0Y for 62836@debbugs.gnu.org; Wed, 19 Apr 2023 08:26:15 -0400 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 1pp6sv-0007UV-3H; Wed, 19 Apr 2023 08:26:05 -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=EOc7N5DB7ih4OG84vF+0ydCyNxqwd9o3qjwo/m1szdU=; b=pSHrAuaCTjOQ o7LfPQYsa4BmdrB1EMjWCbpm+HFdEKCbW6G5ZRjzgB0CFKVZz22yOaUbAiIydeLMWo9LKa1LD7p6/ Cl4k1UT0WC6E942adeoCRdHANil5rZRIi3oJ2Ywe1wie3ZNarImpsZxwrItOlX08yWXDOmmEAVP7c DaDsHwFdwJInOG4HqO7I+X4WGOcEAase7fpIUniXwl/nE5QugZT+NbgZZrhlmgXL8U0IysQimdwwU K7mzFcmCVevsTwU9irlSATs8ypDBXJ8shi+SUsM0qxK/pK2PP67oaerZ75iledSNPXgqS6zKqLEq9 wl27gstNDvAoIKQ6x0/WzA==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pp6sg-0003ry-PJ; Wed, 19 Apr 2023 08:25:57 -0400 Date: Wed, 19 Apr 2023 15:26:01 +0300 Message-Id: <83cz4083dy.fsf@gnu.org> From: Eli Zaretskii To: Spencer Baugh In-Reply-To: (message from Spencer Baugh on Tue, 18 Apr 2023 18:07:26 -0400) Subject: Re: bug#62836: [PATCH] Provide an example of using fuzzier completion. References: <83a5z9ee6m.fsf@gnu.org> <87y1mslran.fsf@catern.com> <83sfd0bc8c.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 62836 Cc: 62836@debbugs.gnu.org, sbaugh@catern.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Spencer Baugh > Cc: sbaugh@catern.com, 62836@debbugs.gnu.org > Date: Tue, 18 Apr 2023 18:07:26 -0400 > > > LGTM, thanks. > > Cool, here's the patch then: Thanks. It failed to apply (I guess the patch was not against the current repository?). So I applied it manually (to the emacs-29 branch). Thanks. From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 19 08:59:15 2023 Received: (at control) by debbugs.gnu.org; 19 Apr 2023 12:59:15 +0000 Received: from localhost ([127.0.0.1]:33029 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pp7P1-0006TQ-CS for submit@debbugs.gnu.org; Wed, 19 Apr 2023 08:59:15 -0400 Received: from eggs.gnu.org ([209.51.188.92]:54944) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pp7Ox-0006TB-CB for control@debbugs.gnu.org; Wed, 19 Apr 2023 08:59:13 -0400 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 1pp7Oq-0005zg-Rc for control@debbugs.gnu.org; Wed, 19 Apr 2023 08:59:04 -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=oBM3NlJwn/M7sWdzfJgdcwXxySzBvDf+FufOQod7cwY=; b=prYdw8zTY1fJ oUE70nhoIWtf/CiHfAFb0dPgSCLtHfkZ8QWqRXYy7c18Ypt0xmtsU6CvwmxNPA1FhNzrv1EAtPKN+ zi9RjqeUNE87u9ZsLVS+X0UeAcHRghvbVunTa8QzIdE+wLaZgScNTFkp/ftTp5s5Pbhzs/GEuGuYr EwrclMk6yHrD/e+exhFZIGsIZsQbxy7kRDquCifxnImt2Ul9QhZXbvUO4nyJ6g4J8WTlnBoAxjsyb 5Q/JpexvIuSvl0UUKju1Q2NbEBwxoqc5iK7lD1RbJQyfrKxJiHfnrE68YsYSt5ysJQ+IQQeZw2+GZ 0vcGg7CDM5HYxT3HpdvniA==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pp7Oe-0006AP-L4 for control@debbugs.gnu.org; Wed, 19 Apr 2023 08:59:02 -0400 Date: Wed, 19 Apr 2023 15:59:04 +0300 Message-Id: <837cu881uv.fsf@gnu.org> From: Eli Zaretskii To: control@debbugs.gnu.org In-Reply-To: <83cz4083dy.fsf@gnu.org> (message from Eli Zaretskii on Wed, 19 Apr 2023 15:26:01 +0300) Subject: Re: bug#62836: [PATCH] Provide an example of using fuzzier completion. References: <83a5z9ee6m.fsf@gnu.org> <87y1mslran.fsf@catern.com> <83sfd0bc8c.fsf@gnu.org> <83cz4083dy.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) close 62836 thanks From unknown Thu Jun 19 14:28:02 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 18 May 2023 11:24:07 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator