From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eshel Yaron via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#73234: 30.0.91; completion-preview-mode doesn't trigger for case-insensitive capf Date: Thu, 19 Sep 2024 07:39:57 +0200 Message-ID: References: <875xqzicit.fsf@ice9.digital> <871q1m36jw.fsf@ice9.digital> <87o74q7ylr.fsf@ice9.digital> <87cyl04sof.fsf@ice9.digital> Reply-To: Eshel Yaron Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38601"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 73234@debbugs.gnu.org To: Morgan Willcock Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Sep 19 07:40:59 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 1sr9uU-0009nO-5b for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 19 Sep 2024 07:40:58 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sr9uN-0001vB-7D; Thu, 19 Sep 2024 01:40:51 -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 1sr9uJ-0001tE-Kr for bug-gnu-emacs@gnu.org; Thu, 19 Sep 2024 01:40:48 -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 1sr9uH-0005co-Is for bug-gnu-emacs@gnu.org; Thu, 19 Sep 2024 01:40:45 -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=nyefYvLzNPnKsukA1SEgF8VhyLossP9/p2+JPfNZDK0=; b=gUa8v4x0Y13uuC30qYEdVQQTN0YAmv7K5tpIEpXOHcT1pH9iBjhck/BqJFdMEklGi4uVkzLRaUXSu8uXWqSi6FE+kQhqH5XdYz7d6RJKkVnIsSRGEJE4ImmNhzbqW1vnrigVnhC7JelYonEYDYgGjKO2ap1Ef6cEZTpUk0esB17s1oihrAgL58HAFTfJgXzw8JjOwzkB7qwMtXYkLXVQGqxuUGB1yvmsXrxm7a9sWtXpQbq+GH+Addu6OZc55cz7ezLlEY/Rm7U0hiiRAnWZCuRKUDJYA7iZZnmLsX4Zrwl7IsC6JTtp3JOFjS37oFPr2srapKgu1XqoxQKwLNtj9A==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sr9uY-00070g-HS for bug-gnu-emacs@gnu.org; Thu, 19 Sep 2024 01:41:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eshel Yaron Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 19 Sep 2024 05:41: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.172672442126519 (code B ref 73234); Thu, 19 Sep 2024 05:41:02 +0000 Original-Received: (at 73234) by debbugs.gnu.org; 19 Sep 2024 05:40:21 +0000 Original-Received: from localhost ([127.0.0.1]:59624 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sr9tt-0006tY-5g for submit@debbugs.gnu.org; Thu, 19 Sep 2024 01:40:21 -0400 Original-Received: from mail.eshelyaron.com ([107.175.124.16]:41106 helo=eshelyaron.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sr9tq-0006rM-4H for 73234@debbugs.gnu.org; Thu, 19 Sep 2024 01:40:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eshelyaron.com; s=mail; t=1726724400; bh=Ou2XC7KMZ9JSX+/rl1F6N8tJSPQ/X+rf7kE651YlR80=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=bDculHykTrALyPul348Y1//MExG2zKutS/wuLcRbjyPsOQDJI7mdlLyT/bnoUCU37 AB+wQyPBLJebdZi3EHvbY9owR4hiD13P4jt2eaNPe7XbXIFz+DZZruMRMZfkMiwQmn rq6Jtrs1OLPQyrQq1FEtpWRtSJ3EAWKStqotx/cxmEFIHwqAxQkNU7yzKSsegQu3pt yxvLcrU1G2ZU45tNaykFFTLwmxJSNEn7SqSO0cIQEvrNYl6RFP2CVTh/SaCb3L6L3L ecHYcwf4whBfYhcu+VyGFoBCG8i4frH3+QyCxc5fPGav7CDtdEXSz0ze6jTixGn9c0 9n3MpzllmYt+w== In-Reply-To: <87cyl04sof.fsf@ice9.digital> (Morgan Willcock's message of "Wed, 18 Sep 2024 21:23:44 +0100") 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:292029 Archived-At: Hi, Morgan Willcock writes: > Eshel Yaron writes: > >> FYI, I've added a new user option completion-preview-ignore-case on the >> master branch (commit f1794a17b62), which controls case sensitivity for >> Completion Preview mode specifically. This is definitely safe to set >> buffer-locally. The docstring of this new variable should hopefully >> also explain exactly what's the expected behavior in this regard. > > Thanks for adding the new option. For my use case I don't think I would > be able to use it because the case mismatch between the text already > typed and the completion will effectively be generating a completion > which may not actually exist. > > e.g. If a valid completion was "FooBar", and I typed "foo", having the > final result as "fooBar" wouldn't be ideal. Fair enough, although earlier you mentioned that your use case was completing symbols in a case-insensitive language, so I wonder what's wrong with "fooBar", or "foobar" for that matter. They are all the same as the completion candidate, "FooBar", ignoring case differences, no? > I've been trying to think of a way to get it to work without disturbing > the user interface that already exists. Maybe it would be possible > fixup the result in a post-insertion hook if one existed - such a hook > might be generally useful anyway. We have the :exit-function (which your capf can provide as an extra property alongside the completion table it returns), and indeed you could use that to "fix" the case of your prefix after completing it. That's an interesting solution, I think. Or do you have some other kind of hook in mind? Best, Eshel