diff --git a/init.el b/init.el index dc5c55b..ad6115b 100644 --- a/init.el +++ b/init.el @@ -1,3 +1,15 @@ +;;; init.el --- The Emacs init file +;; +;;; Commentary: +;; This is the main configuration file for Emacs. +;; In this file: +;; - Set the bootstratp for straight.el +;; - Load use-package +;; - Load no-littering +;; - Set user-init-directory to ~/.cache/emacs +;; - Install the latest release of org +;; - Load the file ~/.emacs.d/myconfig.org +;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; set up straight package manager (defvar bootstrap-version) @@ -24,11 +36,11 @@ "load the elisp file only if it exists and is readable" (if (file-readable-p f) (load-file f))) - -;; (defun load-orgfile-if-exists (f) -;; "load the elisp file only if it exists and is readable" -;; (if (file-readable-p f) -;; (org-babel-load-file (f)))) +;; Helper function for loading org-mode files +(defun load-orgfile-if-exists (f) + "load the elisp file only if it exists and is readable" + (if (file-readable-p f) + (org-babel-load-file f))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Keep emacs clean! @@ -37,6 +49,9 @@ url-history-file (expand-file-name "url/history" user-emacs-directory)) ;; Use no-littering to automatically set common paths to the new user-emacs-directory (use-package no-littering) + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; This is a patch for using emacs with fake home directories (setq custom-file (expand-file-name "custom.el" user-emacs-directory)) (load-elisp-if-exists custom-file) ;; custom-file not loaded with fancy home variables @@ -54,3 +69,7 @@ (file-attribute-modification-time (file-attributes config-el)))) (load-file config-el) (org-babel-load-file config-org))) + +(provide 'init) +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; init.el ends here