From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.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 nIhMJvN3kmMd3wAAbAwnHQ (envelope-from ) for ; Fri, 09 Dec 2022 00:49:07 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id MO9bJfN3kmPrRgAAauVa8A (envelope-from ) for ; Fri, 09 Dec 2022 00:49:07 +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 5D8D536ED5 for ; Fri, 9 Dec 2022 00:49:07 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p3Qcj-0002up-V7; Thu, 08 Dec 2022 18:48:17 -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 1p3Qch-0002uI-Si for emacs-orgmode@gnu.org; Thu, 08 Dec 2022 18:48:16 -0500 Received: from mail-pf1-x42c.google.com ([2607:f8b0:4864:20::42c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p3Qcg-0003l8-1v for emacs-orgmode@gnu.org; Thu, 08 Dec 2022 18:48:15 -0500 Received: by mail-pf1-x42c.google.com with SMTP id 21so2518738pfw.4 for ; Thu, 08 Dec 2022 15:48:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:message-id:in-reply-to:date:subject:to:from:user-agent :references:from:to:cc:subject:date:message-id:reply-to; bh=HxmEVcypjyEbuao0llI2hFCiuCDMaOJDcnXf/gmuXGY=; b=qZawOdSbpiORtDjxvxT3qPGmM0oH1C36bepuWeyW2ZzZvgh0XDlGxAjHn6VXJrgtvs 9Qym2R6ILcnK4g1fShArjsaBlTSkfli8TxFhnZ8UP117tG9RvSujyFY6GgSSfEKXreVQ GO33S/HU4dQXosbQ0fiNLo9sFn3aCcbviSc+y885LI/Fpq5n95k2t+qK9vDGEtt2Dnyz GudkQtiRGDnYBlSOSJYMHISluntUrw6dBCUNOjs4NJ1BVRIOtfJcdR1dFEW/2H2GtW23 eYbTKcqZliuDJ5T2Yr6CApLZ6dw30g4EgBGR8jVF0cZj7ubVoXW5Lownobo91/zSL+kq KvWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:in-reply-to:date:subject:to:from:user-agent :references:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=HxmEVcypjyEbuao0llI2hFCiuCDMaOJDcnXf/gmuXGY=; b=cQ+TveFVuwNaWw8raT/95AHgYwTH74tR/yfycT6U+lTLEtCT+QQCDcGL29E4zhtco2 oXLeo37Hdlpj/PQW4XyMyVNhrf1ooJiCzEruUv73Djf7/SWmFKMTIRfghW7Fg05gPSY/ NOvehXz71zUIXmc11lmPFUQAOQI8xVorPr9pJeUDmezCIWELDdGQVl2LXNYITluVORf3 wqtahJX7AJ+7OAQofVZNfPq/qrRXcwI2m4VY1WAElkXP9VxFvEanOMd38/tBoP+ax/jk vjeYFR7aK0lhl4D+cfD0WbZWpuwrFt9wdmCa/uO6CN62PdvkAP1L9+jTmcb42MbNXkGN AuGg== X-Gm-Message-State: ANoB5plVQkSvVSHeJm78EzLcyMNjR+aMMWo/thw+2PBU/aLJBek3Gtez SqWeympQDmgHrbvMSdmTqIO5oixxfXk= X-Google-Smtp-Source: AA0mqf4ETcsKO7E5Pfglj1q0onZ6XXmr3gNtbu9fcq2YzNTkT2aSZls01GAhKmzxQYOj0xV/ZrY4tA== X-Received: by 2002:a62:4ecd:0:b0:577:22cb:1f12 with SMTP id c196-20020a624ecd000000b0057722cb1f12mr4091151pfb.12.1670543291845; Thu, 08 Dec 2022 15:48:11 -0800 (PST) Received: from dingbat (203-173-24-107.dyn.iinet.net.au. [203.173.24.107]) by smtp.gmail.com with ESMTPSA id v12-20020aa799cc000000b0056b2e70c2f5sm62765pfi.25.2022.12.08.15.48.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Dec 2022 15:48:10 -0800 (PST) References: <87tu27jq7h.fsf@localhost> <87k032nyok.fsf@localhost> <39a5810d-75bc-4ddb-8722-703f762ed4de@app.fastmail.com> User-agent: mu4e 1.9.4; emacs 29.0.60 From: Tim Cross To: emacs-orgmode@gnu.org Subject: Re: Multiple versions of Org in load-path problem Date: Fri, 09 Dec 2022 09:56:23 +1100 In-reply-to: Message-ID: <86lenhxxs9.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::42c; envelope-from=theophilusx@gmail.com; helo=mail-pf1-x42c.google.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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham 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=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1670543347; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to: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=HxmEVcypjyEbuao0llI2hFCiuCDMaOJDcnXf/gmuXGY=; b=gAjdH+hyANu6RuPwfa+QKHEqshtDmbBYhI0DZL7LZTzoOWL4UMKHSUSriZm2LyVTztMJcY phWRlQbMPBPdIlnmDn1v4X4vkP1t+gn6LznVHlsKzqFedmNdrjkap8tM6xGRri5YvubxYk Yy3bqaqDe+g2Si1/MmgaTjBdk73qxgWtzihIe42m/VFhLSZByJrtWMuonT6OcK0eztrbDF hZ2MqV0dlmiukByNRfuLw+H9lKAc5EurNRwZqKpGK7E4EPKzk/Oem95hV2kdZbfjIAAUwn +xZ9iGEp+zUmtMneul9Sllt+GkDVV8V6AFigYQQrfkyY19A3b3LumsCWkiCZtw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1670543347; a=rsa-sha256; cv=none; b=nFfzpnN3Zbzsh7R0cQxLvGhMgxKQRm7ljBAXXcMnozE0X4n4wGujhAo25OcDRENEwKaiBX nclD3yKKU9pPrYiAmf8wLjnQpoyPwmBRcfEc3g2W83dbKBn5hCBds7Ba4wNemfjqlkSW2q xqAhnzfpRsCWI/vQ+iUY4E3GHMY/Af0NrJLYiNbydSJxp+sYiqbMgjo6+DE34rpv4AxSXD Ka8qbwK0GsHxn7LYiydzzMYDvSV6ieFIfthmttuDmLW3bhSbrpBnaXmV7yLUREa0GEkAqX zmg0vfebvpiFh1TNFEvXPW+6uerednMGvhsciXlO0a7rhxku5YsDC+aV/lwRlg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=qZawOdSb; dmarc=pass (policy=none) header.from=gmail.com; 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.46 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=qZawOdSb; dmarc=pass (policy=none) header.from=gmail.com; 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: 5D8D536ED5 X-Spam-Score: -2.46 X-Migadu-Scanner: scn1.migadu.com X-TUID: 642WQZCYkWUV David Masterson writes: > Adding this to bug #59882 > > "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'm not sure this is related to your problem, or whether that helps (but >> I hope it does)... > > I think it does. > > Side note: > > In my testing, I found a strange case where, in *scratch*, I get: > > (message "%s" org-version) > ;; Error undefined > ;; Do 'C-h v org-version' > (message "%s" org-version) > 9.3 > > So, 'describe-variable' on org-version causes Org to be loaded?!? Why > do I have a feeling this is related to this bug? 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 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. 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. 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. 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. 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.