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#66979: Wrong number of arguments with completion-at-point Date: Tue, 07 Nov 2023 13:31:40 -0500 Message-ID: References: <86il6ef4hc.fsf@mail.linkov.net> <86il6dzbz8.fsf@mail.linkov.net> 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="24369"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 66979@debbugs.gnu.org To: Juri Linkov , Alan Mackenzie Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Nov 07 19:32:47 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 1r0QsX-000658-Ry for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 07 Nov 2023 19:32:46 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r0QsE-0002bS-33; Tue, 07 Nov 2023 13:32:26 -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 1r0QsC-0002Yy-CI for bug-gnu-emacs@gnu.org; Tue, 07 Nov 2023 13:32:24 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r0QsC-0007M8-42 for bug-gnu-emacs@gnu.org; Tue, 07 Nov 2023 13:32:24 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1r0Qsn-00015F-Qj for bug-gnu-emacs@gnu.org; Tue, 07 Nov 2023 13:33:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 07 Nov 2023 18:33:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66979 X-GNU-PR-Package: emacs Original-Received: via spool by 66979-submit@debbugs.gnu.org id=B66979.16993819484121 (code B ref 66979); Tue, 07 Nov 2023 18:33:01 +0000 Original-Received: (at 66979) by debbugs.gnu.org; 7 Nov 2023 18:32:28 +0000 Original-Received: from localhost ([127.0.0.1]:43273 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r0QsF-00014P-Lj for submit@debbugs.gnu.org; Tue, 07 Nov 2023 13:32:27 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:56155) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r0QsD-000149-9F for 66979@debbugs.gnu.org; Tue, 07 Nov 2023 13:32:26 -0500 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 72A50100068; Tue, 7 Nov 2023 13:31:41 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1699381900; bh=E62vUhjtTYsTKyrx8Em5fIA/uTOYgeBeS7XF44ZtVxY=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=HP98EOa4uhKTyad303Podj1sbjvhWjqAigwk4AvIJZLQHe6+w7D5yRjXJNtrQpjya l/0KwqWAzCq21PpjzSj2Za3Sk2eIVq4f/3J4G+EvX8biRDdxpgjMON9LS8b8DIC9UA E64aqpZVnat2rETkISFbTKjHRkUI+jSkCNRogoot/1Vf3Dk1LiyjJuASvLHPsT6xao 5vwKE8E+YfBfYd/3oDcPpk3IDfjnYfEVPX72Vy7SE3yC5VurOjlVoKWqu/JFVp1SK+ 6cuvzVm4gTQvR6Ubh6I2Vf70XX4IF6ooPnsoswXznqRDa3xfoIL9PLCNTMKCbImUaR 6IfarL6MWpKow== Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id C3AC3100033; Tue, 7 Nov 2023 13:31:40 -0500 (EST) Original-Received: from pastel (unknown [45.72.212.125]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 99FF9120270; Tue, 7 Nov 2023 13:31:40 -0500 (EST) In-Reply-To: <86il6dzbz8.fsf@mail.linkov.net> (Juri Linkov's message of "Tue, 07 Nov 2023 19:53:31 +0200") 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:273944 Archived-At: >> Some recent change broke completion-at-point: >> >> 0. emacs -Q >> 1. (setq debug-on-error t) >> 2. Type in the *scratch*: >> >> (defun a M-C-i >> >> raises the error (wrong-number-of-arguments (2 . 2) 1) > > Stefan, this looks like another case for the recently fixed > bug#58148, bug#58396, bug#58557. So you're suggesting we should remove the `debug` from the `condition-case` in `elisp--local-variables`? This was added by Alan in: commit f931cebce76d911dfc61274e0a8c1de3627b9179 Author: Alan Mackenzie Date: Wed Sep 20 15:51:17 2023 +0000 Insert symbol `debug' into two condition-case handlers This fixes bug#65622. Also correct a mismatch between a function to which advice is added, and that from which it is removed. * lisp/emacs-lisp/macroexp.el (internal-macroexpand-for-load): Add a `debug' to the condition-case handler for `error', so that a useful backtrace will be produced on a macro expansion error. * lisp/progmodes/elisp-mode.el (elisp--local-variables): Add `debug' to a condition-case handler, as above. In the advice-remove call, give the same function, macroexpand-1, as in the corresponding advice-add call. Alan do you remember why you also added the `debug` to the condition-case in `elisp--local-variables`? The rest of the commit looks right to me. Macro expansion errors in there are perfectly normal since `elisp--local-variables` routinely passes incomplete code to macroexpand. IOW most errors signal'd in there probably don't need to be debugged at all. Stefan