From 3753136b970c262b79e789a4059b250b3b4d0b5d Mon Sep 17 00:00:00 2001 From: earnest ma Date: Wed, 2 Mar 2022 09:13:30 -0500 Subject: [PATCH] stream results --- emacs/.config/emacs/core/em-init.el | 24 +++++++++++++++++++++++- emacs/.config/emacs/core/em-packages.el | 21 +++++++++++++++++++++ emacs/.config/emacs/core/em-pkg.el | 8 ++++++++ emacs/.config/emacs/core/em-utils.el | 2 ++ emacs/.config/emacs/early-init.el | 22 +--------------------- emacs/.config/emacs/init.el | 4 ---- 6 files changed, 55 insertions(+), 26 deletions(-) create mode 100644 emacs/.config/emacs/core/em-packages.el create mode 100644 emacs/.config/emacs/core/em-pkg.el create mode 100644 emacs/.config/emacs/core/em-utils.el diff --git a/emacs/.config/emacs/core/em-init.el b/emacs/.config/emacs/core/em-init.el index 6be25f7..165e107 100644 --- a/emacs/.config/emacs/core/em-init.el +++ b/emacs/.config/emacs/core/em-init.el @@ -1,4 +1,3 @@ - (defvar em-core-dir (file-name-directory load-file-name) "Core files") @@ -7,5 +6,28 @@ (add-to-list 'load-path em-core-dir) +(defconst em-modules-dir (concat em-dir "/" "modules/")) + +(defun siren-recursive-add-to-load-path (dir) + "Add DIR and all its sub-directories to `load-path'." + (add-to-list 'load-path dir) + (dolist (f (directory-files dir)) + (let ((name (expand-file-name f dir))) + (when (and (file-directory-p name) + (not (string-prefix-p "." f))) + (siren-recursive-add-to-load-path name))))) + +(siren-recursive-add-to-load-path em-modules-dir) + +(require 'em-packages) + +(require 'em-utils) +(require 'em-pkg) + +;; ui +;; themes +;; editing + +;; modules (provide 'em-init) diff --git a/emacs/.config/emacs/core/em-packages.el b/emacs/.config/emacs/core/em-packages.el new file mode 100644 index 0000000..551b4c3 --- /dev/null +++ b/emacs/.config/emacs/core/em-packages.el @@ -0,0 +1,21 @@ +;; straight.el: Package management +(setq straight-vc-git-default-clone-depth 15) + +(defvar bootstrap-version) +(let ((bootstrap-file + (expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory)) + (bootstrap-version 5)) + (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) +(straight-use-package 'use-package) +;; (require 'straight-x) + +(provide 'em-packages) diff --git a/emacs/.config/emacs/core/em-pkg.el b/emacs/.config/emacs/core/em-pkg.el new file mode 100644 index 0000000..d3e2855 --- /dev/null +++ b/emacs/.config/emacs/core/em-pkg.el @@ -0,0 +1,8 @@ +(use-package no-littering + :demand) + +(use-package exec-path-from-shell + :init + (exec-path-from-shell-initialize)) + +(provide 'em-pkg) diff --git a/emacs/.config/emacs/core/em-utils.el b/emacs/.config/emacs/core/em-utils.el new file mode 100644 index 0000000..3d90ac2 --- /dev/null +++ b/emacs/.config/emacs/core/em-utils.el @@ -0,0 +1,2 @@ + +(provide 'em-utils) diff --git a/emacs/.config/emacs/early-init.el b/emacs/.config/emacs/early-init.el index 4aa619f..cd075ed 100644 --- a/emacs/.config/emacs/early-init.el +++ b/emacs/.config/emacs/early-init.el @@ -1,24 +1,4 @@ -;; straight.el: Package management -(setq package-enable-at-startup nil) - -(setq straight-vc-git-default-clone-depth 15) - -(defvar bootstrap-version) -(let ((bootstrap-file - (expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory)) - (bootstrap-version 5)) - (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) -(straight-use-package 'use-package) -;; (require 'straight-x) +(setq package-enable-at-startup nil) ;; straight.el instead of package.el ;; Garbage collection (setq gc-cons-threshold most-positive-fixnum diff --git a/emacs/.config/emacs/init.el b/emacs/.config/emacs/init.el index 85c1013..2c6a66e 100644 --- a/emacs/.config/emacs/init.el +++ b/emacs/.config/emacs/init.el @@ -1,12 +1,8 @@ -;; TODO Move most of this into core/ (setq user-full-name "earnest ma" user-mail-address "me@earne.link" calendar-latitude 43.7682 ; Toronto calendar-longitude -79.4126) -(use-package no-littering - :demand) - ;; Always load newest byte code (setq load-prefer-newer t) (load (concat user-emacs-directory "core/em-init") nil 'nomessage)