summaryrefslogtreecommitdiff
path: root/init.el
diff options
context:
space:
mode:
authorBlendoit <blendoit@gmail.com>2020-08-24 23:57:02 -0700
committerBlendoit <blendoit@gmail.com>2020-08-24 23:57:02 -0700
commitf0c5b56742223ae4754469c516c2924ec7f3aa3d (patch)
treefbe0b770755ec4146f86e52ec5cafb2673a30045 /init.el
parentd284d5b67ca6980f227dfe5f2f06476d7b3f76fc (diff)
Portable Emacs WIP :-)
Diffstat (limited to 'init.el')
-rw-r--r--init.el36
1 files changed, 30 insertions, 6 deletions
diff --git a/init.el b/init.el
index 209bf9a..950628b 100644
--- a/init.el
+++ b/init.el
@@ -1,14 +1,38 @@
-;;; init.el --- First file ran by GNU Emacs.
+;;; init.el --- bootstrap main Emacs config from USB drive.
;;; Commentary:
-
-;; Load literate configuration file I created for GNU Emacs.
-;; The ultimate goal is to transition most of the custom settings
-;; to explicitly defined customisations.
+;; This package enables bootstrapping a full `.emacs.d/' configuration
+;; residing on a removable drive. It is copied over from
+;; init-bootstrap.el to init.el, at a location the OS expects to find
+;; that file. Then, every time Emacs is started, it will scan the top
+;; level of all typical mount points in an effort to detect an
+;; existing `.emacs.d/'.
;;; Code:
+(setq user-emacs-directory "/run/media/blendux/1924-4A2F/dotemacs/")
+(setq my/literate-config (concat user-emacs-directory "blendoit/blendoit-init.org"))
+(setq my/literate-config-compiled (concat user-emacs-directory "blendoit/blendoit-init.elc"))
+
+(defun my/load-config-linux ()
+ "Bootstrap a full `.emacs.d/' configuration for GNU/Linux."
+ (load-file my/literate-config-compiled)
+ (message "It worked. Take a break."))
+
+(defun my/load-config-windows ()
+ "Bootstrap a full `.emacs.d/' configuration for MS Windows."
+(let* 'alphabet (mapcar 'string "ABCDEFFGHIJKLMNOPQRSTUVWXYZ")
+ 'drives (mapcar '(lambda (drive)
+ "Construct list of drives."
+ (concat drive ":")) alphabet))
+
+
+ (setq user-emacs-directory config-location)
+)
-(org-babel-load-file "~/.emacs.d/blendoit/blendoit-init.org")
+;; Perform the configuration bootstrap, per the running OS.
+(cond ((string-equal system-type "gnu/linux") (my/load-config-linux))
+ ((string-equal system-type "windows-nt") (my/load-config-window))
+ (t (message "You're running neither GNU/Linux nor MS Windows.")))
(provide 'init)
Copyright 2019--2024 Marius PETER