From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jens Schmidt via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#58396: 29.0.50; Optimization failure for add-to-list Date: Tue, 26 Sep 2023 22:30:47 +0200 Message-ID: <87o7hod6dk.fsf@sappc2.fritz.box> References: <87o7uknkyx.fsf@gnus.org> <87fsfwnkl4.fsf@gnus.org> <87a663kxtz.fsf@gnus.org> <87czaygqqp.fsf@gnus.org> <87fsfte2hf.fsf@gnus.org> Reply-To: Jens Schmidt Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18545"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) Cc: German Pacenza , 58396@debbugs.gnu.org, Stefan Monnier To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Sep 26 22:32:16 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 1qlEj9-0004bK-UM for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 26 Sep 2023 22:32:15 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qlEip-0003Qt-4F; Tue, 26 Sep 2023 16:31:55 -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 1qlEij-0003QW-TU for bug-gnu-emacs@gnu.org; Tue, 26 Sep 2023 16:31:50 -0400 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 1qlEij-0007Rp-LC for bug-gnu-emacs@gnu.org; Tue, 26 Sep 2023 16:31:49 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qlEiw-0002X4-2s for bug-gnu-emacs@gnu.org; Tue, 26 Sep 2023 16:32:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Jens Schmidt Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 26 Sep 2023 20:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58396 X-GNU-PR-Package: emacs Original-Received: via spool by 58396-submit@debbugs.gnu.org id=B58396.16957602919693 (code B ref 58396); Tue, 26 Sep 2023 20:32:02 +0000 Original-Received: (at 58396) by debbugs.gnu.org; 26 Sep 2023 20:31:31 +0000 Original-Received: from localhost ([127.0.0.1]:49937 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qlEiQ-0002WG-QT for submit@debbugs.gnu.org; Tue, 26 Sep 2023 16:31:31 -0400 Original-Received: from mr4.vodafonemail.de ([145.253.228.164]:46770) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qlEiL-0002Vx-Av for 58396@debbugs.gnu.org; Tue, 26 Sep 2023 16:31:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vodafonemail.de; s=vfde-mb-mr2-21dec; t=1695760265; bh=xeweszq69/64CV2hB+c2gid89WGCeRLn8gaaMyXVDf8=; h=From:To:Subject:References:Date:In-Reply-To:Message-ID:User-Agent: Content-Type:From; b=RaiT2Ukw8wOKMoa3BWSt8by9epL0Mu5RKuZ1QhuF/jXpbS4U8kwoyBAGPcgIzh8JY E02iLoQNxl0mAe2U5kLvSkQ/CaKiL1CQDhQ6heU1DR3yPr92qbrYUKPibh0uoVApJP L7oAcD6svAPBpk8h7rkHf281M5gIao2p56fYrmQQ= Original-Received: from smtp.vodafone.de (unknown [10.0.0.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by mr4.vodafonemail.de (Postfix) with ESMTPS id 4RwBGK1rS5z1y0f; Tue, 26 Sep 2023 20:31:05 +0000 (UTC) Original-Received: from sappc2 (port-92-194-162-232.dynamic.as20676.net [92.194.162.232]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp.vodafone.de (Postfix) with ESMTPSA id 4RwBG32qzrzKm4S; Tue, 26 Sep 2023 20:30:48 +0000 (UTC) In-Reply-To: <87fsfte2hf.fsf@gnus.org> (Lars Ingebrigtsen's message of "Wed, 12 Oct 2022 12:54:36 +0200") X-purgate-type: clean X-purgate: clean X-purgate-size: 2833 X-purgate-ID: 155817::1695760260-3B7F858E-6E5700A1/0/0 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:271393 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Lars Ingebrigtsen writes: > Stefan Monnier writes: > >> Yes (plus silence the messages plus avoid compiler macros). > > Any chance that... someone... will do that? =F0=9F=98=87 > Hit this issue today. How about the attached patch, which seems to fix it? I hope I understood Stefan's directions correctly. BTW, bug#60081 could also be merged with this one. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-Silence-macro-expansion-during-completion-at-point.patch >From 83387466cfb7fe859b227fb00148ee7f6cd288a5 Mon Sep 17 00:00:00 2001 From: Jens Schmidt Date: Tue, 26 Sep 2023 22:26:15 +0200 Subject: [PATCH] Silence macro expansion during completion-at-point * lisp/progmodes/elisp-mode.el (elisp--local-variables): Silence messages. Avoid compiler macros. Suppress all errors during macro expansion. (Bug#58396) --- lisp/progmodes/elisp-mode.el | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el index bd3916ce108..809df64a536 100644 --- a/lisp/progmodes/elisp-mode.el +++ b/lisp/progmodes/elisp-mode.el @@ -445,11 +445,23 @@ elisp--local-variables (condition-case nil (apply expander form args) (error form)))) + (macroexp--c-m-advice (lambda (_handler form) form)) + ;; Avoid any macro expansion errors when attempting + ;; completion at point (bug#58148). As Stefan suggested + ;; there: Silence messages [1], avoid compiler macros + ;; [2], and suppress all errors [3]. (sexp (unwind-protect - (let ((warning-minimum-log-level :emergency)) + (let ((inhibit-message t) ;[1] + (warning-minimum-log-level :emergency)) (advice-add 'macroexpand :around macroexpand-advice) - (macroexpand-all sexp)) + (advice-add 'macroexp--compiler-macro :override + macroexp--c-m-advice) ;[2] + (condition-case nil + (macroexpand-all sexp) + (t sexp))) ;[3] + (advice-remove 'macroexp--compiler-macro + macroexp--c-m-advice) (advice-remove 'macroexpand macroexpand-advice))) (vars (elisp--local-variables-1 nil sexp))) (delq nil -- 2.30.2 --=-=-=--