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: Sat, 09 Mar 2024 14:06:39 +0000 Message-ID: <87a5n7jy8g.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> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24807"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Mar 09 15:07:02 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 1rixLp-0006Dm-3w for ged-emacs-devel@m.gmane-mx.org; Sat, 09 Mar 2024 15:07:01 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rixLc-0007ld-LT; Sat, 09 Mar 2024 09:06:48 -0500 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 1rixLa-0007lG-VZ for emacs-devel@gnu.org; Sat, 09 Mar 2024 09:06:47 -0500 Original-Received: from relay9-d.mail.gandi.net ([2001:4b98:dc4:8::229]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rixLY-0001YS-KB; Sat, 09 Mar 2024 09:06:46 -0500 Original-Received: by mail.gandi.net (Postfix) with ESMTPSA id 14F7CFF802; Sat, 9 Mar 2024 14:06:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ice9.digital; s=gm1; t=1709993200; 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=Fp7MCxWR7sji0n9TENg2Xr4wiAeUNeADC9f5vCV6g8Q=; b=CQ3FmFmx0qjyzlF5BwiELXKYeTeptx4t7f0dfaCaX/NnazoxzENjQsbTfbDM8HakcxeeQl WoHIGZhfGWT1hPMcy8sq3IdjyK5nbqAAE8b7hvvpQ9KexbYNG56BoFNwtoG4Txc3NG+2GH l7r1JscKSeZcz7Wuzz5HssRqfUDfcvLSN8f7EBhbYPZn2ss0PUN4tW4J9AzNa6TrqqwYNx VJ/rFO17PeESSSGKbcQaM0hz4O7BMDrgK8HA4C25gOyUIK++UDkuT9OveBU3VKyZYnwsBM eyvm5MEeAmNUJ2Tei+rgHjTF6kYTu+qP3ox728Z2Ic95sY295KPJ7zH0Gfd0Mw== In-Reply-To: <868r2ry1l2.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 09 Mar 2024 15:30:33 +0200") X-GND-Sasl: morgan@ice9.digital Received-SPF: pass client-ip=2001:4b98:dc4:8::229; envelope-from=morgan@ice9.digital; helo=relay9-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, 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:316948 Archived-At: Eli Zaretskii writes: >> I rebuilt from the latest commit on the master branch to incorporate the >> patch. Unfortunately, I do not see any change in the result of the >> failing test case; the completion still appears to be case-sensitive. >> >> printf "Function IsSingle\nFunction IsString\n" > functions >> etags --lang=none --regex='/^function[ \t]+\([0-9A-Za-z:_]+\)/\1/i' functions >> emacs -Q --eval "(progn \ >> (pop-to-buffer (get-buffer-create \"test\")) \ >> (setq-local completion-ignore-case t) \ >> (visit-tags-table \"TAGS\") \ >> (insert \"is\") \ >> (complete-tag) \ >> (complete-tag))" >> >> # No completions. > > You need to set tags-case-fold-search, not the buffer-local value of > completion-ignore-case. That's because the commands in etags.el look > at tags-case-fold-search to decide whether they should ignore > letter-case. Setting tags-case-fold-search to t (buffer-local or not) doesn't seem to have any effect when completion-ignore-case is also set to t. emacs -Q --eval "(progn \ (pop-to-buffer (get-buffer-create \"test\")) \ (setq-local completion-ignore-case t) \ (setq-local tags-case-fold-search t) \ (visit-tags-table \"TAGS\") \ (insert \"is\") \ (complete-tag) \ (complete-tag))" # No completions. emacs -Q --eval "(progn \ (pop-to-buffer (get-buffer-create \"test\")) \ (setq-local completion-ignore-case t) \ (setq tags-case-fold-search t) \ (visit-tags-table \"TAGS\") \ (insert \"is\") \ (complete-tag) \ (complete-tag))" # No completions. I would still need to set completion-ignore-case to t because that is still relevant for other capf backends for the buffer (but not for all buffers). It also pretty strange that setting completion-ignore-case to t has done the opposite of what it advertises. -- Morgan Willcock