From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#66979: Wrong number of arguments with completion-at-point Date: Tue, 7 Nov 2023 19:50:22 +0000 Message-ID: References: <86il6ef4hc.fsf@mail.linkov.net> <86il6dzbz8.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30695"; mail-complaints-to="usenet@ciao.gmane.io" Cc: acm@muc.de, 66979@debbugs.gnu.org, Juri Linkov To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Nov 07 20:51:42 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 1r0S6w-0007ir-8R for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 07 Nov 2023 20:51:42 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r0S6j-0005RL-19; Tue, 07 Nov 2023 14:51:29 -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 1r0S6e-0005Nl-36 for bug-gnu-emacs@gnu.org; Tue, 07 Nov 2023 14:51: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 1r0S6d-00052z-RD for bug-gnu-emacs@gnu.org; Tue, 07 Nov 2023 14:51:23 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1r0S7F-0003FQ-Ja for bug-gnu-emacs@gnu.org; Tue, 07 Nov 2023 14:52:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 07 Nov 2023 19:52: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.169938667012407 (code B ref 66979); Tue, 07 Nov 2023 19:52:01 +0000 Original-Received: (at 66979) by debbugs.gnu.org; 7 Nov 2023 19:51:10 +0000 Original-Received: from localhost ([127.0.0.1]:43297 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r0S6Q-0003E3-BN for submit@debbugs.gnu.org; Tue, 07 Nov 2023 14:51:10 -0500 Original-Received: from mail.muc.de ([193.149.48.3]:38116) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r0S6O-0003Do-OT for 66979@debbugs.gnu.org; Tue, 07 Nov 2023 14:51:09 -0500 Original-Received: (qmail 98993 invoked by uid 3782); 7 Nov 2023 20:50:24 +0100 Original-Received: from acm.muc.de (p4fe15714.dip0.t-ipconnect.de [79.225.87.20]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Tue, 07 Nov 2023 20:50:23 +0100 Original-Received: (qmail 18523 invoked by uid 1000); 7 Nov 2023 19:50:22 -0000 Content-Disposition: inline In-Reply-To: X-Submission-Agent: TMDA/1.3.x (Ph3nix) X-Primary-Address: acm@muc.de 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:273946 Archived-At: Hello, Stefan On Tue, Nov 07, 2023 at 13:31:40 -0500, Stefan Monnier wrote: > >> 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. I was trying to debug an error in eager macro expansion (i.e. macro expansion in forms called directly by read), and that was the condition-case that was suppressing the backtrace. > 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. But when somebody has set debug-on-error to t, they _want_ those errors signalled, surely? > Stefan -- Alan Mackenzie (Nuremberg, Germany).