Skip to content

Commit

Permalink
Now runs package-initialize before require:ing org-mode
Browse files Browse the repository at this point in the history
Due to some conflict between Emacs built-in org-mode and org-mode from
orgmode.org/elpa, I need to initialize packages (e.g. initialize the
user-installed newer version of org-mode) before I can require org-mode. Read
more at syl20bnr/spacemacs#8334
  • Loading branch information
Eeemil committed Sep 17, 2018
1 parent b637f8c commit 8bf187b
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 19 deletions.
17 changes: 17 additions & 0 deletions .emacs
Expand Up @@ -4,6 +4,23 @@
;
; The configuration is written in
; org-mode. :)


;; Initialize installed packages
(add-to-list 'load-path "~/.emacs.d/elpa")
(add-to-list 'load-path "~/.emacs.d/myplugins/netlogo-mode")

(require 'package)
(require 'cl)
;; Add repositories
(setq package-archives '(("gnu" . "http://elpa.gnu.org/packages/")
("org" . "https://orgmode.org/elpa/")
("melpa" . "http://melpa.milkbox.net/packages/")))
;; Stop adding package-initialize to .emacs...
(setq package--init-file-ensured t)
(package-initialize)

;; Load the rest of the configuration via org-mode
(require 'org)

(org-babel-load-file "~/.emacs.d/configuration.org")
23 changes: 4 additions & 19 deletions .emacs.d/configuration.org
Expand Up @@ -16,23 +16,6 @@
* General settings
** Initialization process.

#+BEGIN_SRC emacs-lisp
;; Initialize installed packages
(add-to-list 'load-path "~/.emacs.d/elpa")
(add-to-list 'load-path "~/.emacs.d/myplugins/netlogo-mode")

(require 'package)
(require 'cl)
;; Add repositories
(setq package-archives '(("gnu" . "http://elpa.gnu.org/packages/")
("org" . "https://orgmode.org/elpa/")
("melpa" . "http://melpa.milkbox.net/packages/")))
;; Stop adding package-initialize to .emacs...
(setq package--init-file-ensured t)
(package-initialize)

#+END_SRC

Install use package
#+BEGIN_SRC emacs-lisp
(unless (package-installed-p 'use-package)
Expand Down Expand Up @@ -448,8 +431,10 @@ By default, give todo-items a closing timestamp.

Pretty bullets
#+BEGIN_SRC emacs-lisp
(use-package org-bullets)
(add-hook 'org-mode-hook (lambda () (org-bullets-mode 1)))
(use-package org-bullets
:ensure t
:commands (org-bullets-mode)
:init (add-hook 'org-mode-hook (lambda () (org-bullets-mode 1))))
#+END_SRC

Global keybindings
Expand Down

0 comments on commit 8bf187b

Please sign in to comment.