X-Loop: help-debbugs@HIDDEN Subject: bug#69501: 30.0.50; customize-mode error with substring completion style Resent-From: Eshel Yaron <me@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Sat, 02 Mar 2024 09:01:02 +0000 Resent-Message-ID: <handler.69501.B.170937003215143 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: report 69501 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 69501 <at> debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@HIDDEN Received: via spool by submit <at> debbugs.gnu.org id=B.170937003215143 (code B ref -1); Sat, 02 Mar 2024 09:01:02 +0000 Received: (at submit) by debbugs.gnu.org; 2 Mar 2024 09:00:32 +0000 Received: from localhost ([127.0.0.1]:37997 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1rgLEI-0003vV-Af for submit <at> debbugs.gnu.org; Sat, 02 Mar 2024 04:00:30 -0500 Received: from lists.gnu.org ([209.51.188.17]:35280) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <me@HIDDEN>) id 1rgLED-0003uR-Vf for submit <at> debbugs.gnu.org; Sat, 02 Mar 2024 04:00:24 -0500 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 <me@HIDDEN>) id 1rgLDl-0008Qm-Cb for bug-gnu-emacs@HIDDEN; Sat, 02 Mar 2024 03:59:53 -0500 Received: from mail.eshelyaron.com ([107.175.124.16] helo=eshelyaron.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <me@HIDDEN>) id 1rgLDk-00083m-3h for bug-gnu-emacs@HIDDEN; Sat, 02 Mar 2024 03:59:53 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=eshelyaron.com; s=mail; t=1709369990; bh=YKgeKAPqo6r9Tvm+kcEIf2eoe1n4pF7b+JeqlOWDMd8=; h=From:To:Subject:Date:From; b=k1Yglc3iYdicI4w7qjXeXihEpFvFOlb/zIbWANJLhiJqO/7FUC8B6ViJs2jSLENQP PPu2TAkyQIpDaA4ImQFFmkZe06nt/2bw7e7VY7vyI5+8LNlNsn13YHfdEYw4AQAWqX /uQxonmdRvQAjR1cl9mOsFatjy5xuyqBcHm/Fpol0oGrRHio7QwAp9nOq0lWM6WvHl 6fUlzMFOteCUuGH6rLp/+/YHG3qsaH9WZIkNQcA/xYue3nOCAsFhiHMFMxHIEknOH4 qESN/2SXLe8n36GjPx01HGiD+lixDva2egaDTdgHOMdEYvgdphjOch0DfemxXzEQZ4 BSRcF528QJ3Sw== From: Eshel Yaron <me@HIDDEN> Date: Sat, 02 Mar 2024 09:59:48 +0100 Message-ID: <m1h6hpxb3v.fsf@HIDDEN> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=107.175.124.16; envelope-from=me@HIDDEN; helo=eshelyaron.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, 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-Spam-Score: -1.4 (-) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -2.4 (--) Hi, With both Emacs 29.2 and with the current master: 1. emacs -Q 2. (setq completion-styles '(substring)) 3. C-u M-x customize-mode TAB 4. "Assertion failed: (stringp suffix)" I not sure exactly why this error occurs, but IIUC it has to do with the fact that customize-mode let-binds completion-regexp-list. I suspect that the substring completion style doesn't handle that correctly. In general, let-binding completion-regexp-list around completing-read is not a great idea IMO because it affects recursive minibuffers as well. So perhaps the best solution is to avoid doing that in customize-mode, and to rely only on the predicate argument of completing-read instead? Best, Eshel
Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) Content-Type: text/plain; charset=utf-8 X-Loop: help-debbugs@HIDDEN From: help-debbugs@HIDDEN (GNU bug Tracking System) To: Eshel Yaron <me@HIDDEN> Subject: bug#69501: Acknowledgement (30.0.50; customize-mode error with substring completion style) Message-ID: <handler.69501.B.170937003215143.ack <at> debbugs.gnu.org> References: <m1h6hpxb3v.fsf@HIDDEN> X-Gnu-PR-Message: ack 69501 X-Gnu-PR-Package: emacs Reply-To: 69501 <at> debbugs.gnu.org Date: Sat, 02 Mar 2024 09:01:03 +0000 Thank you for filing a new bug report with debbugs.gnu.org. This is an automatically generated reply to let you know your message has been received. Your message is being forwarded to the package maintainers and other interested parties for their attention; they will reply in due course. Your message has been sent to the package maintainer(s): bug-gnu-emacs@HIDDEN If you wish to submit further information on this problem, please send it to 69501 <at> debbugs.gnu.org. Please do not send mail to help-debbugs@HIDDEN unless you wish to report a problem with the Bug-tracking system. --=20 69501: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D69501 GNU Bug Tracking System Contact help-debbugs@HIDDEN with problems
X-Loop: help-debbugs@HIDDEN Subject: bug#69501: 30.0.50; customize-mode error with substring completion style Resent-From: Eli Zaretskii <eliz@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Mon, 04 Mar 2024 13:17:02 +0000 Resent-Message-ID: <handler.69501.B69501.170955822110023 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 69501 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eshel Yaron <me@HIDDEN>, Stefan Monnier <monnier@HIDDEN>, Mauro Aranda <maurooaranda@HIDDEN> Cc: 69501 <at> debbugs.gnu.org Received: via spool by 69501-submit <at> debbugs.gnu.org id=B69501.170955822110023 (code B ref 69501); Mon, 04 Mar 2024 13:17:02 +0000 Received: (at 69501) by debbugs.gnu.org; 4 Mar 2024 13:17:01 +0000 Received: from localhost ([127.0.0.1]:42538 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1rh8Bg-0002bb-S8 for submit <at> debbugs.gnu.org; Mon, 04 Mar 2024 08:17:01 -0500 Received: from eggs.gnu.org ([209.51.188.92]:39180) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1rh8Bd-0002bN-3S for 69501 <at> debbugs.gnu.org; Mon, 04 Mar 2024 08:16:59 -0500 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 <eliz@HIDDEN>) id 1rh8B0-0004JV-CE; Mon, 04 Mar 2024 08:16:19 -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=plgIpxoKkkL2j2TaOFL7n3sc8PDYYd5qUwGxUfV+6AY=; b=nnnO0jvWiQIS 3Tvw834zbjz2DxTy1ry/2DNQKpNPsDd/PeDywmSYTixjNAOp8ekyJzvl1LBj8upTpKWl5i5x35Y0R 17Hku4lw/rrwtbZiEVHSmxzZuVEyYa8y0H1RsqRoGBLqMaEnsr8p2ZU9Sgfo2A0cVQ0pu415GENtt /b3EnsaNZL30vwe4mB/fWs0dkuIdZr11CnwgEkb3lyJz5M5mWHdGEEOqGS/nRu8ILpvg9+f5D2ky3 1OSlEuksOUYKLIoFROjx4uIsOQOh2RqPaj7oqmx0I8aG3SWqc7U0V+jyzZvddi3W2J0WjnxUHAXo6 liBHW4hAxGGppyBVWoyMVw==; Date: Mon, 04 Mar 2024 15:16:12 +0200 Message-Id: <86frx6m92b.fsf@HIDDEN> From: Eli Zaretskii <eliz@HIDDEN> In-Reply-To: <m1h6hpxb3v.fsf@HIDDEN> (bug-gnu-emacs@HIDDEN) References: <m1h6hpxb3v.fsf@HIDDEN> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) > Date: Sat, 02 Mar 2024 09:59:48 +0100 > From: Eshel Yaron via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" <bug-gnu-emacs@HIDDEN> > > With both Emacs 29.2 and with the current master: > > 1. emacs -Q > 2. (setq completion-styles '(substring)) > 3. C-u M-x customize-mode TAB > 4. "Assertion failed: (stringp suffix)" > > I not sure exactly why this error occurs, but IIUC it has to do with the > fact that customize-mode let-binds completion-regexp-list. I suspect > that the substring completion style doesn't handle that correctly. > > In general, let-binding completion-regexp-list around completing-read is > not a great idea IMO because it affects recursive minibuffers as well. > So perhaps the best solution is to avoid doing that in customize-mode, > and to rely only on the predicate argument of completing-read instead? Stefan and Mauro, any suggestions?
X-Loop: help-debbugs@HIDDEN Subject: bug#69501: 30.0.50; customize-mode error with substring completion style Resent-From: Mauro Aranda <maurooaranda@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Tue, 05 Mar 2024 12:38:02 +0000 Resent-Message-ID: <handler.69501.B69501.17096422649446 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 69501 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii <eliz@HIDDEN>, Eshel Yaron <me@HIDDEN>, Stefan Monnier <monnier@HIDDEN> Cc: 69501 <at> debbugs.gnu.org Received: via spool by 69501-submit <at> debbugs.gnu.org id=B69501.17096422649446 (code B ref 69501); Tue, 05 Mar 2024 12:38:02 +0000 Received: (at 69501) by debbugs.gnu.org; 5 Mar 2024 12:37:44 +0000 Received: from localhost ([127.0.0.1]:46825 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1rhU3E-0002SH-7D for submit <at> debbugs.gnu.org; Tue, 05 Mar 2024 07:37:44 -0500 Received: from mail-pj1-f41.google.com ([209.85.216.41]:59899) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <maurooaranda@HIDDEN>) id 1rhU3A-0002Ry-Uk for 69501 <at> debbugs.gnu.org; Tue, 05 Mar 2024 07:37:43 -0500 Received: by mail-pj1-f41.google.com with SMTP id 98e67ed59e1d1-29996cc6382so4185483a91.3 for <69501 <at> debbugs.gnu.org>; Tue, 05 Mar 2024 04:37:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709642164; x=1710246964; darn=debbugs.gnu.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=i0RTFy3j6uJYlro2xEq+U+PdzCO3EN2vh/lmttRoqrA=; b=Hv8+0VX50Q+mOz2aFvhDhhkA7fpcl3qggXnSMh5U/dwn26DP2ZPHzZdptnSIpTebcj Vl7XAEPOp4mx6qt1OMoizh0gX6SrhzX9jmsp1QSw0CmO8hypIBrfOFdUtHzQgraXgQ7P XNG0T7bWOJOgxG5tOsaO62pjZhlZbxh0kR7G9hC4smhljJpiJ3FrrLf35JRc0PrftJ7G 1IeRPM47IF+YmGrTc6x1ZBkgCViwPIi7VbwqYwi1OOWO12upe1yCKPK2tU0LCjEXJgtH yYUDFurm+4KVnVpeg8IoOBn3Tv9WIMgbhchO66IydwQdbPIWEO8a3GT58/p5vAd5Dlya qTuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709642164; x=1710246964; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=i0RTFy3j6uJYlro2xEq+U+PdzCO3EN2vh/lmttRoqrA=; b=hgVOJwgrSD8COnU7JBiAQ0JIGgr5FAgWt4euj1D/SfZBxhAHGyFeYFMii5hXavsNuG ZOoFk+kMarbntuz31PoxaUJtLXfEAawzGnX6zNL6HnZFLB0sWUX75IGuaQoIb+1k1kXz M1X5PDUD4HKzlheDFOqWfCQKE4QOnJoWmMaWlL2Ryi0Oq1Jbo6WbXWZO4axsYMT4qliN lJ2qkMK8Olfk5kqEsCYNJqUkXJBZut3tIaFwFj2vgQhcWVKILH2Dncs/OhenybbVwA6C 8lN5i5f4UqjBZfRARhCv8XKuTUGvvBLqM4G+W+i3JvdLjc3hHcyuL2/7rJg6XGdoYd6D hpYw== X-Gm-Message-State: AOJu0YxG9KHMinlWcJncktepyCUWJa1BzpOYX/C6LyKZIK19Gx+WZjzr 91UP3+4+gTLxwr1wMYXsjQlZ4gGnKRco0ZxcbVn7CrFTuZyP/FBA X-Google-Smtp-Source: AGHT+IE05Ok3gl0V2tB/nGuLztxeuo3mvb+utc3gzmFtP3Xk95XLPAZCvdOqc6HWvK2nmYjyOKldRQ== X-Received: by 2002:a17:90a:bc06:b0:29b:2d64:68e5 with SMTP id w6-20020a17090abc0600b0029b2d6468e5mr9202149pjr.31.1709642164514; Tue, 05 Mar 2024 04:36:04 -0800 (PST) Received: from [192.168.0.100] ([181.228.33.6]) by smtp.gmail.com with ESMTPSA id ph12-20020a17090b3bcc00b0029abb5e1d9bsm11642690pjb.47.2024.03.05.04.36.02 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 05 Mar 2024 04:36:04 -0800 (PST) Message-ID: <83151b52-44e8-44bb-be38-a38b709135d5@HIDDEN> Date: Tue, 5 Mar 2024 09:36:01 -0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird References: <m1h6hpxb3v.fsf@HIDDEN> <86frx6m92b.fsf@HIDDEN> Content-Language: en-US From: Mauro Aranda <maurooaranda@HIDDEN> In-Reply-To: <86frx6m92b.fsf@HIDDEN> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -1.0 (-) On 4/3/24 10:16, Eli Zaretskii wrote: >> Date: Sat, 02 Mar 2024 09:59:48 +0100 >> From: Eshel Yaron via "Bug reports for GNU Emacs, >> the Swiss army knife of text editors" <bug-gnu-emacs@HIDDEN> >> >> With both Emacs 29.2 and with the current master: >> >> 1. emacs -Q >> 2. (setq completion-styles '(substring)) >> 3. C-u M-x customize-mode TAB >> 4. "Assertion failed: (stringp suffix)" >> >> I not sure exactly why this error occurs, but IIUC it has to do with the >> fact that customize-mode let-binds completion-regexp-list. I suspect >> that the substring completion style doesn't handle that correctly. >> >> In general, let-binding completion-regexp-list around completing-read is >> not a great idea IMO because it affects recursive minibuffers as well. >> So perhaps the best solution is to avoid doing that in customize-mode, >> and to rely only on the predicate argument of completing-read instead? > > Stefan and Mauro, any suggestions? I took a quick look, but I don't know how "relying on the predicate argument of completing-read" looks in practice. It seems I have forgotten how to use the completion functions (if I ever knew how to use them at all). Hopefully Stefan will be of more help.
X-Loop: help-debbugs@HIDDEN Subject: bug#69501: 30.0.50; customize-mode error with substring completion style Resent-From: Eli Zaretskii <eliz@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Thu, 14 Mar 2024 08:27:02 +0000 Resent-Message-ID: <handler.69501.B69501.171040481431107 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 69501 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: monnier@HIDDEN, Mauro Aranda <maurooaranda@HIDDEN> Cc: 69501 <at> debbugs.gnu.org, me@HIDDEN Received: via spool by 69501-submit <at> debbugs.gnu.org id=B69501.171040481431107 (code B ref 69501); Thu, 14 Mar 2024 08:27:02 +0000 Received: (at 69501) by debbugs.gnu.org; 14 Mar 2024 08:26:54 +0000 Received: from localhost ([127.0.0.1]:48246 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1rkgQQ-00085f-7S for submit <at> debbugs.gnu.org; Thu, 14 Mar 2024 04:26:54 -0400 Received: from eggs.gnu.org ([209.51.188.92]:58416) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1rkgQG-00085H-MB for 69501 <at> debbugs.gnu.org; Thu, 14 Mar 2024 04:26:53 -0400 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 <eliz@HIDDEN>) id 1rkgPb-0005n7-Mv; Thu, 14 Mar 2024 04:26:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=MTGcar5V+IrDJYeocg26Vk5WyZ+FIiXom84nRDH7LA8=; b=MHWLGwGJCWNbnNq7LHpq 2wr/7TfGCY05YIyTPKpuwgXwebI0L9W+lFCF3cDanYgLA1wwWJVGfsPwEwW1cuSQqz1y/0qCRt1x3 Q5n2EIsS300VHRMMjm+4QWqaQSqHxELJ58Mv08uEurdTLxACV2Wibzo9d8vDw5EvEQV96fzGqykKD ZgEN6hmrrp5J/wybe1mIC4lHBusNep6JernLvyLH99BC9Y2aeBRjrwFJbIyAfT7mvtMYIhNBxiiES OZ+89mlIlpHjg5zt1LQvIYtJT37I4dey9DkPcnp6d2VqtY8VSkresrMxKL738HrkLW6XDk4bmGu4O 8tqPH1JIxJ2UVg==; Date: Thu, 14 Mar 2024 10:26:01 +0200 Message-Id: <86h6h9b4o6.fsf@HIDDEN> From: Eli Zaretskii <eliz@HIDDEN> In-Reply-To: <83151b52-44e8-44bb-be38-a38b709135d5@HIDDEN> (message from Mauro Aranda on Tue, 5 Mar 2024 09:36:01 -0300) References: <m1h6hpxb3v.fsf@HIDDEN> <86frx6m92b.fsf@HIDDEN> <83151b52-44e8-44bb-be38-a38b709135d5@HIDDEN> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) > Date: Tue, 5 Mar 2024 09:36:01 -0300 > Cc: 69501 <at> debbugs.gnu.org > From: Mauro Aranda <maurooaranda@HIDDEN> > > On 4/3/24 10:16, Eli Zaretskii wrote: > >> Date: Sat, 02 Mar 2024 09:59:48 +0100 > >> From: Eshel Yaron via "Bug reports for GNU Emacs, > >> the Swiss army knife of text editors" <bug-gnu-emacs@HIDDEN> > >> > >> With both Emacs 29.2 and with the current master: > >> > >> 1. emacs -Q > >> 2. (setq completion-styles '(substring)) > >> 3. C-u M-x customize-mode TAB > >> 4. "Assertion failed: (stringp suffix)" > >> > >> I not sure exactly why this error occurs, but IIUC it has to do with the > >> fact that customize-mode let-binds completion-regexp-list. I suspect > >> that the substring completion style doesn't handle that correctly. > >> > >> In general, let-binding completion-regexp-list around completing-read is > >> not a great idea IMO because it affects recursive minibuffers as well. > >> So perhaps the best solution is to avoid doing that in customize-mode, > >> and to rely only on the predicate argument of completing-read instead? > > > > Stefan and Mauro, any suggestions? > > I took a quick look, but I don't know how "relying on the predicate > argument of completing-read" looks in practice. It seems I have > forgotten how to use the completion functions (if I ever knew how to use > them at all). Hopefully Stefan will be of more help. Stefan?
X-Loop: help-debbugs@HIDDEN Subject: bug#69501: 30.0.50; customize-mode error with substring completion style Resent-From: Stefan Monnier <monnier@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Thu, 14 Mar 2024 18:13:01 +0000 Resent-Message-ID: <handler.69501.B69501.171043993120274 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 69501 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eshel Yaron <me@HIDDEN> Cc: 69501 <at> debbugs.gnu.org Received: via spool by 69501-submit <at> debbugs.gnu.org id=B69501.171043993120274 (code B ref 69501); Thu, 14 Mar 2024 18:13:01 +0000 Received: (at 69501) by debbugs.gnu.org; 14 Mar 2024 18:12:11 +0000 Received: from localhost ([127.0.0.1]:50589 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1rkpYo-0005Gw-OY for submit <at> debbugs.gnu.org; Thu, 14 Mar 2024 14:12:11 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:53293) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <monnier@HIDDEN>) id 1rkpYn-0005Gi-2y for 69501 <at> debbugs.gnu.org; Thu, 14 Mar 2024 14:12:09 -0400 Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 36C66442D9D; Thu, 14 Mar 2024 14:11:27 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1710439881; bh=XB9nI+o5pVzqDwksZ3TapZ5lJDit4qOv95a2plVqO3E=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=WebXEqTR6ADgOIgbKlvsAIyrPkMn8nNFLeboNfjCAVfSI6xqQFBTJg3C0mP1Dd5Kf gwX2Y/8k3YHZ6NXe7hwap+cjbroNI5TaSwd+B04oEeJDcxL2yr5dQKIwbqyucFgRtH RL/qVe7ljVN63DuDWPDDVBfFX7ZbqdfO9T3DgfYQDpgt47dwdGdKzf0uszR4wVNLMm GOkwPpZocKYqoJfv9BwAFc1vC6mlcbbKGHTRbJAMc854dGR+mNnhMZI7csCv68iHpJ 7eT0g9DEJaekO4/yOE9z+hjPKCSb7rZB5p7oXhSz9RDxsRWrtjUdrwu/awNwr05+XX 8rvRFf3wYjv8Q== Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id B450F442DA0; Thu, 14 Mar 2024 14:11:21 -0400 (EDT) Received: from pastel (unknown [216.154.27.181]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 97BBF120198; Thu, 14 Mar 2024 14:11:21 -0400 (EDT) From: Stefan Monnier <monnier@HIDDEN> In-Reply-To: <m1h6hpxb3v.fsf@HIDDEN> (Eshel Yaron's message of "Sat, 02 Mar 2024 09:59:48 +0100") Message-ID: <jwvo7bglmr0.fsf-monnier+emacs@HIDDEN> References: <m1h6hpxb3v.fsf@HIDDEN> Date: Thu, 14 Mar 2024 14:11:20 -0400 User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from domain T_SCC_BODY_TEXT_LINE -0.01 - X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) > In general, let-binding completion-regexp-list around completing-read is > not a great idea IMO Definitely: `completion-regexp-list` should be let-bound only right around calls to `try/all-completions`. > because it affects recursive minibuffers as well. > So perhaps the best solution is to avoid doing that in customize-mode, > and to rely only on the predicate argument of completing-read instead? Indeed (see patch below). We should probably also change the completion code so it defends against such let-bindings of `completion-regexp-list`. Stefan diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index 8fad51dc116..f004002333b 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el @@ -1159,14 +1159,15 @@ customize-mode for the MODE to customize." (interactive (list - (let ((completion-regexp-list '("-mode\\'")) - (group (custom-group-of-mode major-mode))) + (let ((group (custom-group-of-mode major-mode))) (if (and group (not current-prefix-arg)) major-mode (intern (completing-read (format-prompt "Mode" (and group major-mode)) obarray - 'custom-group-of-mode + (lambda (s) + (and (string-match "-mode\\'" (symbol-name s)) + (custom-group-of-mode s))) t nil nil (if group (symbol-name major-mode)))))))) (customize-group (custom-group-of-mode mode)))
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.