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.devel Subject: Re: TAGS completion with (setq-local completion-ignore-case t) Date: Wed, 13 Mar 2024 00:09:16 +0000 Message-ID: <87cyrzuh5f.fsf@ice9.digital> References: <87frx2qu8z.fsf@ice9.digital> <868r2u2x4u.fsf@gnu.org> <87bk7qqsdk.fsf@ice9.digital> <865xxy2u6y.fsf@gnu.org> <877cieqnm0.fsf@ice9.digital> <8634szzvtv.fsf@gnu.org> <87il1vk08z.fsf@ice9.digital> <868r2ry1l2.fsf@gnu.org> <87a5n7jy8g.fsf@ice9.digital> <865xxvxyzo.fsf@gnu.org> <864jdfxyj3.fsf@gnu.org> <871q8jjvv8.fsf@ice9.digital> <861q8jxv5m.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13885"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Stefan Monnier , emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Mar 13 01:10:43 2024 Return-path: Envelope-to: ged-emacs-devel@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 1rkCCe-0003Ld-LW for ged-emacs-devel@m.gmane-mx.org; Wed, 13 Mar 2024 01:10:40 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rkCBb-0005O9-Gs; Tue, 12 Mar 2024 20:09:35 -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 1rkCBY-0005Nv-5s for emacs-devel@gnu.org; Tue, 12 Mar 2024 20:09:32 -0400 Original-Received: from relay7-d.mail.gandi.net ([217.70.183.200]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rkCBV-0004DE-Kj; Tue, 12 Mar 2024 20:09:31 -0400 Original-Received: by mail.gandi.net (Postfix) with ESMTPSA id 95D2220002; Wed, 13 Mar 2024 00:09:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ice9.digital; s=gm1; t=1710288558; 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=I6JNdNp4EdUZW1jCoztV8yjdH3GYPAlr2iZnr95aVnA=; b=jWG+rIDMOTsEPyki4oDsrUThtdYzOzRxF8a7vrCbFofMMB6X1tRMidAxxi8t8nl0IQOHTm OYBwR50ms5YU/Ymj3+FXKtgitYHo5nKH7IZ4f7hMKKGphMjw4IK/XWBrgV4IAAfL3o+NEq XWTFkYrJSgpwVO1naja0X8ZvKW9lbkKtU0pW/78SJbaG/DGdiw/fq7t1uTdGWYSOfd36de wpVoHwTqXkIqVRAgNI9FTYP6pBsiRu9fAbL9WFv7kcxO7OmHzNzM1YFnLC52PMAAmSbkLF 1dNHRvwqgT00oRgpkNOwmMWTi9U7S8l1Tt+8qNNsmgCPwh3nhd14okGZB/hj7A== In-Reply-To: <861q8jxv5m.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 09 Mar 2024 17:49:25 +0200") X-GND-Sasl: morgan@ice9.digital Received-SPF: pass client-ip=217.70.183.200; envelope-from=morgan@ice9.digital; helo=relay7-d.mail.gandi.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, 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-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:317022 Archived-At: Eli Zaretskii writes: >> > Why exactly do you need to have a buffer-local value of >> > completion-ignore-case? This is not a user option, and is meant to be >> > either set globally or let-bound for specific code. >> >> I was using it as a configuration example for a major-mode setup hook, >> where the language itself is not case-sensitive, but completions through >> capf functions (including TAG completion) can be displayed and inserted >> in mixed case. >> >> Is there a supported way to have user configurable case-insensitive >> completion that is configured per major mode? > > use the user options specific for each type of completion, I'd say. > For TAGS that's tags-case-fold-search; for file names that's > read-file-name-completion-ignore-case; for buffers its > read-buffer-completion-ignore-case. And there may be others. > > Stefan, any better ideas? I've tested wrapping the capf functions with Cape's cape-capf-case-fold transformer. This seems to give the ideal result for the actual completions and is fine to be restricted to the major-mode (the wrapped version is just another capf function which can be buffer-local). https://elpa.gnu.org/packages/cape.html I'll likely stick with this solution because it works so well, but thank you for looking at the built-in options. -- Morgan Willcock