From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: David Masterson Newsgroups: gmane.emacs.help Subject: Re: Sub-libaries in a package and use-package ? Date: Sun, 02 Jul 2023 21:48:23 -0700 Message-ID: References: <87bkh1zbk7.fsf@posteo.net> <87zg4kd91d.fsf@posteo.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30244"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) Cc: help-gnu-emacs@gnu.org To: Philip Kaludercic Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Mon Jul 03 06:54:19 2023 Return-path: Envelope-to: geh-help-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 1qGBZq-0007bX-6S for geh-help-gnu-emacs@m.gmane-mx.org; Mon, 03 Jul 2023 06:54:18 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qGBZA-0001wg-VL; Mon, 03 Jul 2023 00:53:36 -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 1qGBZ8-0001vp-7C for help-gnu-emacs@gnu.org; Mon, 03 Jul 2023 00:53:35 -0400 Original-Received: from mail-bn7nam10olkn20812.outbound.protection.outlook.com ([2a01:111:f400:7e8a::812] helo=NAM10-BN7-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 1qGBZ6-0002Q9-8N for help-gnu-emacs@gnu.org; Mon, 03 Jul 2023 00:53:33 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Clnz+YclgWnmUnEWg1MCvRnhFFVPxNsDSNvY3XRf7to26SBtEzJ3JXKRxEbKN/6SP8PH6uz8nD6T+iAyidSESVJ8UJPjt5uPZ2wVqkSA4P6nipOROjQy6WOKR3xHKToIDVgugHOkLPGYfZoaG1laAdwYbCvymAQSii2uyOb/siH3WiJAR16MXPlyqoWRMWwR0EGnpAFfXTh0jCqvAV2daTO2v5mWAdIqwvCahPrfeQUHVtXEVnYq+JMxT7SlNh7bXI7V7UolY2wekenZG/gxx8yWRNuSywYvGjOpwnCAoU8m1Uq4RD6mzdLxAp/jc11YZBd2wQCubq0fV3+7RUsaDg== 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:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=7IHtKjtnvPiPLwijR2AWeATpW34p/izcri0buuwJZso=; b=IqT6ES3XChqiSLPLxCj/Y5Uxqk60HlAOe6lDo7c877fTCQju/BsZqngNivttFNoCSVwnKhLlE7bdb6MElGGDkzsHuIrcPKV4Up7nTvNQSMhzVFB99ymOi2CuMvDITghGlQEn/BC/1fflnfpVizfyo11ueaogZ+X5E6Vr2UitzB2j8DxrULHxOXmOIy0bUz2vkMWDIK/mir/7ZDyz+0jF6DMVPvS/tixFgPVX79i4TwYtcelEXDCbsEf4K7zf3BM04kTGCZrv3y5XpeB/xmz/NWDdirrhdttJf2m20KTyfwJ/LRrDbX8FFr7hULVZTQci2+2Bc9+f/fOf4gWmRecMFQ== 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=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=7IHtKjtnvPiPLwijR2AWeATpW34p/izcri0buuwJZso=; b=ObCKSnLo3lmKcEwHBxpbqHQsV4V08X52BK6u/waNJiCZaaIyT+z3rEYhmFgNia6xCLxYAtEn9a7NmyUTF+xys0sHMUNJbrSID6QJdecX6mmISSJCDwd4lLJQn1Nf3F4x1e4T8PPNfyb4AFqAvGRPRoCaqGxdmpj1FvbofASqnYwcYN78DjopdwSLy2o85MF3MhBDeHvRgxlgzjqAn+nCFOsUL6syN6+7snpvc0eIByLosKc+ZuIBXTBM7q6s9axmsF3qS3LfbTWVlRLXEhayqfydgWh0IMxQgQMBqVtKjHO/L2zN4M+z5vScHVDF/EpMHIdnZwFAm6uiECVuIbUFRQ== Original-Received: from SJ0PR03MB5455.namprd03.prod.outlook.com (2603:10b6:a03:27b::11) by SJ0PR03MB6763.namprd03.prod.outlook.com (2603:10b6:a03:40a::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6544.24; Mon, 3 Jul 2023 04:48:27 +0000 Original-Received: from SJ0PR03MB5455.namprd03.prod.outlook.com ([fe80::34a9:d9f6:b659:70d0]) by SJ0PR03MB5455.namprd03.prod.outlook.com ([fe80::34a9:d9f6:b659:70d0%6]) with mapi id 15.20.6544.024; Mon, 3 Jul 2023 04:48:27 +0000 In-Reply-To: <87zg4kd91d.fsf@posteo.net> (Philip Kaludercic's message of "Tue, 27 Jun 2023 19:01:18 +0000") X-TMN: [Nly9dJKlJPhCg9Zsy6WHZTQ1aJqtvnELD+AytLaxqnQleUk7gj7knv3DX+6PPBMc] X-ClientProxiedBy: BYAPR08CA0040.namprd08.prod.outlook.com (2603:10b6:a03:117::17) To SJ0PR03MB5455.namprd03.prod.outlook.com (2603:10b6:a03:27b::11) X-Microsoft-Original-Message-ID: <87zg4diors.fsf@penguin> X-MS-Exchange-MessageSentRepresentingType: 2 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR03MB5455:EE_|SJ0PR03MB6763:EE_ X-MS-Office365-Filtering-Correlation-Id: a2bb0042-66d9-4dd6-ae0f-08db7b80bdb9 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: rFLQRefIrvioSde4dmLRBl+O47YDNlaBvTH8DpYWumpKWEFzuH4CpiNwSugs8/g8nR9ap0xkLwHoFRzCiQIueaMtxhdwFoWkYfLsg1BZHqF+0ydUM48GHf/dAUgTducoBxM4bEvfSNI3xqZ0aYnmWoHYmWs1lEyc/+0FwAitmj77n9yZ1GuPFcT8MfE2S7obYzPlZ17Px8QhCfGJCapZUfiTL0CiX7WOfpCwmBAj3XJVNQk23l3EqIbImwznZLwJe4W3odMLrJZgoQWDZi7k636LKMYbOqrZAMqv9dS35xwSm9Uo6LlkHcian4UrDSUQ5X/QYUD04DCQEAMEaWK6q8iJU85bd476knWdAzOItfOKVUSwXy0VpSBzAdpMUOBGpgx9OPqswYsGW0IWD5aum8U5TevYRP9gjnIARmnGbZ8jHCVV1+PDqjvZtVAqEgDG23zAxpV4O6Pa+YMystSBJbvyXAq1+J1CEDrqgWWiOUT0xO5FFakS4cPS01SfNZmspazPKqa2IVRFUWfa4+/3QECwXnZgGWemj3dKKx/5hp4dWLwoG2mZhr8iBli/MgOh X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?VFpaeWUyUEM2OHpTSE9mV2VSTmc0TGV4eFRaaTV1RSswampnb0xwRmpPL3Vr?= =?utf-8?B?Qy9BeGtqeHZiZXJlR3M5Qnp4aGtuKzlXNU9XL0h1aFhvanliOGM4LzFuN0ZT?= =?utf-8?B?cHN1U1JpTlk2RU5vZUVka1NQWmpRakNsaVhIYTdsNTd4TSsrQmlvWS8yUUph?= =?utf-8?B?YkQ0Q2lLQTRFYlhkd1pFRGRzYnVsdmJ6RUxzeG1kTTQzTnU4TG0wbDUxZExo?= =?utf-8?B?OVJEL1dXUElTRkRTRndJay9vSElPVWhzdk9YU0NVeVBucFdZVXAwQWRHWmtN?= =?utf-8?B?QjB5c2hDaUxOUWgxK0IyajhjeTlXUmllNnVDYWFiall4cGhqVVEwSzZJZDl6?= =?utf-8?B?WTUvY2RwS0YvOUwwajM0RXdQYTNpRWFMNXRVb24zWVJjdFRoY3Y0K3ZqeXU2?= =?utf-8?B?azZxbFQ4VnJHR0FJaWYwWmNRR0RpNUw4RWFEdWIvMHNWYXB0SHNpWVU1dXBn?= =?utf-8?B?QUU2RXNpZ0dFWXBHVU5Qek82dnRWSGRPMUJ3bklhYVNJVk1iNGttODhOL0Ft?= =?utf-8?B?N2g0ZmpjVU94eFBhQVpFNFQ4N3BKbDAraWhGWmtkbkdiWDl4SkJjZVlmcENo?= =?utf-8?B?d21MUitKV1FSRDV0M3VtZG0rYnF4Zjl3Q294QWx2eVAzQWNWMW9VbFZwTS84?= =?utf-8?B?TUNQcUJNTVVrck9GNlRmZVZvSGQ5NE9xakZkQ3 X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: a2bb0042-66d9-4dd6-ae0f-08db7b80bdb9 X-MS-Exchange-CrossTenant-AuthSource: SJ0PR03MB5455.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Jul 2023 04:48:27.6422 (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: SJ0PR03MB6763 Received-SPF: pass client-ip=2a01:111:f400:7e8a::812; envelope-from=outlook_98C99531806B1C22@outlook.com; helo=NAM10-BN7-obe.outbound.protection.outlook.com X-Spam_score_int: 6 X-Spam_score: 0.6 X-Spam_bar: / X-Spam_report: (0.6 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FORGED_GMAIL_RCVD=1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, NML_ADSP_CUSTOM_MED=0.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:144083 Archived-At: Philip Kaludercic writes: > David Masterson writes: > >> Philip Kaludercic writes: >> >>> David Masterson writes: >>> >>>> The 'async' package has 2 extra libraries (dired-async & >>>> smtpmail-async). I'm trying to figure out how to set these up with >>>> use-package, The documentation for use-package in chapter 3.1 says: >>>> >>>> ---- >>>> But the =E2=80=98foo=E2=80=99 package might also contain a library nam= ed =E2=80=98foo-extra.el=E2=80=99. >>>> If that library is not loaded automatically, you will need a separate >>>> =E2=80=98use-package=E2=80=99 declaration to make sure that it is. >>>> ---- >>>> >>>> It doesn't say anything else about this (CMIIAW), but this suggests to >>>> me that the following should work: >>>> >>>> (use-package async >>>> :config (async-bytecomp-package-mode 1) >>>> ) >>>> (use-package dired-async >>>> :config (dired-async-mode 1) >>>> ) >>>> (use-package smtpmail-async >>>> :config (setq message-send-mail-function 'aync-smtpmail-send-it) >>>> ) >>>> >>>> But the following error when I start Emacs: >>>> >>>> Error (use-package): Failed to install dired-async: Package >>>> =E2=80=98dired-async-=E2=80=99 is unavailable=20 >>>> Error (use-package): Failed to install smtpmail-async: Package >>>> =E2=80=98smtpmail-async-=E2=80=99 is unavailable=20 >>> >>> Did you set `use-package-always-ensure' to a non-nil value? It might b= e >>> that use-package is trying to install the package >>> {dired,stmpmail}-async, even though these are just libraries, part of >>> the async package. >> >> Hmm. I do have 'use-package-always-ensure' set to t, but it doesn't look >> like it's trying to install -- it just can't find the package. There >> should be a mechanism to tell use-package that this is a library in some >> other package,=20 > > It cannot install the packages, because they don't exist. Perhaps > adding a :ensure nil could help? Ah! This seems to work good: ---- (use-package async :delight :config (async-bytecomp-package-mode 1) ) (use-package dired-async :ensure nil :config (dired-async-mode 1) ) (use-package smtpmail-async :ensure nil :autoload async-smtpmail-send-it :init (setq message-send-mail-function 'async-smtpmail-send-it) ) ---- >>> Also, I don't think it is necessary to configure all of these >>> separately, at least in your case. >> >> Possibly true. I can get around this by requiring the sub-libraries in >> the :config section of async. But that doesn't quite feel right,,, :( > > I'd question why you need to require the libraries in the first place. The async package seems to have made the decision that, if you want to do dired/smtpmail asynchronously, then require the sub-libraries. I thought I'd try it to see if I have a problem, but, since there are cases where it might have a problem, I might turn it off again which I could do with :disabled in the sub-library packages if it worked. --=20 David Masterson