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 15:30:33 +0200 Message-ID: <868r2ry1l2.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> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10790"; 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 14:31:11 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 1riwn8-0002fY-Iv for ged-emacs-devel@m.gmane-mx.org; Sat, 09 Mar 2024 14:31:10 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1riwmo-0002p5-0o; Sat, 09 Mar 2024 08:30:50 -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 1riwmf-0002n3-71 for emacs-devel@gnu.org; Sat, 09 Mar 2024 08:30:42 -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 1riwme-0002lj-Cq; Sat, 09 Mar 2024 08:30:40 -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=rqmPJPMVVEXAKWa211mYnuCxn5mxik4FQqD17gp/zHc=; b=U+PmjlN0q6/F kcxI7eVfWZgpq2sXCCVXBH683zIILerTnHELN/bg4eksjN1QatxjaXbz6HIVUN9qaXh24zbRH/j7f spafWuqEA8Ti5dwAXpdSWP5R0p3D8FEIzRr74FEl/rbA9b7IBYz72bvzaJDsoIDj0WpEWHBPD6ShB RgVXj+K3hHdoFvEY1/Hy9MOw3r2w0et8BOmfYdkH2xyaWLlRHJwPPdL2GfAQgoPBe5ZZd436HXGAe H50OYKlCqZDxU154CjNjVH4dX9dzvMUDRbD6EbDidZEF89UmaK63ufguzvV3iXwbF92gUp6yaJyFf tl0CL68Wcvs2T8KFG1xpbQ==; In-Reply-To: <87il1vk08z.fsf@ice9.digital> (message from Morgan Willcock on Sat, 09 Mar 2024 13:23:08 +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:316944 Archived-At: > From: Morgan Willcock > Cc: emacs-devel@gnu.org > Date: Sat, 09 Mar 2024 13:23:08 +0000 > > Eli Zaretskii writes: > > > Does the patch below give good results? > > > > diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el > > index 476037e..5976121 100644 > > --- a/lisp/progmodes/etags.el > > +++ b/lisp/progmodes/etags.el > > @@ -2065,7 +2065,8 @@ complete-tag > > (user-error "%s" > > (substitute-command-keys > > "No tags table loaded; try \\[visit-tags-table]"))) > > - (let ((comp-data (tags-completion-at-point-function))) > > + (let ((comp-data (tags-completion-at-point-function)) > > + (completion-ignore-case (find-tag--completion-ignore-case))) > > (if (null comp-data) > > (user-error "Nothing to complete") > > (completion-in-region (car comp-data) (cadr comp-data) > > 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.