From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: TAGS completion with (setq-local completion-ignore-case t) Date: Sat, 09 Mar 2024 16:26:35 +0200 Message-ID: <865xxvxyzo.fsf@gnu.org> 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> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18967"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Morgan Willcock Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Mar 09 15:26:59 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 1rixf8-0004ci-Dk for ged-emacs-devel@m.gmane-mx.org; Sat, 09 Mar 2024 15:26:58 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rixeo-0002ht-Nu; Sat, 09 Mar 2024 09:26:38 -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 1rixen-0002hk-Kj for emacs-devel@gnu.org; Sat, 09 Mar 2024 09:26:37 -0500 Original-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 1rixen-00051u-1j; Sat, 09 Mar 2024 09:26:37 -0500 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=hU2H/GHwnTUHMtrKHSROSHrfkAwvfZ43Xn7iNi8zcIE=; b=N95y8HsrcLua xcI7rBib3Vl06Z3zAHnEsuMU8fOqxt0AxbsaEo1zbKmsPV7HXz1gyuweSf0597aw6x21EKBrEwetu 3Njxybx8tIox66e3stsNWkp25E2JkuUv1GOj8s0kPEEDEvRiRa6bGwyYOeuvsQfp1eSX5rJW+is9G tjS4jlVsTac6XXzmQgqp/hFmpG0NyPfGiYf32vwublFoYOteJgBSKhIQZBo81gAhq6XqailpEWmd6 t3D7cbUepyvIwV1qQLzNWSHzUGXU97yxlGJFPZNBAfi3y4nce0BM+AIcDn01iZBwmqpW/8Bi9YA4B axGDzZGa22/X17hK0ASZnA==; In-Reply-To: <87a5n7jy8g.fsf@ice9.digital> (message from Morgan Willcock on Sat, 09 Mar 2024 14:06:39 +0000) 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:316950 Archived-At: > From: Morgan Willcock > Cc: emacs-devel@gnu.org > Date: Sat, 09 Mar 2024 14:06:39 +0000 > > Eli Zaretskii writes: > > > 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) \ Don't use setq-local, use setq. Or let-bind it, like this: (progn (pop-to-buffer (get-buffer-create "test")) (let ((tags-case-fold-search t)) (insert "is") (complete-tag) (complete-tag))) > 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). That's fine, and should not interfere. > It also pretty strange that setting completion-ignore-case to t has done > the opposite of what it advertises. It just is not heeded to. Like with read-file-name-completion-ignore-case in case of reading file names, and a few other similar variables.