(BREAKING) Don't host-namespace local files

Local cache and data files were stored in a parent folder named after
your host, because I'd symlink the same config across computers via
dropbox. This would cause byte-compile issues in packages, so I stopped
doing this.

Now that each computer gets its own clone, host-namespaced local
directories are unnecessary. There's no other benefit to having them.
This commit is contained in:
Henrik Lissner 2017-12-22 14:48:07 -05:00
parent a5596c8923
commit 6343e8ad85
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
2 changed files with 13 additions and 22 deletions

View file

@ -140,7 +140,7 @@ startup."
(setq load-path doom--base-load-path (setq load-path doom--base-load-path
package-activated-list nil) package-activated-list nil)
;; Ensure core folders exist ;; Ensure core folders exist
(dolist (dir (list doom-local-dir doom-etc-dir doom-cache-dir package-user-dir)) (dolist (dir (list doom-local-dir doom-etc-dir doom-cache-dir doom-packages-dir))
(unless (file-directory-p dir) (unless (file-directory-p dir)
(make-directory dir t))) (make-directory dir t)))
(condition-case _ (package-initialize t) (condition-case _ (package-initialize t)

View file

@ -25,7 +25,7 @@
"If non-nil, all doom functions will be verbose. Set DEBUG=1 in the command "If non-nil, all doom functions will be verbose. Set DEBUG=1 in the command
line or use --debug-init to enable this.") line or use --debug-init to enable this.")
(defvar doom-emacs-dir (expand-file-name user-emacs-directory) (defvar doom-emacs-dir (file-truename user-emacs-directory)
"The path to this emacs.d directory.") "The path to this emacs.d directory.")
(defvar doom-core-dir (concat doom-emacs-dir "core/") (defvar doom-core-dir (concat doom-emacs-dir "core/")
@ -34,38 +34,29 @@ line or use --debug-init to enable this.")
(defvar doom-modules-dir (concat doom-emacs-dir "modules/") (defvar doom-modules-dir (concat doom-emacs-dir "modules/")
"Where configuration modules are stored.") "Where configuration modules are stored.")
;; Multi-host directories: I namespace `doom-etc-dir' and `doom-cache-dir' with
;; host names because I use the same (often symlinked) emacs.d across several
;; computers -- often simultaneously. Cache or other temporary files would
;; conflict otherwise.
(defvar doom-local-dir (concat doom-emacs-dir ".local/") (defvar doom-local-dir (concat doom-emacs-dir ".local/")
"Root directory for local Emacs files. Use this as permanent storage for files "Root directory for local Emacs files. Use this as permanent storage for files
that are safe to share across systems (if this config is symlinked across that are safe to share across systems (if this config is symlinked across
several computers).") several computers).")
(defvar doom-host-dir (concat doom-local-dir "@" (system-name)) (defvar doom-etc-dir (concat doom-local-dir "etc/")
"Directory for hostname-specific file storage. Used by `doom-etc-dir' and "Directory for non-volatile storage. For volatile story, see `doom-cache-dir'.
`doom-cache-dir'.")
(defvar doom-etc-dir (concat doom-host-dir "/etc/") Use this for dependencies like servers or config files that are stable (i.e. it
"Host-namespaced directory for non-volatile storage. These are not deleted or should be unlikely that you need to delete them if something goes wrong).")
tampored with by DOOM functions. Use this for dependencies like servers or
config files that are stable (i.e. it should be unlikely that you need to delete
them if something goes wrong).")
(defvar doom-cache-dir (concat doom-host-dir "/cache/") (defvar doom-cache-dir (concat doom-local-dir "cache/")
"Host-namespaced directory for volatile storage. Deleted when `doom/reset' is "Directory for volatile storage.
called. Use this for transient files that are generated on the fly like caches
and temporary files. Anything that may need to be cleared if there are Deleted when `doom/reset' is called. Use this for transient files; on-the-fly
problems.") like caches and temporary files. Anything that you don't mind deleting if there
are problems.")
(defvar doom-packages-dir (concat doom-local-dir "packages/") (defvar doom-packages-dir (concat doom-local-dir "packages/")
"Where package.el and quelpa plugins (and their caches) are stored.") "Where package.el and quelpa plugins (and their caches) are stored.")
(defvar doom-autoload-file (concat doom-local-dir "autoloads.el") (defvar doom-autoload-file (concat doom-local-dir "autoloads.el")
"Location of the autoloads file generated by `doom/reload-autoloads'.") "Where `doom//reload-autoloads' will generate its autoloads file.")
(defgroup doom nil (defgroup doom nil
"DOOM Emacs, an Emacs configuration for a stubborn, shell-dwelling and "DOOM Emacs, an Emacs configuration for a stubborn, shell-dwelling and