Move package mgmt config into config.org
This commit is contained in:
parent
9115a59780
commit
7d6dbd5cbb
32
config.org
32
config.org
@ -2,12 +2,36 @@
|
||||
#+AUTHOR: Camden Dixie O'Brien
|
||||
#+ATTR_LATEX: :float t
|
||||
|
||||
Shout out to Harry R. Schwartz; A whole bunch of this config
|
||||
(including the idea of embeddeding the lot in an Org document) is
|
||||
yanked from [[https://github.com/hrs/dotfiles][his dotfiles repo]].
|
||||
* Package Management
|
||||
** MELPA
|
||||
Let's be real here, all the good stuff's on MELPA.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(require 'package)
|
||||
(add-to-list 'package-archives
|
||||
'("melpa" . "https://melpa.org/packages/"))
|
||||
#+end_src
|
||||
|
||||
We then need to run [[help:package-initialize][package-initialize]] to load and activate
|
||||
packages. The documentation advises doing this early in
|
||||
configuration.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(package-initialize)
|
||||
#+end_src
|
||||
|
||||
** =use-package=
|
||||
The rest of this config grabs packages via =use-package=, so that
|
||||
needs to be set up to install them if they aren't already.
|
||||
needs to be installed:
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(when (not (package-installed-p 'use-package))
|
||||
(package-refresh-contents)
|
||||
(package-install 'use-package))
|
||||
#+end_src
|
||||
|
||||
The wanted behaviour for =use-package= here is to ensure all used
|
||||
packages are present.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(require 'use-package-ensure)
|
||||
|
10
init.el
10
init.el
@ -1,11 +1 @@
|
||||
(require 'package)
|
||||
(add-to-list 'package-archives '("gnu" . "https://elpa.gnu.org/packages/") t)
|
||||
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
|
||||
(add-to-list 'package-archives '("org" . "http://orgmode.org/elpa/") t)
|
||||
(package-initialize)
|
||||
|
||||
(when (not (package-installed-p 'use-package))
|
||||
(package-refresh-contents)
|
||||
(package-install 'use-package))
|
||||
|
||||
(org-babel-load-file "~/.emacs.d/config.org")
|
||||
|
Loading…
x
Reference in New Issue
Block a user