From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Jean-Christophe Helary Newsgroups: gmane.emacs.devel,gmane.emacs.orgmode Subject: Re: org 9.2.6 and org 9.1.9 Date: Wed, 27 Nov 2019 12:13:51 +0900 Message-ID: References: <7D2A3D8D-CB71-4B0D-8839-9633BD9F9C4B@traduction-libre.org> <874kyqcuup.fsf@alphaville.usersys.redhat.com> Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3601.0.10\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="47936"; mail-complaints-to="usenet@blaine.gmane.org" To: Org-mode , Emacs developers Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Nov 27 04:14:16 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iZnmP-000CGr-E3 for ged-emacs-devel@m.gmane.org; Wed, 27 Nov 2019 04:14:13 +0100 Original-Received: from localhost ([::1]:60836 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iZnmO-0005zH-8z for ged-emacs-devel@m.gmane.org; Tue, 26 Nov 2019 22:14:12 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56303) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iZnmF-0005z8-OG for emacs-devel@gnu.org; Tue, 26 Nov 2019 22:14:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iZnmD-0003Yc-Mi for emacs-devel@gnu.org; Tue, 26 Nov 2019 22:14:03 -0500 Original-Received: from relay1-d.mail.gandi.net ([217.70.183.193]:53343) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iZnmD-0003W3-Ct; Tue, 26 Nov 2019 22:14:01 -0500 X-Originating-IP: 210.160.37.44 Original-Received: from [10.254.2.141] (unknown [210.160.37.44]) (Authenticated sender: jean.christophe.helary@traduction-libre.org) by relay1-d.mail.gandi.net (Postfix) with ESMTPSA id 0124A240003; Wed, 27 Nov 2019 03:13:55 +0000 (UTC) In-Reply-To: X-Mailer: Apple Mail (2.3601.0.10) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 217.70.183.193 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:242758 gmane.emacs.orgmode:126141 Archived-At: > On Nov 27, 2019, at 11:59, Cook, Malcolm wrote: >=20 > Tim, > =20 > Yes, it is a bit of dependency hell. I see 2 solutions here: 1) org is only provided as a built-in package and updated there when = necessary 2) org is removed from the built in packages The current situation is really weird. Jean-Christophe > =20 > Quoting myself from Re: [O] How to safely update from ver. 8.2.10 to = 8.3.x : > =20 > =20 > Here's what I do, at the shell: > =20 > emacs -Q -batch -eval "(progn (require 'package) = (add-to-list=20 > 'package-archives '(\"org\" . \"http://orgmode.org/elpa/\";)) =20 > (package-initialize) (package-refresh-contents) (package-install=20 > 'org-plus-contrib))" > =20 > This assures that org is not already loaded when org is compiled, = which I've=20 > learned is the source of creating a mess. > =20 > Note: I use org-plus-contrib from melpa instead of org. If you want = just org,=20 > you could simply: > =20 > emacs -Q -batch -eval "(progn (require 'package) = (package-initialize)=20 > (package-refresh-contents) (package-install 'org-plus-contrib))" > =20 > HTH, > =20 > Malcolm > =20 > =20 > =20 > From: Emacs-orgmode = On Behalf Of Tim Cross > Sent: Tuesday, November 26, 2019 3:41 PM > To: Nick Dokos > Cc: Org-mode ; Emacs developers = > Subject: Re: org 9.2.6 and org 9.1.9 > =20 > CAUTION: This email was received from an External Source > =20 >=20 > There is a very important rule which must be followed wrt org-mode = installation. It is critical that no version of org is already loaded = before installing a new version. This can be quite tricky as many of us = have org setups which automatically load some org functionality without = explicitly opening an org file or agenda view (for example, you might be = using an org add-on for email). Situation is worse if we are loading org = as part of our init.el. > =20 > I'm also not sure that tweaking the load-path order is sufficient if = your installing org via M-x package-install as there is a 'chicken and = egg' problem with the initial install. If your init.el file is loading = org functionality and you only have the built-in org version installed, = that version will be loaded before you run package-install. Probably = works if you install via your init.el though. > =20 > I've found the safest thing to do is only use autoload or use-package = with deferred loading for org and whenever updating org (I use the = org-plus-contrib package from the org elpa repo) only update immediately = after a fresh restart of emacs and before doing anything else. Failing = to do this often results in a broken build as you get a set of new org = elc files which contains definitions from two different org versions. = When the versions are only different in minor version numbers, this = mixed build may not even be noticeable, but when major version = differences exist, you get the symptom of broken functionality, missing = definitions or unbound symbols. > =20 > The situation is made worse by package maintainers specifying the = latest org version rather than the version built into Emacs when the = bundled version would be sufficient. > =20 > It took me a while to structure my init.el file such that no org = functionality was loaded until I used something which depends on it. = However, once I did, provided I only update org in a fresh new session, = all works flawlessly. I found use-package package really helped with = this.=20 > =20 > =20 > =20 > On Wed, 27 Nov 2019 at 06:22, Nick Dokos wrote: > Jean-Christophe Helary = writes: >=20 > > org 9.1.9 is a built-in > > > > but org 9.2.6 comes as a dependency to some packages and having both = installed creates conflicts. > > >=20 > What conflicts are you seeing? I have the built-in 9.1.9 org that > comes with emacs but I run (close to) latest master and I see no > problems: the only thing I do is to set my load-path to point to the > right place (and make sure that that setting precedes the > /usr/local/share/emacs/27.0.50/lisp/org setting that emacs adds): >=20 > (add-to-list 'load-path (expand-file-name = "~/elisp/org-mode/lisp")) >=20 > Although that has been enough for me, it's probably safer to delete > from load-path all other org entries, thereby making the built-in > version invisible to emacs - in my case, I just have the one: >=20 > (delete "/usr/local/share/emacs/27.0.50/lisp/org" load-path) >=20 > That way, if you happen to do something like `(require 'old-org-req)' > with a requirement that is not satisfied by current org, but is > satisfied by the built-in org, you'd get an error, rather than getting > a mixed installation. >=20 > > Why does that happen ? > > > > Can't 9.2.6 override 9.1.9 ? It's not the first time I have issues > > with that situation and that's extremely confusing. What is the best > > way to solve that ? > > >=20 > I think the above should be enough (and IME it is), but maybe someone = can > think of other things that might trip one up. >=20 > --=20 > Nick >=20 > "There are only two hard problems in computer science: cache > invalidation, naming things, and off-by-one errors." -Martin Fowler >=20 >=20 >=20 >=20 > --=20 > regards, > =20 > Tim > =20 > -- > Tim Cross Jean-Christophe Helary ----------------------------------------------- http://mac4translators.blogspot.com @brandelune