From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#64351: probabe bug associated with =?UTF-8?Q?=E2=80=9Ccompletion-regexp-list=E2=80=9D?= Date: Sat, 01 Jul 2023 10:19:50 -0400 Message-ID: References: <83v8f5sc6p.fsf@gnu.org> <83h6qosr82.fsf@gnu.org> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35216"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: one.last.kiss@outlook.com, 64351@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jul 01 16:21:19 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1qFbTT-0008yU-PS for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 01 Jul 2023 16:21:19 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qFbTE-0000CR-M1; Sat, 01 Jul 2023 10:21:04 -0400 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 1qFbTC-0000Bk-QY for bug-gnu-emacs@gnu.org; Sat, 01 Jul 2023 10:21:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qFbTC-0006cQ-IX for bug-gnu-emacs@gnu.org; Sat, 01 Jul 2023 10:21:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qFbTC-0003c8-Ek for bug-gnu-emacs@gnu.org; Sat, 01 Jul 2023 10:21:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 01 Jul 2023 14:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64351 X-GNU-PR-Package: emacs Original-Received: via spool by 64351-submit@debbugs.gnu.org id=B64351.168822120813809 (code B ref 64351); Sat, 01 Jul 2023 14:21:02 +0000 Original-Received: (at 64351) by debbugs.gnu.org; 1 Jul 2023 14:20:08 +0000 Original-Received: from localhost ([127.0.0.1]:58422 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qFbSK-0003af-GJ for submit@debbugs.gnu.org; Sat, 01 Jul 2023 10:20:08 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:44390) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qFbSF-0003Zz-0q for 64351@debbugs.gnu.org; Sat, 01 Jul 2023 10:20:07 -0400 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 5DB004409B5; Sat, 1 Jul 2023 10:19:57 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 72BAD4401D5; Sat, 1 Jul 2023 10:19:51 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1688221191; bh=7Q8wH+itP6eg5toD/RSYloEWP4+a111n0sx5sctYF1k=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=pVQPTHKYKOWXy2ISrDkXd/uud09Y0nPsnxKhd1VgD0J7aryBl8m8kiaP+ItlVzj+B 1yO5HGB/+lemJJAdMbGVvf0/+FT2ZGJu0F6QCtkc5PGrV6NMRsjPMsl68ATELcippD VA6CDYixuiAjhzf+TVWnXKzX/xL8gGUuO7qfhqRinUA7xw539vPnM0MnlRYRnYSnsr 7eesxzpydThhruW7E7X4643xIsJmm3sYXMzGcoU+VyzYQAjDK4icCkPgKbpCOn8Olt bo+HvrABIGd5++aMqT5sO/ZRlFn2uT0qeRFKbDM21b2AnhN71i/6u0QTJ3U9l6tFqE LDZpqK+g0hCog== Original-Received: from pastel (69-165-155-162.dsl.teksavvy.com [69.165.155.162]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 4AA1212046D; Sat, 1 Jul 2023 10:19:51 -0400 (EDT) In-Reply-To: <83h6qosr82.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 30 Jun 2023 22:08:29 +0300") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:264408 Archived-At: >> Bad idea. >> Admittedly, `completion-regexp-list` is documented poorly enough that >> it's not clear what usage is valid and what isn't, but a lot of >> completion code will be broken if you set it globally to anything else >> than nil. > > Would you mind telling more about valid uses of this? > I'd like to improve the documentation. Here's what I know: `completion-regexp-list` used to be virtually unused in Emacs's code base, so I don't know what was its intended use. But when completion UIs started to offer other styles than just prefix-based completion, they also started to use `try/all/test-completion` more "internally" (i.e. for intermediate computations rather than to compute the final list of completions displayed to the user) and they did it without paying attention to `completion-regexp-list`, i.e. in ways which tended to just misbehave when `completion-regexp-list` wasn't nil. So, in practice nowadays, the only reliable way to use `completion-regexp-list` is to think of it as an optional argument to `try/all/test-completion`, but one that has to be provided via a nearby let-binding rather than by listing it explicitly at the call site. > You are saying that you don't like my proposed patch for the emacs-29 > branch, and would even prefer to leave it unfixed? Your patch is harmless, IMO, so it's OK to install it. > The binding you propose might be appropriate for master, but not for > the release branch. Agreed. > > Or alternatively to say "if it hurts, don't do that". > That could be okay, if we also say how to use this variable so it > doesn't hurt. My opinion is that we should document that variable as something that's not meant to be used/set by users, but only one that should be set by the code that calls `try/all/test-completion`. Stefan