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: Thu, 07 Mar 2024 11:37:27 +0000 Message-ID: <877cieqnm0.fsf@ice9.digital> References: <87frx2qu8z.fsf@ice9.digital> <868r2u2x4u.fsf@gnu.org> <87bk7qqsdk.fsf@ice9.digital> <865xxy2u6y.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="1191"; 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 Thu Mar 07 12:38:37 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 1riC56-000AeE-Bb for ged-emacs-devel@m.gmane-mx.org; Thu, 07 Mar 2024 12:38:36 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1riC47-00074j-7u; Thu, 07 Mar 2024 06:37:35 -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 1riC46-00074a-6U for emacs-devel@gnu.org; Thu, 07 Mar 2024 06:37:34 -0500 Original-Received: from relay6-d.mail.gandi.net ([217.70.183.198]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1riC44-0003yg-8o; Thu, 07 Mar 2024 06:37:33 -0500 Original-Received: by mail.gandi.net (Postfix) with ESMTPSA id A33B8C0003; Thu, 7 Mar 2024 11:37:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ice9.digital; s=gm1; t=1709811448; 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=CorAsdTzGAzSgLiPemSlVldrnCaneZk6J4vARSPsJo4=; b=mi6lanR0+ZkR8yeZMDjb7WdhZYuHe0OAUVJnd14snz7IKPaS5gGoCiMGAFl5O32xTk9lP2 uHQXwZbcbA+dSzTcJcYnJxG2Uh8SfiLLS+JgVQtgdFJxz5FW9EIqLPUzaF4ImqydXqWhzk 7UB2gFXXpyhebuIk7xGNeP8ZJwEjx9Dc5bbrwjSIBBbkbGicIIB0mnUaWMDaTBBoaLzLez tyWHVBDA8TlVNEs1875E3NoVFfZvJ0S+OizOmzDJv9YJjIcEe8+ALb14z3wcbGX5UIkShB 9LXoyUBbkPMN41hn5hvrbLXmKREGwPmXrniTKspu1ybdbAXK57k6QZLtliuegg== In-Reply-To: <865xxy2u6y.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 07 Mar 2024 12:49:09 +0200") X-GND-Sasl: morgan@ice9.digital Received-SPF: pass client-ip=217.70.183.198; envelope-from=morgan@ice9.digital; helo=relay6-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:316881 Archived-At: 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. > And what version of Emacs is that? I've tested on 29.2 and the master branch (as of a few hours ago). ## Generate a TAGS file. printf "Function IsSingle\nFunction IsString\n" > functions etags --lang=none --regex='/^function[ \t]+\([0-9A-Za-z:_]+\)/\1/i' functions ## Test default completion (case-sensitive). emacs -Q --eval "(progn \ (pop-to-buffer (get-buffer-create \"test\")) \ (visit-tags-table \"TAGS\") \ (insert \"Is\") \ (complete-tag) \ (complete-tag))" # 2 possible completions: # IsSingle # IsString ## Test case-insensitive completion (global). emacs -Q --eval "(progn \ (pop-to-buffer (get-buffer-create \"test\")) \ (setq completion-ignore-case t) \ (visit-tags-table \"TAGS\") \ (insert \"is\") \ (complete-tag) \ (complete-tag))" # 2 possible completions: # IsSingle # IsString ## Test case-insensitive completion (buffer-local). 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. ## Test case-insensitive completion (buffer-local, including TAGS buffer). emacs -Q --eval "(progn \ (pop-to-buffer (get-buffer-create \"test\")) \ (setq-local completion-ignore-case t) \ (visit-tags-table \"TAGS\") \ (with-current-buffer \"TAGS\" \ (setq-local completion-ignore-case t)) \ (insert \"is\") \ (complete-tag) \ (complete-tag))" # 2 possible completions: # IsSingle # IsString -- Morgan Willcock