Move package.el initialisation to configuration.org

This commit is contained in:
Gergely Polonkai 2018-12-10 08:25:05 +01:00
parent 35fa82c5a2
commit 99e39400de
2 changed files with 17 additions and 12 deletions

View File

@ -1,5 +1,22 @@
* Emacs configuration
** Set up the package archives
#+BEGIN_SRC emacs-lisp
(require 'package)
(add-to-list 'package-archives
'("gnu" . "http://elpa.gnu.org/packages/"))
(add-to-list 'package-archives
'("melpa-stable" . "https://stable.melpa.org/packages/") t)
(add-to-list 'package-archives
'("melpa" . "https://melpa.org/packages/") t)
(add-to-list 'package-archives
'("marmalade" . "http://marmalade-repo.org/packages/") t)
(add-to-list 'package-archives
'("org" . "http://orgmode.org/elpa/") t)
(package-initialize)
#+END_SRC
** Configure ~use-package~ and preload ~bind-key~
#+BEGIN_SRC emacs-lisp

12
init.el
View File

@ -9,18 +9,6 @@
;; Initialize the package system and use-package
(setq load-prefer-newer t)
(require 'package)
(add-to-list 'package-archives
'("gnu" . "http://elpa.gnu.org/packages/"))
(add-to-list 'package-archives
'("melpa-stable" . "https://stable.melpa.org/packages/") t)
(add-to-list 'package-archives
'("melpa" . "https://melpa.org/packages/") t)
(add-to-list 'package-archives
'("marmalade" . "http://marmalade-repo.org/packages/") t)
(add-to-list 'package-archives
'("org" . "http://orgmode.org/elpa/") t)
(package-initialize)
;; I started moving my configuration to this Org file. Its easier to document this way.
(org-babel-load-file (expand-file-name "configuration.org" user-emacs-directory))