From 51f01c5c0aac9a4985a681edbaba293a97313e3f Mon Sep 17 00:00:00 2001 From: Mitchell Tishmack Date: Wed, 14 Oct 2020 08:21:29 -0500 Subject: [PATCH] Fix some weirdness with builtin org mode and package.el org Have to remove any load-path org's first before initializing the package db. Then use-package on org, using :pin to pin org to the org from that specific repo it came from. This has taken many years, but I hath slain a weird dragon finally. Package.el needs some damn work for builtin stuff that gets upgraded via it. This is all stupid. Also pull in some updates to auto-package-update casue I'm too lazy to not pull in next line changes on this. --- emacs.org | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/emacs.org b/emacs.org index d8aede1..3750df8 100644 --- a/emacs.org +++ b/emacs.org @@ -67,7 +67,16 @@ TODO: make this stuff work sanely in emacs org mode and via external tangling. N *** use-package bootstrap -This configuration is using *use-package* extensively. Install it earlyso we can use it elsewhere. +This configuration is using *use-package* extensively. Install it early so we can +use it elsewhere. + +First strip out any existing org load-path prior to package initialization. + +#+BEGIN_SRC emacs-lisp +(require 'cl) +(setq load-path (remove-if (lambda (x) (string-match-p "org$" x)) load-path)) +(setq load-path (remove-if (lambda (x) (string-match-p "org-" x)) load-path)) +#+END_SRC #+BEGIN_SRC emacs-lisp (unless (package-installed-p 'use-package) @@ -80,8 +89,23 @@ This configuration is using *use-package* extensively. Install it earlyso we can (setq use-package-verbose t) #+END_SRC +Then, before doing *ANY* package initialization, make use-package setup/use org +from the package repos and pin it so that other packages can't muck that up. + #+BEGIN_SRC emacs-lisp -(use-package auto-package-update :ensure t :defer t) +(use-package org + :ensure org-plus-contrib + :pin org) +#+END_SRC + +*** auto-package-update + +Make updating use-package installed package.el packages easy peasy. + +#+BEGIN_SRC emacs-lisp +(use-package auto-package-update + :ensure t + :defer t) #+END_SRC *** match end of string function