diff options
-rw-r--r-- | config.org | 41 |
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 | ||
42 | This 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. | 42 | Since 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 | ||
44 | when 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 |