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: perform autoloading when docs is missing from autoload object Date: Thu, 16 Sep 2021 00:29:02 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24593"; 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: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Sep 16 00:32:00 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 1mQdRe-0006Ey-O3 for ged-emacs-devel@m.gmane-mx.org; Thu, 16 Sep 2021 00:32:00 +0200 Original-Received: from localhost ([::1]:34648 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mQdRd-0000Ls-KV for ged-emacs-devel@m.gmane-mx.org; Wed, 15 Sep 2021 18:31:57 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52144) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mQdOu-0006L4-6V for emacs-devel@gnu.org; Wed, 15 Sep 2021 18:29:08 -0400 Original-Received: from mail-vi1eur05olkn2107.outbound.protection.outlook.com ([40.92.90.107]:55489 helo=EUR05-VI1-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 1mQdOr-0008GV-Md for emacs-devel@gnu.org; Wed, 15 Sep 2021 18:29:07 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KiJE/npwb0j4PAOHaDozjo5PFnPE/WKYVujKvHYAEOS1JtEbot4dnu54krRhmZE9tPhjIXoP99kccw1YNf1WTooNoKMSW3yUGEs6XRNZw51bZXmSW9xlV76pkmD4A/xtMzRGky+yanxiG9HZ2wwzx7L3eSibXf8eN4e5eeSHmMJ9mn+gLKHs8BTH3itFys8KSSMCixtEaNaeEZ8jNcEWQvwVbts0L1yG7TJmLVA03qXUbIUztTqbp7dahA20q+SkH/ys3lrxmZB2Rasw7IUGn41/eLwwBPQxrdZMeJjmo++vzyITkkTj42N1hZ/PrN2TRAxzBXw4uf/JwoLA1oWeaA== 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=72PuYY9iq5OvXXIDUJuZ1830DGcz+1hdRXrHlTxxBSY=; b=kzghCoNpbJWoddPPQuLv8IlSpkLznjmfn/M3wPY4FoP1pS6izi+bR0UVKXPv+iLVbBDC6vG+rUSCGt5s5bmbPo3wjA3D4c078tPYktK13xtFXwE6lfT3pwZ6kNzWbNlvm6mpvvsaPHzQzq/VNEXL3qhxViJlNgXXcJLvul6V0kN/v/DZ+6Ek4A7lEXAJgl5hrMOcCxTCP/ev+aHrHCIzzkT35Yn8tik5A46ZpEgYrvIx2OXPG8gBwdwrM4lMwzzN9vfAG9kI+4DoUkugHqAmf0KR6dWtqIjmlY2rxciy4EPV13HTEu7WpoP0GBGhpo0b9sUsEZjyOzW5eGJyCorlBg== 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=72PuYY9iq5OvXXIDUJuZ1830DGcz+1hdRXrHlTxxBSY=; b=eTsecUWfyea9oXwE/GBp4LQ0QMo8GqA5UQrjj66WfcCLsWXCKKuuvSOmVSaOILXsxjDJpwZNu+BtlrJ9ceTco3Dh+os/y+j4HkRLcW5LVhmBCyqTfUNNJxlNxQixCe2rNj3RsLodPqcVEYGQSZoUldD/dtfFx2ZHJ7xP6wm2eJxE5K8EF1TiHXEp1L6PWtcQUFb4DSC5Di2rtsRY+PAoNnCWWdDu2VREiOpceeA2rZJR15xgetiZyxL3oljt29JRDdUv/fSu2eHw5atkKxKOp6smX9anJWunkyrsgv/rNTzBLl4dJJ4DM4GxxRflFhNwKHi8670REmtdpVc+KsPOvw== Original-Received: from AM9PR09MB4977.eurprd09.prod.outlook.com (2603:10a6:20b:304::20) by AM0PR09MB2770.eurprd09.prod.outlook.com (2603:10a6:208:128::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4523.14; Wed, 15 Sep 2021 22:29:03 +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%8]) with mapi id 15.20.4500.019; Wed, 15 Sep 2021 22:29:03 +0000 In-Reply-To: (Stefan Monnier's message of "Wed, 15 Sep 2021 14:14:32 -0400") X-TMN: [bDj9pSwFZP70f+s5H3b3WOdmrvAV/nHm] X-ClientProxiedBy: AM6P191CA0017.EURP191.PROD.OUTLOOK.COM (2603:10a6:209:8b::30) To AM9PR09MB4977.eurprd09.prod.outlook.com (2603:10a6:20b:304::20) X-Microsoft-Original-Message-ID: <87wnnha2xd.fsf@live.com> X-MS-Exchange-MessageSentRepresentingType: 1 Original-Received: from pascal.homepc (81.232.177.30) by AM6P191CA0017.EURP191.PROD.OUTLOOK.COM (2603:10a6:209:8b::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.14 via Frontend Transport; Wed, 15 Sep 2021 22:29:02 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a4b17332-b420-43bb-2aa5-08d978983898 X-MS-TrafficTypeDiagnostic: AM0PR09MB2770: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: XApXiwWX1oxzs4UaCa1fkQo84+dHaBy1p3piMd387ywRUYwTVFF9wUt4k0oGsfcGRyEoRx/9fjjBiuAGP22v6Zf66U7QXj65NQ2WfpgajnIrAwSaI7qf2JfG0M047EqZwjefiHK9OBFoXakx60v8jmwPh6K83nXFm7llgF8BZaTSaeEpiuSGjQGkK+7Bs6J1UDwuMgTVOXRz8ZrhTZEC8BjG+N4tedR92i/4X9TKq4+36hlFifDRWnScxK6krrsal7EQGrRudowwVZhn92u+n2FfJF0W5sFAcRrsczrtmXmpvPa9BvxPNqYPdW1/yvEBkvz1cVVT2L2fZrtGsSiVX3DrUKbYn92m5Ofkh4FHHAJ5qmd6FkI5yUgi1xVWbZQD7254oVJFJQShYDOPunmQvUmJrSVbfzTTw5Wqr4YLFhuiMMHX6agHNOsIdeeLY893 X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: CBnG4tTpAfdH4nTuFUAUNYmsEIxlIS2HgBg+QtRjzWtK7i/xX1PpjMj7LM7phAN/8vHS22ZQW1njrBkoqEYC54gqYqSvGsdQ10r8jhMOHVQCusKVm5CZe9mo7RCM5GO359v6zNoUlni7TqjVFSHwcA== X-OriginatorOrg: sct-15-20-3174-20-msonline-outlook-72e6e.templateTenant X-MS-Exchange-CrossTenant-Network-Message-Id: a4b17332-b420-43bb-2aa5-08d978983898 X-MS-Exchange-CrossTenant-AuthSource: AM9PR09MB4977.eurprd09.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Sep 2021 22:29:03.3427 (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: AM0PR09MB2770 Received-SPF: pass client-ip=40.92.90.107; envelope-from=arthur.miller@live.com; helo=EUR05-VI1-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:274782 Archived-At: Stefan Monnier writes: >> loads libraries when symbol is not loaded. I would actually prefer to just load >> documentation not the entire library, and I think I can do that, but it is a >> little bit more involved (have to find source and read the docs), unlike just >> performing autoloading. > > Loading a docstring from the .el file can be tricky/cumbersome (at > least if we want it to be reliable and 100% correct), but as for loading > a docstring from a .elc file this is standard (its controlled by > the variable `byte-compile-dynamic-docstrings`), although currently it > seems it's not done for autoloads. Indeed. My thoughts were to read .elc when avialable, and .el only if there is no .elc file available. I didn't want to write too much about that, I wanted to get something usable; I see doc loading as an optimization to proposed patch. If/when I it will just replace autoload-do-load. It is one of those "would-be-nice-to-have todo items". Until than, the proposed patch is functionally equivavelnt to what helpful does in this regard. I would like to hear opinion if I should look at some other place to implement this, and if the strategy with opt-in/opt-out and extra defcustom option is OK.