From c17755b4d05b1bf23e35516fb82e2b2b94133f40 Mon Sep 17 00:00:00 2001 From: Joseph Ferano Date: Thu, 18 Aug 2022 14:01:38 +0700 Subject: [PATCH] Declaring bankruptcy --- .emacs.bankruptcy/init.org | 46 ++++++++++++++++++++++++++++++++++++++ .gitignore | 2 ++ 2 files changed, 48 insertions(+) create mode 100644 .emacs.bankruptcy/init.org diff --git a/.emacs.bankruptcy/init.org b/.emacs.bankruptcy/init.org new file mode 100644 index 0000000..4fbcceb --- /dev/null +++ b/.emacs.bankruptcy/init.org @@ -0,0 +1,46 @@ +#+TITLE: Emacs Config +#+AUTHOR: Joseph Ferano +#+PROPERTY: header-args:emacs-lisp :tangle ./init.el +#+TOC: true + +* Package Management + +First, disable package.el during early init + +#+BEGIN_SRC emacs-lisp :tangle ./early-init.el +(setq package-enable-at-startup nil) +#+END_SRC + +** El Paca +[[https://github.com/progfolio/elpaca][Elpaca: An Elisp Package Manager]] + +Apparently the developer of straight.el is working on this, which is a cleaner implementation of the package. + +#+BEGIN_SRC emacs-lisp +(declare-function elpaca-generate-autoloads "elpaca") +(defvar elpaca-directory (expand-file-name "elpaca/" user-emacs-directory)) +(when-let ((elpaca-repo (expand-file-name "repos/elpaca/" elpaca-directory)) + (elpaca-build (expand-file-name "builds/elpaca/" elpaca-directory)) + (elpaca-target (if (file-exists-p elpaca-build) elpaca-build elpaca-repo)) + (elpaca-url "https://www.github.com/progfolio/elpaca.git") + ((add-to-list 'load-path elpaca-target)) + ((not (file-exists-p elpaca-repo))) + (buffer (get-buffer-create "*elpaca-bootstrap*"))) +(condition-case-unless-debug err + (progn + (unless (zerop (call-process "git" nil buffer t "clone" elpaca-url elpaca-repo)) + (error "%s" (list (with-current-buffer buffer (buffer-string))))) + (byte-recompile-directory elpaca-repo 0 'force) + (require 'elpaca) + (elpaca-generate-autoloads "elpaca" elpaca-repo) + (kill-buffer buffer)) + ((error) + (delete-directory elpaca-directory 'recursive) + (with-current-buffer buffer + (goto-char (point-max)) + (insert (format "\n%S" err)) + (display-buffer buffer))))) +(require 'elpaca-autoloads) +(add-hook 'after-init-hook #'elpaca-process-queues) +(elpaca (elpaca :host github :repo "progfolio/elpaca")) +#+END_SRC diff --git a/.gitignore b/.gitignore index 7803ba9..8e18834 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,8 @@ .emacs.*/elpa .emacs.*/undo .emacs.*/url +.emacs.bankruptcy/elpaca/ .emacs.vanilla/* !.emacs.vanilla/init.el /.emacs.d/auto-save-list/ +/.emacs.bankruptcy/*.el