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: Fri, 17 Sep 2021 17:04:56 +0200 Message-ID: References: <87ee9o3cqj.fsf@gnus.org> <87o88rxpvy.fsf@gnus.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="24844"; 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: Lars Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Sep 17 17:09:12 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 1mRFUC-000694-Br for ged-emacs-devel@m.gmane-mx.org; Fri, 17 Sep 2021 17:09:09 +0200 Original-Received: from localhost ([::1]:60064 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mRFUA-0007v4-EY for ged-emacs-devel@m.gmane-mx.org; Fri, 17 Sep 2021 11:09:06 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45820) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mRFQE-0003kl-Ni for emacs-devel@gnu.org; Fri, 17 Sep 2021 11:05:03 -0400 Original-Received: from mail-oln040092075015.outbound.protection.outlook.com ([40.92.75.15]:30275 helo=EUR04-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 1mRFQC-0001SC-D3 for emacs-devel@gnu.org; Fri, 17 Sep 2021 11:05:02 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OrqlxGE8v9aSctTBfQYX7ZGjYMXJrI/2czGT0SqnfPFM5RQNrqaDdJ5TOdzwpoLDQPuatfIhtLgcXHNSdnRWwIv2bNOhB9c39kxDjA3todjisQMTEy8JdRT3Yyln6cG4rIzNrzinkEUcSSsv/pYLRJpCYkoGwq2xXqs3F+DkKCCm01Y6/QKO4zC7wecMIS1njiYN4cDlgHWQrPPjZ54tMWkBi6vHc1oBb1kIDulcVToaegzqbS/XNpcaE5Ke5jzYB3NHAmJmfAp7UXXYhwF8wYooyP3C2W80D1L/Ei1tRb7umcnwJ13QjZ3D9QDFKXXFyyNr7kBYAkffJSz3EJcHbA== 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=xx/SOyGfwQFuWzycbLnaWNCZ38Vor5ruwix5vjtqU48=; b=PU1JoeYhQv/D7Wy4hUKY9sH3l4TSfA1ualDOD7He/jQA/if8Rbe8+HrjC78q+PEo9X97Xpur2rC4+sdxqY87t2SdPEgqF7m9UTeyiLcAmLaullHYNup+5krBkpz5GtUfrc4DuWpKUNe4zOT7QCw5O7RcFYEvnMvCSf4PrYyLk0u1vQerV2Xs6/zjUyU75vP2ik+XqSByhoW+KkoXLMZISPbWHjMfrktZO4Osngdc8Ns7P13RGOWhkwOTp8I2f1O162uwuWamGWgW01M/ChoTfu0BRxuhZQYOSesCopjJK3FaCGb3Ns1T0kPuq1OB2CB4CmRE404cecfe5eKvhlkxBQ== 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=xx/SOyGfwQFuWzycbLnaWNCZ38Vor5ruwix5vjtqU48=; b=T8Reoka9fV+gHlD4T4Ozc/cfEuXa2nnrERdgycd7N23a8iuGjf8aSM9ZOhjb0qyPzfVVbaWklB+wEX4GEAoU2jXMhb2fioOtUJNXGgH1YC7hPjrtIKx+q8V3DEYflv38M6pM+9+dVHjB+GRSx2ZsLzRCra3VqmOVV2jXJn4v7g87IxjeZZDVGQqEFHT6pqDmWNGCp7hVra51QaMn0oWYpuAHmXUOQOzVBMFEqQL0//9pAPH6qSKY3bFwy4FpUebw/YLdqPd1MhCMcpfnltL6UEtQP31rwX3HcPDE93MOzjJ6gW3TjswOHfKr7kCmuKx2ih2vAUi7Mwdp7r4elN4q6g== Original-Received: from DB9PR09MB4986.eurprd09.prod.outlook.com (2603:10a6:10:2a9::19) by DB6PR0901MB1557.eurprd09.prod.outlook.com (2603:10a6:4:7a::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4523.14; Fri, 17 Sep 2021 15:04:57 +0000 Original-Received: from DB9PR09MB4986.eurprd09.prod.outlook.com ([fe80::80be:d528:d357:5d3a]) by DB9PR09MB4986.eurprd09.prod.outlook.com ([fe80::80be:d528:d357:5d3a%9]) with mapi id 15.20.4523.016; Fri, 17 Sep 2021 15:04:57 +0000 In-Reply-To: <87o88rxpvy.fsf@gnus.org> (Lars Ingebrigtsen's message of "Fri, 17 Sep 2021 16:01:21 +0200") X-TMN: [cMPBHQRCzJueHvc0D+dvEJQOXWcd8PHq] X-ClientProxiedBy: AS8PR05CA0014.eurprd05.prod.outlook.com (2603:10a6:20b:311::19) To DB9PR09MB4986.eurprd09.prod.outlook.com (2603:10a6:10:2a9::19) X-Microsoft-Original-Message-ID: <87a6kb6y5j.fsf@live.com> X-MS-Exchange-MessageSentRepresentingType: 1 Original-Received: from pascal.homepc (81.232.177.30) by AS8PR05CA0014.eurprd05.prod.outlook.com (2603:10a6:20b:311::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4523.16 via Frontend Transport; Fri, 17 Sep 2021 15:04:56 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0a68ed90-be97-495b-6c95-08d979ec832d X-MS-TrafficTypeDiagnostic: DB6PR0901MB1557: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: mIQQaKJWevKz2IEMhcWySQx67v5Kzew2lpHVlsfkJ6Vojr/0F3z/Pv0li+5To7skc6CqZq3KkAZwsVuTQIbkItkFW20HwDJoTPEFFjZZt1xBhS4KknZ6ZzWyrhwoAB9M+ir6uHKDj95XVfbwrScvbSUXbblJbfvWTXfd2IPcty5RDIl88hQFvr4oGKRdq7k1DwjBHZ+WV2Lvq+Qq4L1/xy370jcewihe8JLCrFDp2jBNCkDkJiHEzbU2za6OgQLmVvho5zrMVTwUUzIMAkUsibtCJtON/nXbmJi3h7jiqGip8iUfzPc26RwPReSrZLCASiJPpOHDrS87xkWmOHlX7mlfl6I6DegU3B9NY3rlywIpRTPEXZyUNw/nvmGglRTqSWvl1Guao9vJimwUu8QyRxQSYkBaDy27TUy93xMLKP2+WUhHfE+whryDrvoVbUs8 X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: KxJp2N6zxtxyCTTvHwkJT+sgEuTgLdQjG+g9aFOkeSuOYQfdg9EqhEo1xhtg2VE3Kvz6DHTjYibsWxjJzSTQX8FJc/QyQCXX0S4GmVv/YE6d5go85JSzUETBTn472843zx9079ppiC+j4OV2trJKkg== X-OriginatorOrg: sct-15-20-3174-20-msonline-outlook-72e6e.templateTenant X-MS-Exchange-CrossTenant-Network-Message-Id: 0a68ed90-be97-495b-6c95-08d979ec832d X-MS-Exchange-CrossTenant-AuthSource: DB9PR09MB4986.eurprd09.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Sep 2021 15:04:57.6202 (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: DB6PR0901MB1557 Received-SPF: pass client-ip=40.92.75.15; envelope-from=arthur.miller@live.com; helo=EUR04-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:274881 Archived-At: Lars Ingebrigtsen writes: > Arthur Miller writes: > >>> In which cases will this make a difference when displaying the *Help* >>> buffer for the symbol? >> >> In case where the symbol is not loaded, and there is no doc entry in autoload >> object. > > Oh, right --- I was thinking about ;;;###autoload, where the doc string > is available always, not > > (autoload 'foo "foo") > > Yes, in those cases it would indeed be helpful if the help machinery > just went ahead and loaded the library. However, there are some > instances where loading a library has unexpected side effects, like > enabling new modes and keymaps. Doing so is frowned upon (loading a > library shouldn't do those things), but it happens. > > If this is a concern, then we could perhaps add a button to *Help* to do > the loading instead of loading automatically? It would be one option. The other one would be to warn about possible unwanting side-effects in docs. I wanted to later switch to just fetch the docs instead of performing load. Loading docs can be done without evaluating the code. It might be a better solution anyway? By the way, I had thoughts about loading the library vs just docs. I reason, that, if I look at some symbol docs via describe-* functions, I am probably already using that library/package, or am about to use it, so it probably is going to be loaded anyway. At least in many cases, not always of course. > But perhaps just loading the file automatically would be fine anyway -- > it's a bug for libraries to side-effect to an annoying degree upon load. Helpful does it and a lot of people seems to be happy with it, but it does not mean it is the correct thing to do, just often acceptable, or overlooked. Built-in help does it too in some cases too, I think just for keymaps, I am not sure there.