Move package mgmt config into config.org
This commit is contained in:
parent
9115a59780
commit
7d6dbd5cbb
38
config.org
38
config.org
@ -2,17 +2,41 @@
|
|||||||
#+AUTHOR: Camden Dixie O'Brien
|
#+AUTHOR: Camden Dixie O'Brien
|
||||||
#+ATTR_LATEX: :float t
|
#+ATTR_LATEX: :float t
|
||||||
|
|
||||||
Shout out to Harry R. Schwartz; A whole bunch of this config
|
* Package Management
|
||||||
(including the idea of embeddeding the lot in an Org document) is
|
** MELPA
|
||||||
yanked from [[https://github.com/hrs/dotfiles][his dotfiles repo]].
|
Let's be real here, all the good stuff's on MELPA.
|
||||||
|
|
||||||
The rest of this config grabs packages via =use-package=, so that
|
#+begin_src emacs-lisp
|
||||||
needs to be set up to install them if they aren't already.
|
(require 'package)
|
||||||
|
(add-to-list 'package-archives
|
||||||
|
'("melpa" . "https://melpa.org/packages/"))
|
||||||
|
#+end_src
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
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 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)
|
(require 'use-package-ensure)
|
||||||
(setq use-package-always-ensure t)
|
(setq use-package-always-ensure t)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
* UI
|
* UI
|
||||||
The start-up message gets pretty annoying, so disable that.
|
The start-up message gets pretty annoying, so disable that.
|
||||||
|
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")
|
(org-babel-load-file "~/.emacs.d/config.org")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user