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 09:51:56 +0200 Message-ID: <8634szzvtv.fsf@gnu.org> References: <87frx2qu8z.fsf@ice9.digital> <868r2u2x4u.fsf@gnu.org> <87bk7qqsdk.fsf@ice9.digital> <865xxy2u6y.fsf@gnu.org> <877cieqnm0.fsf@ice9.digital> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12149"; 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 08:52:53 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 1rirVl-0002wd-2d for ged-emacs-devel@m.gmane-mx.org; Sat, 09 Mar 2024 08:52:53 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rirUw-00058I-DI; Sat, 09 Mar 2024 02:52:02 -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 1rirUu-00058A-Hn for emacs-devel@gnu.org; Sat, 09 Mar 2024 02:52:00 -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 1rirUt-0000Af-Nk; Sat, 09 Mar 2024 02:51:59 -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=7i8dO+JJhF/uvuq6GMfDbYDE4t1JWiHApnwSp+vw4qU=; b=HqIKNE1HgfBe /tupemGcr64eQmvqJmWZ/ZSRidTBjuEZhtjb51dNSh6+yugxPC87kWMXVEjXuvirtGIvkhX5fr5o7 VdJkzuNHvEqtndFNWBYi6NMfPD7WcLdzYdd1ys1omIm0dOgXobcgKOVuexDEusjbQYow+WmPd5IK9 Y37mSF527rkj4td3kEe+JW6nQ4CuCaCwoohKsA2wTwt65VMk9VmwdXEfGbtcuCgASdQHc3RTSqb8N 7j4snXuYZEnX8KTIAbvMNzZiGYV/tS8l20FP8iRhmfQNi5ZJ4d6vnO7MDfjpJUowVUmB0c3fBVg5Z m+gj4JUdNi5i6DG0+yw/8w==; In-Reply-To: <877cieqnm0.fsf@ice9.digital> (message from Morgan Willcock on Thu, 07 Mar 2024 11:37:27 +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:316935 Archived-At: > From: Morgan Willcock > Cc: emacs-devel@gnu.org > Date: Thu, 07 Mar 2024 11:37:27 +0000 > > Eli Zaretskii writes: > > >> From: Morgan Willcock > >> Cc: emacs-devel@gnu.org > >> Date: Thu, 07 Mar 2024 09:54:31 +0000 > >> > >> Eli Zaretskii writes: > >> > >> >> Is there a technical reason why TAGS completion cannot use the value of > >> >> completion-ignore-case that is set in the buffer where completion is > >> >> initiated, or is this a bug in the implementation? > >> > > >> > If you mean completion when you type "M-.", then this has its own user > >> > option, tags-case-fold-search. Is that what you want? > >> > >> I am talking about completion as initiated by the complete-tag command. > >> > >> (Setting tags-case-fold-search to t does not change the result, whether > >> set buffer-local or globally). > > > > Can you show a complete recipe, starting from "emacs -Q", to reproduce > > the issue? > > I've included a script below which should demonstrate the problem, > i.e. no completions are generated when the buffer-local value of > completion-ignore-case is t until the value of completion-ignore-case is > also set to t for the TAGS buffer. 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)