Skip to content

Instantly share code, notes, and snippets.

@holocronweaver
Created September 1, 2018 20:14
Show Gist options
  • Save holocronweaver/c72c80c8a1c6e113df05e4546dbe155d to your computer and use it in GitHub Desktop.
Save holocronweaver/c72c80c8a1c6e113df05e4546dbe155d to your computer and use it in GitHub Desktop.
Using straight.el with Prelude: place in your .emacs.d/personal/preload folder
;;; straight --- Use straight.el to manage packages with version control.
;;; Commentary:
;; straight.el allows git to track package versions, ensuring Emacs
;; stability and reversible package upgrades.
;;; Author: holocronweaver
;;; Created: 2018
;;; Code:
(let ((bootstrap-file (concat user-emacs-directory "straight/repos/straight.el/bootstrap.el"))
(bootstrap-version 3))
(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))
(setq straight-use-package-by-default t)
(when (not (eq system-type 'windows-nt))
;; MinGW / Msys does not have ssh-askpass, which
;; makes git clone with ssh fail.
(setq straight-vc-git-default-protocol 'ssh))
(straight-register-package
'(seq :repo "https://git.savannah.gnu.org/git/emacs/elpa.git" :files ("packages/seq/*.el")))
;; Obtain use-package, which is used to manage Emacs packages.
(straight-use-package 'use-package)
(add-to-list 'load-path "~/.emacs.d/straight/repos/use-package/")
(require 'use-package)
(message "Done with straight.el")
;;; straight.el ends here
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment