emacs-config/init.el

56 lines
1.9 KiB
EmacsLisp
Raw Normal View History

;;;; init the straight package manager
;; disable automatic package updates
(setq straight-check-for-modifications nil)
;; watch for repo modifications if we have python3 and watchexec
;; otherwise just use a save hook
;; (setq straight-check-for-modifications
;; (if (and (executable-find "python3")
;; (executable-find "watchexec"))
;; '(watch-files find-when-checking)
;; '(check-on-save find-when-checking)))
;; add pinned packages to straight
;; (setq straight-profiles
;; '((nil . "default.el")
;; ;; Packages which are pinned to a specific commit.
;; (pinned . "pinned.el")))
;; bootstrap straight
2019-04-11 13:40:33 -04:00
(defvar bootstrap-version)
(let ((bootstrap-file
(expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory))
(bootstrap-version 5))
(unless (file-exists-p bootstrap-file)
(with-current-buffer
(url-retrieve-synchronously
"https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el"
'silent 'inhibit-cookies)
(goto-char (point-max))
(eval-print-last-sexp)))
(load bootstrap-file nil 'nomessage))
;; load experimental straight functions for pinning
;; (autoload #'straight-x-pull-all "straight-x")
;; (autoload #'straight-x-freeze-versions "straight-x")
2019-05-01 16:51:34 -04:00
;; install use-package itself
2019-04-11 13:40:33 -04:00
(straight-use-package 'use-package)
2019-05-01 16:51:34 -04:00
;; configure all config paths before anything else is loaded
(use-package no-littering :straight t)
(defvar nd/conf-dir "~/.emacs.d/"
2018-12-11 20:05:56 -05:00
"The absolute path to the EMACS configuration directory.")
2019-05-01 16:51:34 -04:00
(defvar nd/conf-main (no-littering-expand-etc-file-name "conf.org")
2018-12-11 20:05:56 -05:00
"The absolute path the main EMACS configuration file.")
2019-05-24 20:52:58 -04:00
;; ensure we use built-in org mode
;; (use-package org :straight org-plus-contrib)
(straight-use-package '(org :type built-in))
2019-04-24 17:24:14 -04:00
2019-05-01 16:51:34 -04:00
;; load everything else
2018-12-11 20:05:56 -05:00
(org-babel-load-file nd/conf-main)