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: Sat, 30 Mar 2024 09:53:37 +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="21908"; 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 Sat Mar 30 10:54:08 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 1rqVPc-0005aW-1J for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 30 Mar 2024 10:54:08 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rqVPX-0002Kx-Ba; Sat, 30 Mar 2024 05:54:03 -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 1rqVPU-0002Ko-VP for bug-gnu-emacs@gnu.org; Sat, 30 Mar 2024 05:54:00 -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 1rqVPU-00084n-B6 for bug-gnu-emacs@gnu.org; Sat, 30 Mar 2024 05:54:00 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rqVPW-0002pC-3q for bug-gnu-emacs@gnu.org; Sat, 30 Mar 2024 05:54:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 30 Mar 2024 09:54: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.171179242810839 (code B ref 67455); Sat, 30 Mar 2024 09:54:02 +0000 Original-Received: (at 67455) by debbugs.gnu.org; 30 Mar 2024 09:53:48 +0000 Original-Received: from localhost ([127.0.0.1]:44030 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rqVPI-0002ok-6j for submit@debbugs.gnu.org; Sat, 30 Mar 2024 05:53:48 -0400 Original-Received: from mail.muc.de ([193.149.48.3]:47448) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rqVPG-0002o1-C4 for 67455@debbugs.gnu.org; Sat, 30 Mar 2024 05:53:46 -0400 Original-Received: (qmail 76732 invoked by uid 3782); 30 Mar 2024 10:53:38 +0100 Original-Received: from acm.muc.de (p4fe15358.dip0.t-ipconnect.de [79.225.83.88]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Sat, 30 Mar 2024 10:53:38 +0100 Original-Received: (qmail 6134 invoked by uid 1000); 30 Mar 2024 09:53:37 -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:282345 Archived-At: Hello, Stefan. On Thu, Mar 28, 2024 at 12:25:11 -0400, Stefan Monnier wrote: [ .... ] > >> >> My crystal ball suggests that "currently" may be the wrong way to think > >> >> about it: maybe instead of thinking of "when" (as in "during the > >> >> definition of function FOO") what you're looking for might be "where" > >> >> (as in "within the body of FOO"). > >> >> [ That's the same difference as the difference between dynamic and > >> >> static scoping. ] > >> > I'm having trouble understanding what you're saying, here. > >> Is it because you don't understand the difference between dynamic > >> scoping and static scoping, or because you don't see the relationship > >> with that and your notion of "currently being defined"? > > The latter, I think. defining-symbol is entirely dynamically scoped. > We're still miscommunicating. You're talking about how your code is > implemented, apparently, whereas I'm asking about what is the > intended behavior. I am still mystified by your failure to understand "currently being defined", a phrase that to me could hardly be clearer. > It's like I'm asking what the C spec says and you're answering me by > telling me how GCC works. OK, let's try again. defining-symbol records the symbol currently being defined. It's used to set the defining symbol and buffer offset fields in the position structure in that symbol's doc string, and also in the doc strings of contained lambda forms. > > I'm convinced it does. Can you suggest a scenario where the > > defining-symbol mechanism (outlined above) might fail? > Without knowing what it is intended to do, the only thing we can say is > that it does what it does, so no indeed it won't fail to do what it > does, since that's what it does. 🙂 Is my previous paragraph sufficiently clear? If so, can you envisage a scenario where a symbol being defined would fail to get the two fields correctly set in its doc string or a lambda form's doc string? [ .... ] > Stefan -- Alan Mackenzie (Nuremberg, Germany).