Browse Source

Use latest org version

master
Josh Wolfe 3 years ago
parent
commit
b273311e3d
2 changed files with 28 additions and 34 deletions
  1. 4
    33
      emacs/.emacs.d/README.org
  2. 24
    1
      emacs/.emacs.d/init.el

+ 4
- 33
emacs/.emacs.d/README.org View File

@@ -1,36 +1,3 @@
* Garbage Collection

Temporarily set garbage collect threshold high to improve start time

#+BEGIN_SRC emacs-lisp :tangle yes
(setq gc-cons-threshold most-positive-fixnum)
(add-hook 'after-init-hook (lambda () (setq gc-cons-threshold 800000)))
#+END_SRC

* Package Control

Setup package control

#+BEGIN_SRC emacs-lisp :tangle yes
(setq package--init-file-ensured t) ; So (package-initialize) doesn't show up
(require 'package)
(setq package-archives '(("gnu" . "http://elpa.gnu.org/packages/")
("marmalade" . "https://marmalade-repo.org/packages/")
("melpa" . "http://melpa.org/packages/")))
(setq package-enable-at-startup nil)
(package-initialize)
#+END_SRC

Have use-package auto download

#+BEGIN_SRC emacs-lisp :tangle yes
(unless (package-installed-p 'use-package)
(package-refresh-contents)
(package-install 'use-package))
(require 'use-package)
(setq use-package-always-ensure t)
#+END_SRC

* Startup

Runs a different function on startup depending on display mode.
@@ -427,6 +394,10 @@ Is used in one of my [[Hydra][hydras]] =wolfe/hydra-org-expand=. For inserting o
* Org Mode

#+BEGIN_SRC emacs-lisp :tangle yes
(use-package org
:pin org
:ensure org-plus-contrib)

(require 'ox-latex)
(add-to-list 'org-latex-packages-alist '("" "minted"))
(setq org-latex-listings 'minted)

+ 24
- 1
emacs/.emacs.d/init.el View File

@@ -4,4 +4,27 @@
;; \ V V / (_) | | _| __/ \__ \ | | | | | | |_ | __/ |
;; \_/\_/ \___/|_|_| \___| |___/ |_|_| |_|_|\__(_)___|_|

(org-babel-load-file "~/.emacs.d/README.org")
;; Set garbage collect high to speed up startup
(let ((gc-cons-threshold most-positive-fixnum))
;; Setup package sources
(require 'package)
(setq package-archives '(("gnu" . "http://elpa.gnu.org/packages/")
("marmalade" . "https://marmalade-repo.org/packages/")
("melpa" . "http://melpa.org/packages/")
("org" . "http://orgmode.org/elpa/")))
(setq package-enable-at-startup nil)
(package-initialize)

;; Bootstrap use-package
(unless (package-installed-p 'use-package)
(package-refresh-contents)
(package-install 'use-package))
(require 'use-package)
(setq use-package-always-ensure t)

;; Use latest org before calling babel
(use-package org
:pin org
:ensure org-plus-contrib)

(org-babel-load-file "~/.emacs.d/README.org"))

Loading…
Cancel
Save