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#67455: (Record source position, etc., in doc strings, and use this in *Help* and backtraces.) Date: Mon, 8 Apr 2024 02:56:20 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40614"; mail-complaints-to="usenet@ciao.gmane.io" Cc: acm@muc.de, Eli Zaretskii , 67455@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Apr 08 04:57:14 2024 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 1rtfC6-000AOA-8T for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 08 Apr 2024 04:57:14 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rtfBp-0005Pe-5D; Sun, 07 Apr 2024 22:56:57 -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 1rtfBn-0005PP-8g for bug-gnu-emacs@gnu.org; Sun, 07 Apr 2024 22:56:55 -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 1rtfBn-00037K-0e for bug-gnu-emacs@gnu.org; Sun, 07 Apr 2024 22:56:55 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rtfBt-0003zN-Rn for bug-gnu-emacs@gnu.org; Sun, 07 Apr 2024 22:57:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 08 Apr 2024 02:57:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67455 X-GNU-PR-Package: emacs Original-Received: via spool by 67455-submit@debbugs.gnu.org id=B67455.171254499815208 (code B ref 67455); Mon, 08 Apr 2024 02:57:01 +0000 Original-Received: (at 67455) by debbugs.gnu.org; 8 Apr 2024 02:56:38 +0000 Original-Received: from localhost ([127.0.0.1]:45067 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rtfBV-0003xE-UW for submit@debbugs.gnu.org; Sun, 07 Apr 2024 22:56:38 -0400 Original-Received: from mail.muc.de ([193.149.48.3]:27119) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rtfBT-0003wH-FU for 67455@debbugs.gnu.org; Sun, 07 Apr 2024 22:56:36 -0400 Original-Received: (qmail 43870 invoked by uid 3782); 8 Apr 2024 04:56:21 +0200 Original-Received: from muc.de (p4fe15203.dip0.t-ipconnect.de [79.225.82.3]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Mon, 08 Apr 2024 04:56:21 +0200 Original-Received: (qmail 5627 invoked by uid 1000); 8 Apr 2024 02:56:20 -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:282905 Archived-At: Hello, Stefan. On Sun, Apr 07, 2024 at 22:19:28 -0400, Stefan Monnier wrote: > > The definition starts when the reader reads (defun foo ...). It ends > > when that Fdefalias has been evaluated. Between those two events, > > defining-symbol is bound to foo. > When the code is compiled, years can pass between those two events. Really? Then defining-symbol would stay bound over these years, too. Where's the problem? > > The critical thing here is the variable defining-symbol. I think you're > > suggesting that its value could accidentally find its way into other > > symbols' position structures. When are those other symbols getting > > defined? Surely if a secondary defun, defmacro, defvar, ... happens > > during the main defun, its defining symbol is that of the main defun? > That secondary symbol might be defined by the macro for its own use, > rather than for the use of the returned code. > > Well, m-a-e is defined too late. > According to your self-imposed rule 🙂 > > Even if it weren't, how would it solve any of these problems you see? > > It's just swapping one dynamically bound variable for another. > Indeed, m-a-e has to fight the same issues, in theory, but in practice, > those issues have already been addressed over the years. It's rebound > to nil "all the time" to try and make sure its effect doesn't leak. defining-symbol isn't bound like this, in order for its value to be available when needed. > BTW, it would be nice to separate your patches into some that add > position info to lambda's docstring, and then others that add > "defining symbol" to the available position info. All this could be moot. Byte compiling is appreciably slower on this branch than on master. make bootstrap is taking me nearly 7 minutes compared with master's 4min 40sec. Running make -j17 check is taking 1min 50sec rather than 50sec. Once compiled, the code runs at the same speed, though. I think this issue needs sorting out first. > Stefan -- Alan Mackenzie (Nuremberg, Germany).