From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id WGURCT3BkmP57AAAbAwnHQ (envelope-from ) for ; Fri, 09 Dec 2022 06:01:49 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id +HMmCT3BkmNNRgAA9RJhRA (envelope-from ) for ; Fri, 09 Dec 2022 06:01:49 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id A5AAA3D816 for ; Fri, 9 Dec 2022 06:01:48 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p3VVG-0006zg-P2; Fri, 09 Dec 2022 00:00:54 -0500 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 1p3VVE-0006z2-Fh for emacs-orgmode@gnu.org; Fri, 09 Dec 2022 00:00:52 -0500 Received: from mail-dm6nam11olkn2067.outbound.protection.outlook.com ([40.92.19.67] helo=NAM11-DM6-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 1p3VVB-0004dP-Tb for emacs-orgmode@gnu.org; Fri, 09 Dec 2022 00:00:52 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OJI6tzgVDFpwmNS4X1U4nfFj/ZjzYSR1bM2qf1HgRbt7UtPPCX3FhZJ9MJPn5ZxOCz0wm9dewYf1zc/3SsBhthdqYNga58wQASZaU0zPhU4d0tF376YyAia08SHlWIeYWefExtfxXFUAjznn4TKUDZyr0gnRgBHKOn6EqnNTRoiEi6803ikZQ606mTBsJDdp58LHKyLZowd56PO+gfAXOC/fEq9fQB3I4wsGKWanZHqCyp1ivfVNGOSx1i/FijaXRR2l5l4SZ+Cbq7FXwm5O+CG7z2Qowv506r+pYgGiCVLW5whUECrwrBz2D8YA2i0MZuD3VtGd1Te5XMG65d7rtg== 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=wZWK4+4wHM/VpPKqf6otKG44FTb8iKoCyQ4fX8BmgcU=; b=WwK/s6fIS4MoX9ja/OD7fD/VNbfbLqZlDPZgdz+y0tDpjhv1wv+mFRU6hRQFXzJPu1FHBl+7OBN9NOcEpOGJeRYNXh+TSWoaMnXPdmO8mGfuQEi8TdPjMH1yMZUtEkRL2DeO4Qk/e5SVgWvPzDc+UDOU2tAo6zckRyJRATSjcAN8Nok7Ay/gGXZyuMaQnYUXRtCvdU6E1iCRl57GB+ZRxs5UqLYjTywhS/vlrYVx8xsIXuy/mziROvkQOhc+XMCRiR9p1fqlyNhf6DEhCI+653qJiEl4mZEJzVp2E2G6FtwzUPrruaZkLry6lrNl7yMNAJicTpO0vRxY6rH/YKC9Ug== 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=wZWK4+4wHM/VpPKqf6otKG44FTb8iKoCyQ4fX8BmgcU=; b=avAlaRnp3qoskXXGNZjVgsdvTGSN3VYe+3kiHd1GWL6gmapot6s9ifGIsGrdfz0IJuUc0hMaXatgYBSekshzUyTFGu2njkN06KxDhPjWGC2At/nCBs0CRcF8QPxMllnU2cCLFpWe3SyquAc2M8Go8JtxhclqSkE+i9qEUbgIpeUpvTfWwfoXPc3KKpB1CWOEXjSM3dVDpWD+6wYcmGAWwlBajuqALiV2HUPGeisBTv9B4k0SA3P049cX1YdlG6R/V4nASfOJ4vKFEgaRP69Pv3qexqJuHDrjscnlZ/+AHDGE6Pp1VQryuwzZhZWlvR6gICKnh/KLLG45zKSrGRwVXA== Received: from SJ0PR03MB5455.namprd03.prod.outlook.com (2603:10b6:a03:27b::11) by DS7PR03MB5558.namprd03.prod.outlook.com (2603:10b6:5:2c3::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5880.18; Fri, 9 Dec 2022 05:00:46 +0000 Received: from SJ0PR03MB5455.namprd03.prod.outlook.com ([fe80::e016:84f7:daad:916e]) by SJ0PR03MB5455.namprd03.prod.outlook.com ([fe80::e016:84f7:daad:916e%3]) with mapi id 15.20.5880.016; Fri, 9 Dec 2022 05:00:46 +0000 From: David Masterson To: Tim Cross Cc: emacs-orgmode@gnu.org, 59882@gnu.org Subject: Re: Multiple versions of Org in load-path problem References: <87tu27jq7h.fsf@localhost> <87k032nyok.fsf@localhost> <39a5810d-75bc-4ddb-8722-703f762ed4de@app.fastmail.com> <86lenhxxs9.fsf@gmail.com> Date: Thu, 08 Dec 2022 21:00:44 -0800 In-Reply-To: <86lenhxxs9.fsf@gmail.com> (Tim Cross's message of "Fri, 09 Dec 2022 09:56:23 +1100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) Content-Type: text/plain X-TMN: [ScKKAljO28Pst0+N95yI42JxD9Evcfz3HIUbbafhByzM2/0LI523ifox6NesVZEx] X-ClientProxiedBy: BYAPR06CA0061.namprd06.prod.outlook.com (2603:10b6:a03:14b::38) To SJ0PR03MB5455.namprd03.prod.outlook.com (2603:10b6:a03:27b::11) X-Microsoft-Original-Message-ID: <87edt9dvcz.fsf@penguin> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 2 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR03MB5455:EE_|DS7PR03MB5558:EE_ X-MS-Office365-Filtering-Correlation-Id: cbdedd9d-4658-4528-072b-08dad9a2553a X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: oTvnZErOoQRbekQB5QxPVtyYhmcVMOFipeGCXQdle4uNsACSoM9zRAZmCRVSwrCNO06zGBwqUQILRM/iWlWsulRc6KfuM1XVRIygQ0ouUQ2n0uBzYpA5h8bBeVmEXEIZGPMgH5NuUbVuhP0fvxaNYE8w2MvzFwcuf6uznY0zTvwjsAol29vwkYKijsgl6DwLeTy6EnxFirD+LAcgeQygUUQC8BxRZKCiMX4BaxswD2S4qbZUZDu1gBekcAjwqy/KwJQtac8NfOkoNFumppBdGpuUuV7R5jH02D1D0EU7NY3TbSVi8yFYTb/aLgltUT794TBOoSqy9Mu2Ol/QgNbFqCyMfJ8BIqxhbGKKpDjZR+LHwJW+p1ODo/zTigivWcvQg1l2lWrpAFTcF/ArOzmYl76uarchnnHDap0KdodSfcJ0gH20Pgv1h9tiFjoIWE1W36JvYPgSRi9VHAqgNDvI34+N8eUQsCXPotDn11uA/0ghY+P5vZqTOo0VFYBX9LownJUMYMfSSJKl+7I+0tVgjavw9F/q2tPGDqIdYj6HRPj/pzxte426jt1FCw98e5FW7id9mdsui/Z9L+4VWgS2FjcPWMRUNcEjZfYd5SG0n6Qf3WfNf54S9O0YBw+RRicONnc3EtJDzQ4ezW9v+vujwltZs0arV5CHM+S+AfG+SvY= X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?qJmGrhcl6qDw8XKi6JLYIJ8e4Vz2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6zlt3btW+nYYyR4o56+/PjyD9VmAriE7f2GXzhCilCX9dLtBlar5fTGBcef?= =?us-ascii?Q?X4BiDpBP5Jvj5uiIvw6MbVDJaDTGkig4ufyCVvLsoi4s/1EI7jPQ2XhJ6aW0?= =?us-ascii?Q?4ffN7//+ru9ga7z2vFqcA8utpDiJaKQ6guuQUVj9xhoUkLj8V9T+d8lOR+0k?= =?us-ascii?Q?bOAdVpYvD/QsGEJAeQh6woC15TUqRXi9OnwOHMAMWTCbt4yd3IdjeNYPKz8k?= =?us-ascii?Q?D/LnJhoFd/M3Z1FXigfGINAkFah8QMvhZQyYyPGYxgJ/zxW9rO5VooSvjLF9?= =?us-ascii?Q?HNq7osUpWNzTxthfByjcaJlG2+7d3fYi2NSs4O27QmK4e2MiP0CpWEWsyO14?= =?us-ascii?Q?6z+1TSP7dCCdMOpRZLXw+WhJY9sEgTJ/pGjz3aGOIJnxfNKrBlFMCX9W92aV?= =?us-ascii?Q?RtEwgA1TU+lBEAs5dhPO1v2OADItIiR7vpXBbhc76Eb2VJAixjkUPEHCCL4i?= =?us-ascii?Q?/noQWTBjU22NCvYPsXbywL66tcmw?= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: cbdedd9d-4658-4528-072b-08dad9a2553a X-MS-Exchange-CrossTenant-AuthSource: SJ0PR03MB5455.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Dec 2022 05:00:46.6329 (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: DS7PR03MB5558 Received-SPF: pass client-ip=40.92.19.67; envelope-from=outlook_98C99531806B1C22@outlook.com; helo=NAM11-DM6-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.229, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, NML_ADSP_CUSTOM_MED=0.9, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1670562108; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=wZWK4+4wHM/VpPKqf6otKG44FTb8iKoCyQ4fX8BmgcU=; b=T+texpcvTNIwZt5fzOP9be66I6e2Bvq7SxhmPU0VxKLwgZ+xO1hUB9LixB9cbaZmHkN4ol 3T8Eq209RfEgIsasMSyIOmPIMM4vq5N2TpquGUujtZ2jjYEN/QzODl9SVhAUsbBNtH1uzv oUJWaAGdGD+mYKsKqiU0N1Th42zdTXPlMzjY824bhAKF0xSYs5A/+HajltX0Z1gzSX2U+J kI2cpsdhHb+5Ulj37HJT/HkeTOm3ai08JDtCQ8fsgvY0GRQ982OOzFsd25cjcGGwN4a79Q ghlPLKd30ocYS1FpUIHJCMrlLM3IIPNWAKUHGNUKYsMO2KZuRMG2JzZYrzZudA== ARC-Seal: i=2; s=key1; d=yhetil.org; t=1670562108; a=rsa-sha256; cv=pass; b=PAao6tgP9cXE04mDMZRt2To0/rGEsGCFVJwdTcQ43+fG6kG3M/RG/V8Ph0rsxA+YNGwkV2 Z4LlktrxEH529ayip3MUX8axVGNKM7SmgwsqfW+0goWlB0OFu2dCZf3TDhJ/vv6vMacty5 Qj1apnUccjeA5Ml8xpj7xD0ne/6SFcLZhOpvERRFwPuDCe6DbFgfJ8gBo7xHuc1LmVB1YM NwfTMiloi/lLSS2O0h47UEnp03FRUlacZr/gn7tjhHqSsgbaEzbFEAEg/QOLGAy+UpHunx MzGl9KbWjBUxy+QfQWDttdNc54rXsv6VIzVGzGd/5W2jks5YQIw+npO3/p18/w== ARC-Authentication-Results: i=2; aspmx1.migadu.com; dkim=pass header.d=outlook.com header.s=selector1 header.b=avAlaRnp; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 2.05 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=outlook.com header.s=selector1 header.b=avAlaRnp; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: A5AAA3D816 X-Spam-Score: 2.05 X-Migadu-Scanner: scn1.migadu.com X-TUID: zvODNaQN16D4 Tim Cross writes: > David Masterson writes: > >> "Michel Schinz" writes: >> >>> Just for the record, I also ran into problems when installing Org 9.6 >>> using Emacs' package system on top of an older version that came with >>> Emacs. If I tried to install it as usual (M-x list-packages, then >>> install the package from there), I had errors during compilation related >>> to `org-assert-version`, and then if I restarted Emacs, I would get a >>> fatal error in an unrelated package. >>> >>> I managed to solve that problem by: >>> 1. uninstalling Org 9.6 and exiting Emacs, >>> 2. starting Emacs with -q, >>> 3. installing Org 9.6 from there (using M-x list-packages as usual), >>> 4. restarting Emacs. >> >> Interesting! I tried this (essentially) and it worked for my case. In >> my case, I had a built-in Org-9.3 and I was trying to use list-packages >> to install Org-9.6. I checked that using -q still added Org-9.3 to >> the >> load-path, but, since Org wasn't loaded, the install via list-packages >> worked. >> >> The question is what's the proper way of doing this without '-q'? [...] > I don't think there is any safe way to install an updated version of > org-mode other than > > 1. Use the -q approach outlined above Thinking about it, this only works if Org is in elpa as melpa (etc.) are not added to package-archives. You'd have to do some handwritten elisp out of *scratch* to setup package-archives if Org-9.6 was still coming out of melpa. That's why this can only be labeled as a hack and not a solution. > 2. Craft your init.el file such that org functionality is only loaded > when explicitly requested and always update as the first action after > starting emacs. In this case, something happened in package-install when trying to install Org-9.6 with a built-in Org-9.3. During the compilation check (.el -> .elc) many files failed because the new 'org-assert-version' macro was not defined. Sort of like, after package-install started working on Org-9.6, org-macs.el (where org-assert-version should be) got loaded *before* the new load-path had been set causing it to load the old one from 9.3. Thereafter, everything went awry. > The first approach is actually the easiest. The second is hard to get > right and very fragile because packages like use-package and more > specifically, other packages with leverage off org functionality, make it > impossible to reliably know exactly when org is loaded. Using ':after" in use-package is supposed to help that, but I'm not sure it is reliable. Packages are often incomplete about what other packages it depends on. > An approach used by many 'canned' distributions is to postpone package > updates. You have a function you run to check for updates which > generates a list of packages to update and writes that list to a > file. Each time emacs is started, it looks for this update list and if > it finds it, it installs packages updates at the very beginning of the > init process (before any of your other init.el code or custom > blocks). The process also looks for org in the list of packages to > update and if it is found, updates it first. Probably doesn't work in this case as you would need to be able to use package.el suggesting that the load-path has been updated for all built-ins already. The thing I note is that the load-path has already been updated for built-ins at the beginning of '~/.emacs.d/early-init.el', but the libraries haven't been loaded yet (unless needed). That's okay if the newer version of a package then cleanly replaces all the files in the old version. > I don't think there is a safe way to load org mode after the init > process i.e. after booting emacs by M-x package-update. Where is package-update called in the boot process of emacs? I don't see package-update in Emacs v2.7. > I've had good success using straight.el. I had to be careful regarding > how I structured my init.el file (ensuring any straight stuff happens > first and the first use package stanza is for org. The main reason > straight works well for me is that my work flow is to do a M-x > straight-pull-all when I want to update my packages. This does a git > pull for all the sources, but does not do any build/install. This occurs > when I next start Emacs and because I have all the straight stuff at the > start and because org mode is the first straight-use-package, the update > and install happens before any other org functionality is loaded, > avoiding mixed version issues. Where do you get straight.el? I don't see it in [m]elpa. -- David Masterson