Przeglądaj źródła

Emacs 27.1 org initialization fixes

Should work on emacs < 27.1, but untested as yet
master
Mitchell Tishmack 5 lat temu
rodzic
commit
7994a1cd85
1 zmienionych plików z 9 dodań i 14 usunięć
  1. +9
    -14
      emacs.org

+ 9
- 14
emacs.org Wyświetl plik

@@ -67,32 +67,27 @@ 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 early so 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.
First strip out any existing org load-path prior to package initialization, but only if use-package isn't installed. If we always remove all org load-path entries from the load path entirely after they're installed we can cause bad behavior on restarts.

#+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
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 if/when they install.

Actual org configuration is done later in another use-package block.

#+BEGIN_SRC emacs-lisp
(unless (package-installed-p 'use-package)
(progn
(require 'cl)
(setq load-path (remove-if (lambda (x) (string-match-p "org$" x)) load-path))
(package-refresh-contents)
(package-install 'use-package)
(package-initialize)))
(package-initialize)
))

(require 'use-package)
(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 org
:ensure org-plus-contrib
:pin org)


Ładowanie…
Anuluj
Zapisz