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#61962: 30.0.50; New trouble with symbols with positions Date: Tue, 7 Mar 2023 10:24:41 +0000 Message-ID: References: <87o7p8v6ak.fsf@web.de> <83ilfga322.fsf@gnu.org> <877cvvqj5v.fsf@web.de> <877cvv0yv7.fsf@web.de> <87a60p4d5q.fsf@web.de> 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="11580"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= , Eli Zaretskii , 61962-done@debbugs.gnu.org To: Michael Heerdegen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Mar 07 11:36:00 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 1pZUfa-00026x-HY for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 07 Mar 2023 11:35:46 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pZUVK-00015M-8e; Tue, 07 Mar 2023 05:25:10 -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 1pZUVC-00014z-Fa for bug-gnu-emacs@gnu.org; Tue, 07 Mar 2023 05:25:02 -0500 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 1pZUVC-0003eV-5t for bug-gnu-emacs@gnu.org; Tue, 07 Mar 2023 05:25:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pZUVC-0004RI-1g for bug-gnu-emacs@gnu.org; Tue, 07 Mar 2023 05:25:02 -0500 Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Tue, 07 Mar 2023 10:25:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 61962 X-GNU-PR-Package: emacs Mail-Followup-To: 61962@debbugs.gnu.org, acm@muc.de, michael_heerdegen@web.de Original-Received: via spool by 61962-done@debbugs.gnu.org id=D61962.167818469217038 (code D ref 61962); Tue, 07 Mar 2023 10:25:01 +0000 Original-Received: (at 61962-done) by debbugs.gnu.org; 7 Mar 2023 10:24:52 +0000 Original-Received: from localhost ([127.0.0.1]:44560 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pZUV1-0004Qk-Oh for submit@debbugs.gnu.org; Tue, 07 Mar 2023 05:24:52 -0500 Original-Received: from mx3.muc.de ([193.149.48.5]:27620) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pZUV0-0004QX-3u for 61962-done@debbugs.gnu.org; Tue, 07 Mar 2023 05:24:50 -0500 Original-Received: (qmail 69657 invoked by uid 3782); 7 Mar 2023 11:24:43 +0100 Original-Received: from acm.muc.de (pd953aca1.dip0.t-ipconnect.de [217.83.172.161]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Tue, 07 Mar 2023 11:24:43 +0100 Original-Received: (qmail 5338 invoked by uid 1000); 7 Mar 2023 10:24:41 -0000 Content-Disposition: inline In-Reply-To: <87a60p4d5q.fsf@web.de> 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:257438 Archived-At: Hello, Michael. On Tue, Mar 07, 2023 at 01:29:21 +0100, Michael Heerdegen wrote: > Alan Mackenzie writes: > > I think I now understand what's going on. It's all to do with stripping > > symbol positions in eval-and-compile forms. Before the patch of ~two > > weeks ago, the positions were stripped in e-and-c. After the patch, > > they weren't stripped. > > I think the correct thing to do is to strip the symbol positions in the > > `eval' part of eval-and-compile, but leave them alone in the `compile' > > part. This is actually quite tricky, since > > byte-run-strip-symbol-positions works destructively. So I need to copy > > the code first, and there is no suitable function to do this. copy-tree > > is close, but can't handle circular lists. So I will have to write a > > safe version of copy tree. > Sounds all plausible. I also don't have a better idea. I've now written safe-copy-tree, and committed it together with the fix in bytecomp.el to master. So I'm closing the bug with this post. > > In the mean time, could you try out the following patch which uses > > copy-tree as a first approximation. I think it fixes the problem, > > apart from the above. > Yes, looks good. Thanks! > I wonder now if other cases also suffer from the problem. What happens > when I call `eval' in a macro expander (i.e. while generating the macro > expansion, not in the result of an expansion)? And how does > `cl-eval-when' behave (this is actually a special case of the first > question) ? I think these are so far unsolved problems with the symbols-with-position mechanism - sometimes the s-w-p leaks out of macro contexts. Are you seeing this problem in real life? > Thanks so far, > Michael. -- Alan Mackenzie (Nuremberg, Germany).