From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Morgan Willcock Newsgroups: gmane.emacs.bugs Subject: bug#73234: 30.0.91; completion-preview-mode doesn't trigger for case-insensitive capf Date: Sat, 14 Sep 2024 10:53:23 +0100 Message-ID: <871q1m36jw.fsf@ice9.digital> References: <875xqzicit.fsf@ice9.digital> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5132"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 73234@debbugs.gnu.org To: Eshel Yaron Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Sep 14 11:55:12 2024 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 1spPUk-0001BX-PV for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 14 Sep 2024 11:55:11 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1spPUY-0004p4-KL; Sat, 14 Sep 2024 05:54:59 -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 1spPUS-0004oq-Be for bug-gnu-emacs@gnu.org; Sat, 14 Sep 2024 05:54:52 -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 1spPUS-0001Do-31 for bug-gnu-emacs@gnu.org; Sat, 14 Sep 2024 05:54:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=jKLWSA899hdIy8sPjpvZHJFpSsZ4Pz0O2H+K2q1M+G8=; b=H8799qIfNxoHxVDXiRfsW+lzdmpsPoMwXYWeDgy7xmhW0Mg/1khvLruFRsE02J9JZpKnI3GukUoJP7lPbLeFDgqr/si9dkET/JROgBrnfFjjRXdSVmdz2Itj/6q2Dr/3+tJNkGZLEntleN9SMujCesXWPs2ztziwIVYiHCweq2erJhJw/zRNRa5xylhuxST01Lg3+UwFxuZyK/6JgkWKOD99+QtID8S1UEwtCONdhvz0XeiMwKezUSWabHBwcowjvnQVWuVhur42pjkRwBIE5ZGNb3RWJRpWlSM4JLjW+nZuu/qZXrtGqP8IuxRO/OXufJuXONjzmn/+4SLkrR0MHw==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1spPUc-0002Ct-By for bug-gnu-emacs@gnu.org; Sat, 14 Sep 2024 05:55:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Morgan Willcock Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 14 Sep 2024 09:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73234 X-GNU-PR-Package: emacs Original-Received: via spool by 73234-submit@debbugs.gnu.org id=B73234.17263076468396 (code B ref 73234); Sat, 14 Sep 2024 09:55:02 +0000 Original-Received: (at 73234) by debbugs.gnu.org; 14 Sep 2024 09:54:06 +0000 Original-Received: from localhost ([127.0.0.1]:44860 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1spPTh-0002BL-Jz for submit@debbugs.gnu.org; Sat, 14 Sep 2024 05:54:05 -0400 Original-Received: from relay6-d.mail.gandi.net ([217.70.183.198]:35489) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1spPTe-0002Aj-OK for 73234@debbugs.gnu.org; Sat, 14 Sep 2024 05:54:04 -0400 Original-Received: by mail.gandi.net (Postfix) with ESMTPSA id D1227C0002; Sat, 14 Sep 2024 09:53:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ice9.digital; s=gm1; t=1726307605; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=jKLWSA899hdIy8sPjpvZHJFpSsZ4Pz0O2H+K2q1M+G8=; b=ctfywMM3N6jlSNqkOGPNk9Gfks1bu3FAn/KC61rzndShqJ0TVcaRISUAB8I+tAz8WWGHBz H8TUK8M5wmv+5ZiIRtyG76YpY6FZG+ZdZ0dNe++N9RTUESLL8Rz+oYAsZufuTYQJF77Iuq sIMDFdsMz+Ml9uVDo/UROhb6PuB55JoUvYSiYVQOT+J2UAFKYFDe17tBT3lfyzFtScHKdT 8S2X54OF0YSPMgt42o2dGZ6FuKzfyv6/RJNsmtjnPTUjjqP2fcLsmWtLCCecNIKn5pt+bX h+L8/sP+v8EBLK34lz6/ovRNzewG1Erd9XtKmw3xjHLadcpW/3bLXMdhAxnlJw== In-Reply-To: (Eshel Yaron's message of "Sat, 14 Sep 2024 08:07:58 +0200") X-GND-Sasl: morgan@ice9.digital 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:291723 Archived-At: Eshel Yaron writes: Hi Eshel, > We could display the completion preview also when you type a prefix that > differs from a candidate prefix only in case (and in fact we already do, > when completion-ignore-case is non-nil), but the question is what to do > when you accept/insert this completion. Namely, changing the prefix > from "tes" to "Tes" when you accept the completion suggestion adds > complications both in terms of implementation and in terms of UX, and > I'm not sure that this added complexity would be justified. My expectation was that a "completion preview" is using exactly the same criteria as the default completion mechanism, and would indicate when a completion was available to use. The difference in the behaviour also means completion-preview-mode cannot reliably be used as the entry-point (by repeatedly calling completion-preview-complete) for the completion interface. > Do you have, or know of, a concrete use case with a completion table > that behaves like your test-completion-at-point-function? I think it would be rare to see one explicitly set to be case-insensitive, but I found the issue because I use a Cape capf transformer to wrap an existing capf backend: https://elpa.gnu.org/packages/doc/cape.html#Capf-transformers It is feasible to do that for any language where the syntax is case-insensitive. Here is an example of it being done: https://git.sr.ht/~mew/kixtart-mode/tree/v1.3.2/item/doc/kixtart-mode.texi#L804 (I wrote this mode and its manual, but anyone using cape-capf-case-fold is likely to see the same problem.) Thanks, Morgan -- Morgan Willcock