From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Arthur Miller Newsgroups: gmane.emacs.devel Subject: Re: Patch proposal: display symbol source code in help buffers Date: Mon, 20 Sep 2021 17:11:00 +0200 Message-ID: References: <83bl4n3hys.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22786"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Sep 20 17:27:54 2021 Return-path: Envelope-to: ged-emacs-devel@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 1mSLD0-0005kd-3A for ged-emacs-devel@m.gmane-mx.org; Mon, 20 Sep 2021 17:27:54 +0200 Original-Received: from localhost ([::1]:47596 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mSLCy-0007E5-RF for ged-emacs-devel@m.gmane-mx.org; Mon, 20 Sep 2021 11:27:52 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47688) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mSKwn-0007jb-1I for emacs-devel@gnu.org; Mon, 20 Sep 2021 11:11:09 -0400 Original-Received: from mail-oln040092067016.outbound.protection.outlook.com ([40.92.67.16]:12740 helo=EUR02-AM5-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mSKwh-0000re-PB; Mon, 20 Sep 2021 11:11:08 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VXxb4Y7x/ybtgPEwjwaitTxlzRrveu3+jtdYuRYQhij91NN4tTusJTPNJI29FFBp8yabzdcmbp9uESNiGIB711CYc+ghEWlg7V1+x9rkS5G45nj338DC3aDU7YctBU2d9P4Gm028V8XDPSPK6evT7hC0DrzPfDQCci7XfMIkdpQ8bEPKtJam8mLpZ7ND8aZ8jcD5KmyIgmbFs41/8ddXZ9NMKzZmeqS9ROB/AqJAWfbuXpd2/5coGYlcJr7k0cuA4MA2cL9qMmdlXVBbBWnGQoQ8SC4B1q/7AAQN984pKC3Q2XdtndCrySLWTl2/nAio+RT1dHiNPGK0ACtIqrqXdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=HliyrV8JZPSwuKnTKG/1ix8BNdOb1TPVan3rPNsnH90=; b=e3ZAeuthllWtZzLFersSceXIe6Yzj+M9x7Tvy+SFDIpyrH3k7F9B4UDgpayf1rj80GTegbp6m80cmM/o9ixyXfZck/j10k+KT92MNOVRF0HPR/9eDTnwwTU/m7u1DTlzylJmVvHm/36zrh/ND+8rJwVKN1EZAqCbb3GvIeNpelNGBO7kF/+VtSQBBgFGSweO3hSTUGL6zFAnlD0e4pPXs71nFnQYebGgjY3hj7Ecval0GJapfyRM9N31TTLOB7cIB94hqQ9WWLpi6b8ekk47lvpSNjPfNgxTQSaHwMXmBl/MTZX5pAfcYLgVRCRZfx8pX3wa9WwHqoxSAhi2S2wQZQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=live.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=HliyrV8JZPSwuKnTKG/1ix8BNdOb1TPVan3rPNsnH90=; b=XS3hXWRLkY5+ifOj66VRosdtWF7MDM6TMkXhgmxT+SX9kk2HUlLXkjECwDBQXL2I3rm6nPmQCOFxPWFBt8pO2UrcmbEJW1TKH2MfkcWqm8Fg/H9ZvCvdljSkTrJ1USy8E/NCL/k6ccbQfKNHB/hNIqTATdxz5KXBGqkjJbxnHTwZJ3eiVfS/I31yvXiBXjdZ4dDTYisQxmhuqzwlt5agfvFnva0eNIquhh40qm9wRKB7VkSJcZkrj2riFbxclbmTFh7UxXu+NSSPHWqErR3X6hhP60eK2wD5l3lpBCErnubUrADPtVr7YkAbjW1bjOXhvXVhC7H0fBF5mj4wCThVpg== Original-Received: from AM9PR09MB4977.eurprd09.prod.outlook.com (2603:10a6:20b:304::20) by AM0PR09MB3777.eurprd09.prod.outlook.com (2603:10a6:208:188::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4523.15; Mon, 20 Sep 2021 15:11:01 +0000 Original-Received: from AM9PR09MB4977.eurprd09.prod.outlook.com ([fe80::c55c:ece5:bed2:a9dc]) by AM9PR09MB4977.eurprd09.prod.outlook.com ([fe80::c55c:ece5:bed2:a9dc%9]) with mapi id 15.20.4523.018; Mon, 20 Sep 2021 15:11:01 +0000 In-Reply-To: <83bl4n3hys.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 20 Sep 2021 08:59:39 +0300") X-TMN: [cr15CqxsWQVeZJo6rKz8O2fEfgD29VEe] X-ClientProxiedBy: AM5PR0502CA0007.eurprd05.prod.outlook.com (2603:10a6:203:91::17) To AM9PR09MB4977.eurprd09.prod.outlook.com (2603:10a6:20b:304::20) X-Microsoft-Original-Message-ID: <87tuifl1tn.fsf@live.com> X-MS-Exchange-MessageSentRepresentingType: 1 Original-Received: from pascal.homepc (81.232.177.30) by AM5PR0502CA0007.eurprd05.prod.outlook.com (2603:10a6:203:91::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4523.16 via Frontend Transport; Mon, 20 Sep 2021 15:11:00 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 345b6e0c-0176-4bcd-fe10-08d97c48db60 X-MS-TrafficTypeDiagnostic: AM0PR09MB3777: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 53bm8/h2TCQfSPNFs82aF8ZQndmdZMOGbnTL93+N2qsuDI/7oCcJD17ajuudnyPlzy3cPYjzo6rhsnqW+tVqf7Fx3ZKbrx2VJnARH2YVVoHWiLTB5/LYiYdpwiD6gDlGpskcH4aN74u1TomTLUAhRhx8GZlXbXd78vHz31BUjCKGkROqd5BeVPLODRQ90rHdOj5B5auIri7t3pur+Ln1Uyv3vp/A83EEALY9ncTo9o4QxB2x2YW+sn780l92QFAEXKststYWbgqdLLOHbih8WdXgRIaOsXJyYSYYKSg/mcIQ9XIrtoTh65fUub40+aOOrXRQrDeAOmiQMm9ZRd8ZQD1jq+SKOPtKsbui4GCVL9Jx/jcCH9fkkwu9fH/D26lxKkBDSSiBEz55XyioilYD9ZeCj8tXaslnHIkPqyiAkzO1k7q9WTVoQDF9CNC4QIcZ X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: qqKokkklbbH9UOpS4CZlZchMK9qYN1dHFKlzVom0WlN9xMDSifSvVg8bvp+RQ2hQJfj9ZAaWX7s6Om3UmbzRRtadbt4FI5MoNvrDMfLjjbILlhiLl1nf+X7BL3cFkdfHfNcOs5SCARLtkZUtajPyYQ== X-OriginatorOrg: sct-15-20-3174-20-msonline-outlook-72e6e.templateTenant X-MS-Exchange-CrossTenant-Network-Message-Id: 345b6e0c-0176-4bcd-fe10-08d97c48db60 X-MS-Exchange-CrossTenant-AuthSource: AM9PR09MB4977.eurprd09.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Sep 2021 15:11:01.3465 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR09MB3777 Received-SPF: pass client-ip=40.92.67.16; envelope-from=arthur.miller@live.com; helo=EUR02-AM5-obe.outbound.protection.outlook.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:275141 Archived-At: Eli Zaretskii writes: >> From: Arthur Miller >> Date: Sun, 19 Sep 2021 21:50:35 +0200 >> >> Here is my second proposal to bring built-in help on par with external >> offerings. > > Thanks. Like Lars, I wonder why this is needed, given that we already > have a way to show the sources by a command invoked from the *Help* > buffer. Can you tell how this feature makes a difference wrt what we > have already? I just answered to I think Lars or Stefan's answer to Lars, where I elaborate a bit more why is it useful, if you can peek there, it would be nice so I dont' need to re-write everything. Short summary: - people new to Emacs are maybe not so inclined to look at the code, having code auto displayed makes at least me more inclined to actually look at the sources so, I think it has some educational purpose - I don't always want to deep dive into the source, sometimes I just glimpse over to confirm my (mis)understanding :). - no extra action needed to take to see the source (switch to buffer, hit 's) - sometimes the source is just a wrapper, so I will need to perform a search in the source file, here I can actually hit C-h f on the symbol in help buffer and opened that function directly - people are used to Helpful - it is on a defcustom, nil by default, so having it as an opt-in does not cost much > And a minor nit: > >> * lisp/help-mode.el ('help-mode-inline-source'): New option. >> ('help--fetch-c-src'): New function. >> ('help--fetch-lisp-src'): New function. >> ('help--symbol-source'): New function. >> ('help-make-xrefs): Check for 'help-mode-inline-source' and >> call 'help--symbol-source' to perform insertion when possible. > > We don't quote symbols inside the parentheses, only in the > descriptions that follow the colon, as you did in the last entry. Aha, yes yes, thanks, I'll remember that for the next time.