summary refs log tree commit diff stats
path: root/config.org
diff options
context:
space:
mode:
authorCase Duckworth2020-12-16 19:09:44 -0600
committerCase Duckworth2020-12-16 19:09:44 -0600
commit1a71939910abc20d0e72427e6a0cfe2262564c0c (patch)
treeddb85c0fb05eed220436bee7a009a5edd8c949dd /config.org
parentUpdate README (diff)
downloademacs-1a71939910abc20d0e72427e6a0cfe2262564c0c.tar.gz
emacs-1a71939910abc20d0e72427e6a0cfe2262564c0c.zip
Bootstrap straight.el on Windows by, just, git cloning it
Diffstat (limited to 'config.org')
-rw-r--r--config.org41
1 files changed, 28 insertions, 13 deletions
diff --git a/config.org b/config.org index a01c872..70c49e4 100644 --- a/config.org +++ b/config.org
@@ -39,21 +39,36 @@ Let’s configure Emacs using Org mode, they said. It’ll be fun, they said.
39 39
40*** Straight.el 40*** Straight.el
41 41
42This still doesn’t work under Windows – I have to manually download the [[https://github.com/raxod502/straight.el/archive/master.zip][repo archive]] and unzip it. Not the biggest burden, I suppose. 42Since for whatever reason, Straight can't bootstrap itself on Windows
43-- I've wrapped it in a function here and added the direct git command
44when it errors.
43 45
44 #+begin_src emacs-lisp 46 #+begin_src emacs-lisp
45 (defvar bootstrap-version) 47 (defun acdw/bootstrap-straight ()
46 (let ((bootstrap-file 48 (defvar bootstrap-version)
47 (expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory)) 49 (let ((bootstrap-file
48 (bootstrap-version 5)) 50 (expand-file-name
49 (unless (file-exists-p bootstrap-file) 51 "straight/repos/straight.el/bootstrap.el"
50 (with-current-buffer 52 user-emacs-directory))
51 (url-retrieve-synchronously 53 (bootstrap-version 5))
52 "https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el" 54 (unless (file-exists-p bootstrap-file)
53 'silent 'inhibit-cookies) 55 (with-current-buffer
54 (goto-char (point-max)) 56 (url-retrieve-synchronously
55 (eval-print-last-sexp))) 57 (concat "https://raw.githubusercontent.com/"
56 (load bootstrap-file nil 'nomessage)) 58 "raxod502/straight.el/develop/install.el")
59 'silent 'inhibit-cookies)
60 (goto-char (point-max))
61 (eval-print-last-sexp)))
62 (load bootstrap-file nil 'nomessage)))
63
64 (unless (ignore-errors (acdw/bootstrap-straight))
65 (message "Straight.el didn't bootstrap correctly. Cloning directly...")
66 (call-process "git" nil (get-buffer-create "*bootstrap-straight-messages*") nil
67 "clone"
68 "https://github.com/raxod502/straight.el"
69 (expand-file-name "straight/repos/straight.el"
70 user-emacs-directory))
71 (acdw/bootstrap-straight))
57 #+end_src 72 #+end_src
58 73
59*** Use-package 74*** Use-package