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: Sat, 01 Jun 2024 19:14:06 -0400 Message-ID: References: Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28654"; 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 Sun Jun 02 01:15:12 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 1sDXwO-0007IE-2x for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 02 Jun 2024 01:15:12 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sDXw4-0000js-0E; Sat, 01 Jun 2024 19:14:52 -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 1sDXw2-0000jX-UQ for bug-gnu-emacs@gnu.org; Sat, 01 Jun 2024 19:14:50 -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 1sDXw2-0002Ag-Jc for bug-gnu-emacs@gnu.org; Sat, 01 Jun 2024 19:14:50 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sDXwE-0003ak-9v for bug-gnu-emacs@gnu.org; Sat, 01 Jun 2024 19:15: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: Sat, 01 Jun 2024 23:15: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.171728366913747 (code B ref 67455); Sat, 01 Jun 2024 23:15:02 +0000 Original-Received: (at 67455) by debbugs.gnu.org; 1 Jun 2024 23:14:29 +0000 Original-Received: from localhost ([127.0.0.1]:57517 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sDXvg-0003Zf-Nu for submit@debbugs.gnu.org; Sat, 01 Jun 2024 19:14:28 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:14277) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sDXve-0003ZS-Mn for 67455@debbugs.gnu.org; Sat, 01 Jun 2024 19:14:27 -0400 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id B6F61442455; Sat, 1 Jun 2024 19:14:08 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1717283647; bh=4frHn7EOR5p69pZroXxHA4nEpZca6DPnSfSdkTMAOiI=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=SSbgz0Ff84sNpzK/8KZyf9vGk0pI6bphb1o/e8sxbasjuY68KyIRreAzcJE2MsQ3W DI+tBc6B/qMbaHteozp5vekCw8n8+lBOHsrtbyri4gHgbtKEdG3MSxiTDKrZGgRVkD 4MoP4+Klxo+wGlCztnjf5UKotgLwK0waJ4BsgJBIAIEaNz4JvcjH5g2534QOh7aTi0 z8PI72W0lXCBsRis37r9xrCFChoj9s1LbxZRNGhLPgE+XnSuTP5L2PYnlEdQM988YF /oJvC1UxkpV+zRXdSTp2lRlykywQpXMqGe+vQVebTRGyY/64A800GX+fm186KNFDB2 NZ2nmhAD89dAA== Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 5E0F5442453; Sat, 1 Jun 2024 19:14:07 -0400 (EDT) Original-Received: from pastel (unknown [24.140.236.196]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 30B101202C7; Sat, 1 Jun 2024 19:14:07 -0400 (EDT) In-Reply-To: (Alan Mackenzie's message of "Sat, 1 Jun 2024 17:40:47 +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:286348 Archived-At: > I think a moderately radical change in approach is needed. Something > like the following: > > (i) "Ambiguous" constructs should be left with symbols with position. > (ii) We should enhance the evaluator to handle these symbols with > position. > (iii) For the sake of run time speed, typical SWPs will be posified as > they are at the moment, the details getting written into their doc > strings. > (iv) We'll need a read syntax for symbols with position, and they will > get written to .elc files with this syntax. > (v) SWPs may need enhancing with a new element representing the buffer > the symbol occurred in. Or, we could have an alist (or hash table) > associating the SWPs with their buffers. Such currently exists for > lambdas. > > .... or something like that. > > What do you think? I don't think I can see the problem clearly enough to have a good idea of what we should do. Do you have a concrete and worked out example where we need to preserve sympos info from data (i.e. from a quoted value, IOW the thing you describe as an "ambiguous construct", IIUC), showing how that data is later turned into code, which sympos info *that* code gets, what "source position" we ideally want to get into the compiled/interpreted code, and finally how that info will be used? Stefan