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: Fri, 15 Dec 2023 18:23:41 +0000 Message-ID: References: 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="9617"; 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 Fri Dec 15 19:24:30 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 1rECrO-0002Ld-8C for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 15 Dec 2023 19:24:30 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rECqy-0006yd-2A; Fri, 15 Dec 2023 13:24:04 -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 1rECqw-0006yB-Qz for bug-gnu-emacs@gnu.org; Fri, 15 Dec 2023 13:24:02 -0500 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 1rECqw-0006vq-In for bug-gnu-emacs@gnu.org; Fri, 15 Dec 2023 13:24:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rECqw-00040n-CP for bug-gnu-emacs@gnu.org; Fri, 15 Dec 2023 13:24:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 15 Dec 2023 18:24: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.170266463015403 (code B ref 67455); Fri, 15 Dec 2023 18:24:02 +0000 Original-Received: (at 67455) by debbugs.gnu.org; 15 Dec 2023 18:23:50 +0000 Original-Received: from localhost ([127.0.0.1]:53437 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rECqk-00040N-AT for submit@debbugs.gnu.org; Fri, 15 Dec 2023 13:23:50 -0500 Original-Received: from mail.muc.de ([193.149.48.3]:61245) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rECqj-00040A-96 for 67455@debbugs.gnu.org; Fri, 15 Dec 2023 13:23:49 -0500 Original-Received: (qmail 9432 invoked by uid 3782); 15 Dec 2023 19:23:42 +0100 Original-Received: from acm.muc.de (p4fe15b06.dip0.t-ipconnect.de [79.225.91.6]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Fri, 15 Dec 2023 19:23:42 +0100 Original-Received: (qmail 5552 invoked by uid 1000); 15 Dec 2023 18:23:41 -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:276279 Archived-At: Hello, Stefan. On Mon, Dec 04, 2023 at 13:33:25 -0500, Stefan Monnier wrote: > > I've committed the first stage of this implementation in the new git > > branch feature/positioned-lambdas. > Haven't had enough time to look closely, so just some quick early comment. ..... I'm making steady, if not rapid, progress on the use of doc strings to store position information. There have been several unexpected problems (which is only to be expected), all of which, bar one, I've been able to solve. The problem that has thrown me is the use of the doc string in oclosures for other purposes. For example, in position 2 of a lambda form, appears something like (:documentation 'oclosure-accessor) .. My current code is expecting, on encountering (:documentation ...), for the cadr to be a string, onto which it can add a concat form which will prefix the position information. A solution to this problem would be to move the above symbol to element 2 of the list, something like (:documentation nil 'oclosure-accessor) , so that my new code could place its information in the now vacant position 1, giving something like (:documentation ";POS\36\0\0\0 [ .... ]\n" 'oclosure-accessor) .. What do you think of this idea, and have you any better ideas for a solution to the problem? > Stefan -- Alan Mackenzie (Nuremberg, Germany).