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#66750: Unhelpful text in C-h v for variables with a lambda form as value Date: Fri, 03 Nov 2023 18:18:08 -0400 Message-ID: References: <83il6k8yyd.fsf@gnu.org> <837cn08o13.fsf@gnu.org> <831qd88dt5.fsf@gnu.org> 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="16581"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eli Zaretskii , 66750@debbugs.gnu.org, Stefan Kangas To: Alan Mackenzie Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Nov 03 23:18:49 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 1qz2V6-000441-Pj for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 03 Nov 2023 23:18:48 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qz2Um-0002m0-If; Fri, 03 Nov 2023 18:18:28 -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 1qz2Ul-0002lr-Km for bug-gnu-emacs@gnu.org; Fri, 03 Nov 2023 18:18:27 -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 1qz2Uk-00029K-WB for bug-gnu-emacs@gnu.org; Fri, 03 Nov 2023 18:18:27 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qz2VK-0002su-Ea for bug-gnu-emacs@gnu.org; Fri, 03 Nov 2023 18:19: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: Fri, 03 Nov 2023 22:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66750 X-GNU-PR-Package: emacs Original-Received: via spool by 66750-submit@debbugs.gnu.org id=B66750.169904993411071 (code B ref 66750); Fri, 03 Nov 2023 22:19:02 +0000 Original-Received: (at 66750) by debbugs.gnu.org; 3 Nov 2023 22:18:54 +0000 Original-Received: from localhost ([127.0.0.1]:59935 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qz2VB-0002sV-JV for submit@debbugs.gnu.org; Fri, 03 Nov 2023 18:18:53 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:38486) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qz2VA-0002sH-87 for 66750@debbugs.gnu.org; Fri, 03 Nov 2023 18:18:52 -0400 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 08A9B442EAE; Fri, 3 Nov 2023 18:18:11 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1699049889; bh=oQT3notKK8+MIOsBkbWJgXx/dZvpjhWLj0fRMC4fzlI=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=dKA7jxyOVA6P2Ij9vs9N6Y1Ip6vP+OuR8NAKE1xSeU3LRsr58BrfsX60R0ZPyuEjp ZNp4uz76oxkdvy0tex24hIl8fVc73HgXgFiBKtje2N1hDPsOICUtzl1T42QdNF4Gng WO/1P31K/KhLRKXbY9hKFybrSInz6hoqNOh9W1juxxyH2v+mBr6MCgUHtf1GL0vaHu v9C0QGgGaFUlBVXShtepAn6z7UaFv56o2udaUnVlMiXNSzIYSHmDbuUzU27fu5N6PP MH7rrEMAsy0xyeYbMiYwX60m8Sorv8LZkjSs3E1JgeJHLfV/9O04SSlX19j5gJ6nw9 TAL6Q02IaTG4g== Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id D988C442EAF; Fri, 3 Nov 2023 18:18:09 -0400 (EDT) Original-Received: from pastel (unknown [45.72.195.71]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id AAB28120313; Fri, 3 Nov 2023 18:18:09 -0400 (EDT) In-Reply-To: (Alan Mackenzie's message of "Fri, 3 Nov 2023 19:46:27 +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:273730 Archived-At: > But it's not quite so simple as all that. In order to get the doc > strings for lambdas into the .elc file, there'll have to be an > enhancement of the .elc format. Currently, although doc strings for > defuns/demacros/etc. are stored as file name + offset, those for > lambdas (which are vanishingly rare at this point) are just stored > inline in the .elc, and would get loaded along with the lambdas. Yes, I know. I think it's an orthogonal issue. It's OK. Note: I have(had?) a local patch to use (FILE . OFFSET) for local lambdas' docstrings as well. I never pushed it to `master` because it relied on a change in the `prin1` function (basically provide some way for `prin1` to generate the "#$" string in its output) and I couldn't think of a way to do that that wasn't too hackish to be worth the trouble for the "vanishingly rare" local lambdas with docstrings. [ And also, it broke the make-docfile code that scraped `.elc` files because it moved the docstrings a bit, but that's not an issue any more because we don't scrape `.elc` files any more. ] But if those become more common, the tradeoff would justify getting such a change in `master` (especially since IIRC it simplifies `bytecomp.el` a bit). >> The one thing I'd point out is: try to pick a format for the "data in >> docstring" that is easily/naturally extensible (contrary to what I did >> for the arglists), so that when we get around to adding support for >> things like debugging info we could add it there without having to >> invent a new format. > > I intend to go for simplicity here. +1 > A signature at BOL +1 > followed by space separated info fields in a fixed order. I'd have gone with "a `read`able sexp" so you don't need to write any new parsing code and it naturally extends to "arbitrary" content. Stefan