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#67455: (Record source position, etc., in doc strings, and use this in *Help* and backtraces.) Date: Sun, 07 Apr 2024 22:19:28 -0400 Message-ID: References: Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9355"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eli Zaretskii , 67455@debbugs.gnu.org To: Alan Mackenzie Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Apr 08 04:20:23 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 1rtecQ-0002Da-Q2 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 08 Apr 2024 04:20:23 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rtec2-0001FJ-L3; Sun, 07 Apr 2024 22:19:58 -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 1rtec0-0001Eo-7u for bug-gnu-emacs@gnu.org; Sun, 07 Apr 2024 22:19:56 -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 1rtebz-00068k-W4 for bug-gnu-emacs@gnu.org; Sun, 07 Apr 2024 22:19:56 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rtec6-00012W-LC for bug-gnu-emacs@gnu.org; Sun, 07 Apr 2024 22:20:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 08 Apr 2024 02:20:02 +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.17125427863870 (code B ref 67455); Mon, 08 Apr 2024 02:20:02 +0000 Original-Received: (at 67455) by debbugs.gnu.org; 8 Apr 2024 02:19:46 +0000 Original-Received: from localhost ([127.0.0.1]:45057 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rtebq-00010M-7Q for submit@debbugs.gnu.org; Sun, 07 Apr 2024 22:19:46 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:2386) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rtebo-000106-4K for 67455@debbugs.gnu.org; Sun, 07 Apr 2024 22:19:44 -0400 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 7D7A880BC1; Sun, 7 Apr 2024 22:19:30 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1712542769; bh=D5oY0mUikOGk7A35Rwr/yGvQT2tEUYG4KC3aZtL0cuU=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=gwy0r+t/nZkV1DxlwunYPt7EOzLS8zco1q1U6PQiDEdD3u5cjYo/JF432gfniOZ6S NQPnynyO9o4kbZo8AAWjmRr9dp6W1aCr7YpeOaia4GM10hskcYCs0bGO7QToQFDujh G7HUghR+3vy5OHe6es+fB98dBwWQBsWQDIamowMJwZt8rmcNq/O+o4264nSdpRnjE1 MuxjKkA2wrx5j1qpyXnS19lerFkFnUagNtN+OcSuxZrvbghfjD1reRA3iNeCVYSO2Q 1WrR89S2AtNNAbg4oizN8+GoUpK60G8SgZHqs55JTGcUI0JtWWtkeHnJAvtlgL6BYq xmpe2oQfzY/fA== Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 6647F8036C; Sun, 7 Apr 2024 22:19:29 -0400 (EDT) Original-Received: from pastel (unknown [45.72.201.215]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 3BAD012082A; Sun, 7 Apr 2024 22:19:29 -0400 (EDT) In-Reply-To: (Alan Mackenzie's message of "Sun, 7 Apr 2024 11:35:19 +0000") 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:282903 Archived-At: > 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. > 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 =F0=9F=99=82 > 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. 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. Stefan