]> git.donarmstrong.com Git - lib.git/commitdiff
Fix install packages to work with newer emacs (and use straight)
authorDon Armstrong <don@donarmstrong.com>
Sun, 5 Jan 2025 22:21:26 +0000 (14:21 -0800)
committerDon Armstrong <don@donarmstrong.com>
Sun, 5 Jan 2025 22:21:26 +0000 (14:21 -0800)
emacs_el/configuration/Makefile
emacs_el/configuration/install_packages.el

index 5238ae628ec0532e45d7f59fa3917e127b0f60f5..2d7606fa0e98ff7f7ffa5d916c59c57acdc7fd81 100644 (file)
@@ -26,7 +26,7 @@ $(ORG_ELC_FILES): %.elc: %.el install_packages
        $(EMACS) --batch -q --no-site-file $(LIB_PATH) $(USE_PACKAGE) --eval "(byte-compile-file \"$<\")"
 
 $(ORG_EL_FILES): %.el: %.org install_packages
-       $(EMACS) --batch -q --no-site-file --visit $< --funcall org-babel-tangle
+       $(EMACS) --batch -q --no-site-file --script install_packages.el --visit $< --funcall org-babel-tangle
 
 
 clean: 
index 795fa3fa3861ae51d50d185185c1557c003ae538..009ba0f1e9b4c9c3c2f8c6a3f1098cdfeaaf6e42 100644 (file)
 (setq package-archives '(("gnu" . "https://elpa.gnu.org/packages/")
                          ("melpa" . "https://melpa.org/packages/")
                          ("org" . "http://orgmode.org/elpa/") ))
-(package-initialize)
-(unless (package-installed-p 'use-package)
-  (package-refresh-contents)
-  (package-install 'use-package))
-(unless (package-installed-p 'org)
-  (package-refresh-contents)
-  (package-install 'org))
+
+(defvar bootstrap-version)
+(setq straight-base-dir '"~/var/emacs/")
+(let ((bootstrap-file
+       (expand-file-name "straight/repos/straight.el/bootstrap.el" straight-base-dir))
+      (bootstrap-version 6))
+  (unless (file-exists-p bootstrap-file)
+    (with-current-buffer
+        (url-retrieve-synchronously
+         "https://raw.githubusercontent.com/radian-software/straight.el/develop/install.el"
+         'silent 'inhibit-cookies)
+      (goto-char (point-max))
+      (eval-print-last-sexp)))
+  (load bootstrap-file nil 'nomessage))
+
+(straight-use-package 'use-package)
+(setq straight-use-package-by-default t)
+(setq use-package-verbose (not (bound-and-true-p byte-compile-current-file)))
+(use-package org
+  )