diff --git a/.doomrc b/.doomrc index ff7b5bb8a..ae1abdc9f 100644 --- a/.doomrc +++ b/.doomrc @@ -42,7 +42,7 @@ (format "%s" (substring scope 1)) (format "*/%s" scope))) (list (doom-dir (dir!) "../modules/") - (doom-dir doom-private-dir "modules/")))) + (doom-dir doom-user-dir "modules/")))) (defun ci-check-docs-scope (scope _) "Allow any filename in docs/* as a scope for docs commits." diff --git a/bin/doom b/bin/doom index f78ac50fc..d6c4988a5 100755 --- a/bin/doom +++ b/bin/doom @@ -111,7 +111,7 @@ ;; Load $DOOMDIR/init.el, to read the user's `doom!' block, and so users can ;; customize things early, if they like. -(load! doom-module-init-file doom-private-dir t) +(load! doom-module-init-file doom-user-dir t) ;; @@ -299,7 +299,7 @@ SEE ALSO: (load! cli-file path t))))) (doom-log "Loading $DOOMDIR/cli.el") - (load! cli-file doom-private-dir t)) + (load! cli-file doom-user-dir t)) ;; Allow per-project Doom settings in .doom files. (let (doomrc) diff --git a/lisp/cli/autoloads.el b/lisp/cli/autoloads.el index b2df97995..f170a7171 100644 --- a/lisp/cli/autoloads.el +++ b/lisp/cli/autoloads.el @@ -63,7 +63,7 @@ hoist buggy forms into autoloads.") (append (doom-glob doom-core-dir "lib/*.el") (cl-loop for dir in (append (cdr (doom-module-load-path 'all-p)) - (list doom-private-dir)) + (list doom-user-dir)) if (doom-glob dir "autoload.el") collect (car it) if (doom-glob dir "autoload/*.el") append it) (mapcan #'doom-glob doom-autoloads-files)) @@ -204,7 +204,7 @@ hoist buggy forms into autoloads.") (generated-autoload-load-name (file-name-sans-extension file)) (target-buffer (current-buffer)) (module (doom-module-from-path file)) - (module-enabled-p (and (or (memq (car module) '(:core :private)) + (module-enabled-p (and (or (memq (car module) '(:core :user)) (doom-module-p (car module) (cdr module))) (doom-file-cookie-p file "if" t)))) (save-excursion @@ -241,7 +241,7 @@ non-nil, treat FILES as pre-generated autoload files instead." (replace-match (prin1-to-string file) t t))))) (let ((load-file-name file) (load-path - (append (list doom-private-dir) + (append (list doom-user-dir) doom-modules-dirs load-path))) (condition-case _ diff --git a/lisp/cli/compile.el b/lisp/cli/compile.el index 7f79e162c..a205bc6c4 100644 --- a/lisp/cli/compile.el +++ b/lisp/cli/compile.el @@ -17,17 +17,17 @@ "Byte-compiles your config or selected modules. compile [TARGETS...] - compile :core :private lang/python + compile :core :user lang/python compile feature lang -Accepts :core and :private as special arguments, which target Doom's core files +Accepts :core and :user as special arguments, which target Doom's core files and your private config files, respectively. To recompile your packages, use 'doom build' instead." (doom-cli-compile (if (or core-p private-p) (append (if core-p (doom-glob doom-emacs-dir "init.el")) (if core-p (list doom-core-dir)) - (if private-p (list doom-private-dir))) + (if private-p (list doom-user-dir))) (or (y-or-n-p (concat "WARNING: Changes made to your config after compiling it won't take effect until\n" "this command is rerun or you run 'doom clean'! It will also make error backtraces\n" @@ -40,7 +40,7 @@ and your private config files, respectively. To recompile your packages, use (seq-filter ;; Only compile Doom's modules (doom-rpartial #'file-in-directory-p doom-emacs-dir) - ;; Omit `doom-private-dir', which is always first + ;; Omit `doom-user-dir', which is always first (cdr (doom-module-load-path))))) recompile-p verbose-p)) @@ -200,7 +200,7 @@ module. This does not include your byte-compiled, third party packages.'" with esc = (if init-file-debug "" "\033[1A") for path in (append (doom-glob doom-emacs-dir "*.elc") - (doom-files-in doom-private-dir :match "\\.elc$" :depth 1) + (doom-files-in doom-user-dir :match "\\.elc$" :depth 1) (doom-files-in doom-core-dir :match "\\.elc$") (doom-files-in doom-modules-dirs :match "\\.elc$" :depth 4)) if (file-exists-p path) diff --git a/lisp/cli/doctor.el b/lisp/cli/doctor.el index e27911a9e..9c5a99c12 100644 --- a/lisp/cli/doctor.el +++ b/lisp/cli/doctor.el @@ -199,10 +199,10 @@ in." " (remove \".git\" projectile-project-root-files-bottom-up)))")) ;; There should only be one - (when (and (file-equal-p doom-private-dir "~/.config/doom") + (when (and (file-equal-p doom-user-dir "~/.config/doom") (file-directory-p "~/.doom.d")) (print! (warn "Both %S and '~/.doom.d' exist on your system") - (path doom-private-dir)) + (path doom-user-dir)) (explain! "Doom will only load one of these (~/.config/doom takes precedence). Possessing\n" "both is rarely intentional; you should one or the other.")) @@ -234,9 +234,9 @@ in." "case feel free to ignore this warning."))))))))) (print! (start "Checking for stale elc files in your DOOMDIR...")) - (when (file-directory-p doom-private-dir) + (when (file-directory-p doom-user-dir) (print-group! - (elc-check-dir doom-private-dir))) + (elc-check-dir doom-user-dir))) (when doom-modules (print! (start "Checking your enabled modules...")) diff --git a/lisp/cli/install.el b/lisp/cli/install.el index 0c9ed3e6a..a58a9c036 100644 --- a/lisp/cli/install.el +++ b/lisp/cli/install.el @@ -44,30 +44,30 @@ Change `$DOOMDIR' with the `--doomdir' option, e.g. (print! (green "Installing Doom Emacs!\n")) (let ((default-directory doom-emacs-dir) (yes? (doom-cli-context-suppress-prompts-p context))) - ;; Create `doom-private-dir' + ;; Create `doom-user-dir' (if (eq config? :no) (print! (warn "Not copying private config template, as requested")) ;; Create DOOMDIR in ~/.config/doom if ~/.config/emacs exists. - (when (and (not (file-directory-p doom-private-dir)) + (when (and (not (file-directory-p doom-user-dir)) (not (getenv "DOOMDIR"))) (let ((xdg-config-dir (or (getenv "XDG_CONFIG_HOME") "~/.config"))) (when (file-in-directory-p doom-emacs-dir xdg-config-dir) - (setq doom-private-dir (expand-file-name "doom/" xdg-config-dir))))) + (setq doom-user-dir (expand-file-name "doom/" xdg-config-dir))))) - (if (file-directory-p doom-private-dir) - (print! (item "Skipping %s (already exists)") (relpath doom-private-dir)) - (make-directory doom-private-dir 'parents) - (print! (success "Created %s") (relpath doom-private-dir))) + (if (file-directory-p doom-user-dir) + (print! (item "Skipping %s (already exists)") (relpath doom-user-dir)) + (make-directory doom-user-dir 'parents) + (print! (success "Created %s") (relpath doom-user-dir))) ;; Create init.el, config.el & packages.el (print-group! (mapc (lambda (file) (cl-destructuring-bind (filename . template) file - (if (file-exists-p! filename doom-private-dir) + (if (file-exists-p! filename doom-user-dir) (print! (item "Skipping %s (already exists)") (path filename)) - (print! (item "Creating %s%s") (relpath doom-private-dir) filename) - (with-temp-file (doom-path doom-private-dir filename) + (print! (item "Creating %s%s") (relpath doom-user-dir) filename) + (with-temp-file (doom-path doom-user-dir filename) (insert-file-contents template)) (print! (success "Done!"))))) `(("init.el" . ,(doom-path doom-emacs-dir "templates/init.example.el")) diff --git a/lisp/doom-lib.el b/lisp/doom-lib.el index 3a6ba27bc..11c46d34b 100644 --- a/lisp/doom-lib.el +++ b/lisp/doom-lib.el @@ -544,8 +544,8 @@ This is a wrapper around `eval-after-load' that: (cons 'error (file-name-directory path))) ((file-in-directory-p source doom-core-dir) (cons 'doom-error doom-core-dir)) - ((file-in-directory-p source doom-private-dir) - (cons 'doom-private-error doom-private-dir)) + ((file-in-directory-p source doom-user-dir) + (cons 'doom-user-error doom-user-dir)) ((file-in-directory-p source (expand-file-name "cli" doom-core-dir)) (cons 'doom-cli-error (expand-file-name "cli" doom-core-dir))) ((cons 'doom-module-error doom-emacs-dir))))) diff --git a/lisp/doom-modules.el b/lisp/doom-modules.el index 112086078..80fd6839e 100644 --- a/lisp/doom-modules.el +++ b/lisp/doom-modules.el @@ -7,7 +7,7 @@ "A hash table of enabled modules. Set by `doom-initialize-modules'.") (defvar doom-modules-dirs - (list (expand-file-name "modules/" doom-private-dir) + (list (expand-file-name "modules/" doom-user-dir) doom-modules-dir) "A list of module root directories. Order determines priority.") @@ -107,22 +107,21 @@ symbols, and that module's plist." (load! file (plist-get plist :path) t)))) (defun doom-initialize-modules (&optional force-p no-config-p) - "Loads the init.el in `doom-private-dir' and sets up hooks for a healthy -session of Dooming. Will noop if used more than once, unless FORCE-P is -non-nil." + "Loads the init.el in `doom-user-dir' and sets up hooks for a healthy session +of Dooming. Will noop if used more than once, unless FORCE-P is non-nil." (when (or force-p (not doom-init-modules-p)) (setq doom-init-modules-p t) (unless no-config-p (doom-log "Initializing core modules") (doom-initialize-core-modules)) - (when-let (init-p (load! doom-module-init-file doom-private-dir t)) + (when-let (init-p (load! doom-module-init-file doom-user-dir t)) (doom-log "Initializing user config") (maphash (doom-module-loader doom-module-init-file) doom-modules) (doom-run-hooks 'doom-before-init-modules-hook) (unless no-config-p (maphash (doom-module-loader doom-module-config-file) doom-modules) (doom-run-hooks 'doom-init-modules-hook) - (load! "config" doom-private-dir t) + (load! "config" doom-user-dir t) (when custom-file (load custom-file 'noerror (not doom-debug-mode))))))) @@ -231,18 +230,18 @@ If ENABLED-ONLY, return nil if the containing module isn't enabled." ((or (string-match-p (concat "^" (regexp-quote doom-core-dir)) path) (file-in-directory-p path doom-core-dir)) (cons :core (intern (file-name-base path)))) - ((or (string-match-p (concat "^" (regexp-quote doom-private-dir)) path) - (file-in-directory-p path doom-private-dir)) - (cons :private (intern (file-name-base path))))))))) + ((or (string-match-p (concat "^" (regexp-quote doom-user-dir)) path) + (file-in-directory-p path doom-user-dir)) + (cons :user (intern (file-name-base path))))))))) (defun doom-module-load-path (&optional module-dirs) "Return a list of file paths to activated modules. The list is in no particular order and its file paths are absolute. If MODULE-DIRS is non-nil, include all modules (even disabled ones) available in -those directories. The first returned path is always `doom-private-dir'." +those directories. The first returned path is always `doom-user-dir'." (declare (pure t) (side-effect-free t)) - (append (list doom-private-dir) + (append (list doom-user-dir) (if module-dirs (mapcar (lambda (m) (doom-module-locate-path (car m) (cdr m))) (delete-dups diff --git a/lisp/doom-packages.el b/lisp/doom-packages.el index 8702ee5a9..f9b43b04b 100644 --- a/lisp/doom-packages.el +++ b/lisp/doom-packages.el @@ -26,7 +26,7 @@ ;; versions. There's also 'bin/doom sync -u' for updating only your packages. ;; ;; How this works is: the system reads packages.el files located in each -;; activated module, your private directory (`doom-private-dir'), and one in +;; activated module, your private directory (`doom-user-dir'), and one in ;; `doom-core-dir'. These contain `package!' declarations that tell DOOM what ;; plugins to install and where from. ;; @@ -114,10 +114,10 @@ uses a straight or package.el command directly).") (after! comp ;; HACK Disable native-compilation for some troublesome packages (mapc (doom-partial #'add-to-list 'native-comp-deferred-compilation-deny-list) - (let ((local-dir-re (concat "\\`" (regexp-quote doom-local-dir)))) - (list (concat local-dir-re ".*/emacs-jupyter.*\\.el\\'") - (concat local-dir-re ".*/evil-collection-vterm\\.el\\'") - (concat local-dir-re ".*/with-editor\\.el\\'"))))) + (list "/emacs-jupyter.*\\.el\\'" + "/evil-collection-vterm\\.el\\'" + "/vterm\\.el\\'" + "/with-editor\\.el\\'"))) ;; Remove unwanted $EMACSDIR/eln-cache/ directory. (cl-callf2 delete (file-name-concat doom-emacs-dir "eln-cache/") @@ -363,7 +363,7 @@ non-nil." (defun doom-package-in-module-p (package category &optional module) "Return non-nil if PACKAGE was installed by the user's private config." (when-let (modules (doom-package-get package :modules)) - (or (and (not module) (assq :private modules)) + (or (and (not module) (assq :user modules)) (member (cons category module) modules)))) (defun doom-package-backend (package) @@ -422,7 +422,7 @@ ones." (doom--read-packages (doom-path doom-core-dir packages-file) all-p 'noerror) (unless core-only-p - (let ((private-packages (doom-path doom-private-dir packages-file)) + (let ((private-packages (doom-path doom-user-dir packages-file)) (doom-modules (doom-module-list))) (if all-p (mapc #'doom--read-packages @@ -534,8 +534,8 @@ elsewhere." (cl-callf plist-put plist :modules (append module-list (list module) - (when (file-in-directory-p ,(dir!) doom-private-dir) - '((:private . modules))) + (when (file-in-directory-p ,(dir!) doom-user-dir) + '((:user . modules))) nil)))) ;; Merge given plist with pre-existing one (cl-loop for (key value) on (list ,@plist) by 'cddr diff --git a/lisp/doom-ui.el b/lisp/doom-ui.el index edbc3abb5..28b6a6590 100644 --- a/lisp/doom-ui.el +++ b/lisp/doom-ui.el @@ -521,7 +521,7 @@ windows, switch to `doom-fallback-buffer'. Otherwise, delegate to original ;;; Theme & font ;; User themes should live in $DOOMDIR/themes, not ~/.emacs.d -(setq custom-theme-directory (concat doom-private-dir "themes/")) +(setq custom-theme-directory (concat doom-user-dir "themes/")) ;; Third party themes add themselves to `custom-theme-load-path', but the themes ;; living in $DOOMDIR/themes should always have priority. diff --git a/lisp/doom.el b/lisp/doom.el index b4e05f1ff..1a32f31dc 100644 --- a/lisp/doom.el +++ b/lisp/doom.el @@ -102,12 +102,7 @@ (defconst EMACS29+ (> emacs-major-version 28)) ;; DEPRECATED remove in v3 (defconst MODULES (featurep 'dynamic-modules)) - (defconst NATIVECOMP (featurep 'native-compile)) - - (make-obsolete-variable 'EMACS28+ "Use (>= emacs-major-version 28) instead" "3.0.0") - (make-obsolete-variable 'EMACS29+ "Use (>= emacs-major-version 29) instead" "3.0.0") - (make-obsolete-variable 'MODULES "Use (featurep 'dynamic-modules) instead" "3.0.0") - (make-obsolete-variable 'NATIVECOMP "Use (featurep 'native-compile) instead" "3.0.0")) + (defconst NATIVECOMP (featurep 'native-compile))) ;; @@ -152,7 +147,7 @@ (defconst doom-docs-dir (concat doom-emacs-dir "docs/") "Where Doom's documentation files are stored. Must end with a slash.") -(defconst doom-private-dir +(defconst doom-user-dir (if-let (doomdir (getenv-internal "DOOMDIR")) (expand-file-name (file-name-as-directory doomdir)) (or (let ((xdgdir @@ -275,6 +270,17 @@ which is loaded at startup (if it exists). This is helpful if Emacs can't users).") +;; +;;; Legacy support + +(define-obsolete-variable-alias 'doom-private-dir 'doom-user-dir "3.0.0") + +(make-obsolete-variable 'EMACS28+ "Use (>= emacs-major-version 28) instead" "3.0.0") +(make-obsolete-variable 'EMACS29+ "Use (>= emacs-major-version 29) instead" "3.0.0") +(make-obsolete-variable 'MODULES "Use (featurep 'dynamic-modules) instead" "3.0.0") +(make-obsolete-variable 'NATIVECOMP "Use (featurep 'native-compile) instead" "3.0.0") + + ;; ;;; Custom error types @@ -282,7 +288,7 @@ users).") (define-error 'doom-hook-error "Error in a Doom startup hook" 'doom-error) (define-error 'doom-autoload-error "Error in Doom's autoloads file" 'doom-error) (define-error 'doom-module-error "Error in a Doom module" 'doom-error) -(define-error 'doom-private-error "Error in private config" 'doom-error) +(define-error 'doom-user-error "Error in user's config" 'doom-error) (define-error 'doom-package-error "Error with packages" 'doom-error) @@ -340,7 +346,7 @@ users).") ;; Allow the user to store custom.el-saved settings and themes in their Doom ;; config (e.g. ~/.doom.d/). -(setq custom-file (expand-file-name "custom.el" doom-private-dir)) +(setq custom-file (expand-file-name "custom.el" doom-user-dir)) ;; By default, Emacs stores `authinfo' in $HOME and in plain-text. Let's not do ;; that, mkay? This file stores usernames, passwords, and other treasures for diff --git a/lisp/lib/config.el b/lisp/lib/config.el index 92532c0f5..ce35b6977 100644 --- a/lisp/lib/config.el +++ b/lisp/lib/config.el @@ -9,24 +9,24 @@ ;;;###autoload (defun doom/open-private-config () - "Browse your `doom-private-dir'." + "Browse your `doom-user-dir'." (interactive) - (unless (file-directory-p doom-private-dir) - (make-directory doom-private-dir t)) - (doom-project-browse doom-private-dir)) + (unless (file-directory-p doom-user-dir) + (make-directory doom-user-dir t)) + (doom-project-browse doom-user-dir)) ;;;###autoload (defun doom/find-file-in-private-config () - "Search for a file in `doom-private-dir'." + "Search for a file in `doom-user-dir'." (interactive) - (doom-project-find-file doom-private-dir)) + (doom-project-find-file doom-user-dir)) ;;;###autoload (defun doom/goto-private-init-file () "Open your private init.el file. And jumps to your `doom!' block." (interactive) - (find-file (expand-file-name "init.el" doom-private-dir)) + (find-file (expand-file-name "init.el" doom-user-dir)) (goto-char (or (save-excursion (goto-char (point-min)) @@ -37,13 +37,13 @@ And jumps to your `doom!' block." (defun doom/goto-private-config-file () "Open your private config.el file." (interactive) - (find-file (expand-file-name "config.el" doom-private-dir))) + (find-file (expand-file-name "config.el" doom-user-dir))) ;;;###autoload (defun doom/goto-private-packages-file () "Open your private packages.el file." (interactive) - (find-file (expand-file-name "packages.el" doom-private-dir))) + (find-file (expand-file-name "packages.el" doom-user-dir))) ;; diff --git a/lisp/lib/debug.el b/lisp/lib/debug.el index e9d82f675..05ba6a76c 100644 --- a/lisp/lib/debug.el +++ b/lisp/lib/debug.el @@ -239,7 +239,7 @@ ready to be pasted in a bug report on github." (symlink-path doom-emacs-dir)))) (doom . ,(list doom-version (sh "git" "log" "-1" "--format=%D %h %ci") - (symlink-path doom-private-dir))) + (symlink-path doom-user-dir))) (shell . ,(abbrev-path shell-file-name)) (features . ,system-configuration-features) (traits @@ -261,13 +261,13 @@ ready to be pasted in a bug report on github." 'exec-path-from-shell) (if (file-symlink-p doom-emacs-dir) 'symlinked-emacsdir) - (if (file-symlink-p doom-private-dir) + (if (file-symlink-p doom-user-dir) 'symlinked-doomdir) (if (and (stringp custom-file) (file-exists-p custom-file)) 'custom-file) (if (doom-files-in `(,@doom-modules-dirs ,doom-core-dir - ,doom-private-dir) + ,doom-user-dir) :type 'files :match "\\.elc$") 'byte-compiled-config))))) (custom @@ -303,7 +303,7 @@ ready to be pasted in a bug report on github." ,@(condition-case e (mapcar #'cdr (doom--collect-forms-in - (doom-path doom-private-dir "packages.el") + (doom-path doom-user-dir "packages.el") "package!")) (error (format "<%S>" e)))) (unpin @@ -311,7 +311,7 @@ ready to be pasted in a bug report on github." (mapcan #'identity (mapcar #'cdr (doom--collect-forms-in - (doom-path doom-private-dir "packages.el") + (doom-path doom-user-dir "packages.el") "unpin!"))) (error (list (format "<%S>" e))))) (elpa diff --git a/lisp/lib/help.el b/lisp/lib/help.el index 4727a7423..11e7968f4 100644 --- a/lisp/lib/help.el +++ b/lisp/lib/help.el @@ -366,7 +366,7 @@ without needing to check if they are available." (format "%s %s" (nth 1 sexp) (nth 2 sexp))))))) ((when buffer-file-name (when-let (mod (doom-module-from-path buffer-file-name)) - (unless (memq (car mod) '(:core :private)) + (unless (memq (car mod) '(:core :user)) (format "%s %s" (car mod) (cdr mod)))))) ((when-let (mod (cdr (assq major-mode doom--help-major-mode-module-alist))) (format "%s %s" @@ -609,7 +609,7 @@ If prefix arg is present, refresh the cache." (dolist (m modules) (let* ((module-path (pcase (car m) (:core doom-core-dir) - (:private doom-private-dir) + (:user doom-user-dir) (category (doom-module-locate-path category (cdr m))))) diff --git a/lisp/lib/packages.el b/lisp/lib/packages.el index 85574fbd1..bcbff4612 100644 --- a/lisp/lib/packages.el +++ b/lisp/lib/packages.el @@ -154,7 +154,7 @@ each package." (if (listp m) (format "%s %s" (car m) (cdr m)) (format "%s" m))) - (append '(:private :core) + (append '(:user :core) (delete-dups (mapcar #'car modules)) modules))) nil t nil nil)) @@ -165,8 +165,8 @@ each package." (mapc (lambda! ((cat . mod)) (if-let (packages-file (pcase cat - (:private (car (doom-glob doom-private-dir "packages.el"))) - (:core (car (doom-glob doom-core-dir "packages.el"))) + (:user (car (doom-glob doom-user-dir "packages.el"))) + (:core (car (doom-glob doom-core-dir "packages.el"))) (_ (doom-module-locate-path cat mod "packages.el")))) (with-current-buffer (or (get-file-buffer packages-file) @@ -177,7 +177,7 @@ each package." (if module (list (cons category module)) (cl-remove-if-not (lambda (m) (eq (car m) category)) - (append '((:core) (:private)) + (append '((:core) (:user)) (doom-module-list 'all)))))) ;;;###autoload diff --git a/modules/completion/company/config.el b/modules/completion/company/config.el index d816ec99f..46216a79d 100644 --- a/modules/completion/company/config.el +++ b/modules/completion/company/config.el @@ -180,7 +180,7 @@ (use-package! company-dict :defer t :config - (setq company-dict-dir (expand-file-name "dicts" doom-private-dir)) + (setq company-dict-dir (expand-file-name "dicts" doom-user-dir)) (add-hook! 'doom-project-hook (defun +company-enable-project-dicts-h (mode &rest _) "Enable per-project dictionaries." diff --git a/modules/config/literate/autoload.el b/modules/config/literate/autoload.el index 9591b4edd..04c8c15d5 100644 --- a/modules/config/literate/autoload.el +++ b/modules/config/literate/autoload.el @@ -3,7 +3,7 @@ ;;;###autoload (add-hook 'org-mode-hook #'+literate-enable-recompile-h) (defvar +literate-config-file - (concat doom-private-dir "config.org") + (concat doom-user-dir "config.org") "The file path of your literate config file.") (defvar +literate-tangle--async-proc nil) @@ -52,7 +52,7 @@ (or (getenv "__NOTANGLE") (and (+literate-tangle +literate-config-file (concat doom-module-config-file ".el") - doom-private-dir) + doom-user-dir) (or (not noninteractive) (exit! "__NOTANGLE=1 $@"))))) @@ -77,7 +77,7 @@ `(funcall #',(symbol-function #'+literate-tangle) ,+literate-config-file ,(concat doom-module-config-file ".el") - ,doom-private-dir)))) + ,doom-user-dir)))) (add-hook 'kill-emacs-hook #'+literate-tangle-check-finished-h) (set-process-sentinel +literate-tangle--async-proc #'+literate-tangle--async-sentinel) (run-at-time nil nil (lambda () (message "Tangling config.org"))) ; ensure shown after a save message @@ -132,9 +132,9 @@ This is performed with an asyncronous Emacs process, except when ;;;###autoload (defun +literate-recompile-maybe-h () - "Recompile literate config to `doom-private-dir'. + "Recompile literate config to `doom-user-dir'. -We assume any org file in `doom-private-dir' is connected to your literate +We assume any org file in `doom-user-dir' is connected to your literate config, and should trigger a recompile if changed." (and (file-in-directory-p (buffer-file-name (buffer-base-buffer)) diff --git a/modules/editor/file-templates/autoload.el b/modules/editor/file-templates/autoload.el index c96d79beb..d11046bbe 100644 --- a/modules/editor/file-templates/autoload.el +++ b/modules/editor/file-templates/autoload.el @@ -92,8 +92,8 @@ evil is loaded and enabled)." (match-string 1 path)) ((file-in-directory-p path doom-emacs-dir) (file-relative-name path doom-emacs-dir)) - ((file-in-directory-p path doom-private-dir) - (file-relative-name path doom-private-dir)) + ((file-in-directory-p path doom-user-dir) + (file-relative-name path doom-user-dir)) ((abbreviate-file-name path)))))) ;;;###autoload diff --git a/modules/editor/file-templates/config.el b/modules/editor/file-templates/config.el index 2620c931d..35c49bd44 100644 --- a/modules/editor/file-templates/config.el +++ b/modules/editor/file-templates/config.el @@ -116,7 +116,7 @@ information.") (defun +file-templates-in-emacs-dirs-p (file) "Returns t if FILE is in Doom or your private directory." - (or (file-in-directory-p file doom-private-dir) + (or (file-in-directory-p file doom-user-dir) (file-in-directory-p file doom-emacs-dir))) (defun +file-template-p (rule) diff --git a/modules/editor/snippets/config.el b/modules/editor/snippets/config.el index 46392a4c2..b2dd6df51 100644 --- a/modules/editor/snippets/config.el +++ b/modules/editor/snippets/config.el @@ -1,6 +1,6 @@ ;;; editor/snippets/config.el -*- lexical-binding: t; -*- -(defvar +snippets-dir (expand-file-name "snippets/" doom-private-dir) +(defvar +snippets-dir (expand-file-name "snippets/" doom-user-dir) "Directory where `yasnippet' will search for your private snippets.") diff --git a/modules/email/wanderlust/config.el b/modules/email/wanderlust/config.el index 8743cd1d8..23b7bf70a 100644 --- a/modules/email/wanderlust/config.el +++ b/modules/email/wanderlust/config.el @@ -17,8 +17,8 @@ (setq wl-demo nil wl-stay-folder-window t - wl-init-file (expand-file-name "wl.el" doom-private-dir) - wl-folders-file (expand-file-name "folders.wl" doom-private-dir)) + wl-init-file (expand-file-name "wl.el" doom-user-dir) + wl-folders-file (expand-file-name "folders.wl" doom-user-dir)) (setq wl-message-truncate-lines t wl-summary-width 120 diff --git a/modules/lang/emacs-lisp/autoload.el b/modules/lang/emacs-lisp/autoload.el index 45d04db8d..c44643ac9 100644 --- a/modules/lang/emacs-lisp/autoload.el +++ b/modules/lang/emacs-lisp/autoload.el @@ -247,7 +247,7 @@ https://emacs.stackexchange.com/questions/10230/how-to-indent-keywords-aligned" ;;;###autoload (defun +emacs-lisp-reduce-flycheck-errors-in-emacs-config-h () "Remove `emacs-lisp-checkdoc' checker and reduce `emacs-lisp' checker -verbosity when editing a file in `doom-private-dir' or `doom-emacs-dir'." +verbosity when editing a file in `doom-user-dir' or `doom-emacs-dir'." (when (and (bound-and-true-p flycheck-mode) (eq major-mode 'emacs-lisp-mode) (or (not default-directory) diff --git a/modules/lang/emacs-lisp/config.el b/modules/lang/emacs-lisp/config.el index b9a9befbb..21286680b 100644 --- a/modules/lang/emacs-lisp/config.el +++ b/modules/lang/emacs-lisp/config.el @@ -8,7 +8,7 @@ This marks a foldable marker for `outline-minor-mode' in elisp buffers.") (defvar +emacs-lisp-disable-flycheck-in-dirs - (list doom-emacs-dir doom-private-dir) + (list doom-emacs-dir doom-user-dir) "List of directories to disable `emacs-lisp-checkdoc' in. This checker tends to produce a lot of false positives in your .emacs.d and diff --git a/modules/lang/emacs-lisp/demos.org b/modules/lang/emacs-lisp/demos.org index 2e43ce4d1..7ee4184a5 100644 --- a/modules/lang/emacs-lisp/demos.org +++ b/modules/lang/emacs-lisp/demos.org @@ -386,7 +386,7 @@ Or to create aliases for functions that behave differently: ;;; Lets say we're in ~/.doom.d/config.el (load! "lisp/module") ; loads ~/.doom.d/lisp/module.el (load! "somefile" doom-emacs-dir) ; loads ~/.emacs.d/somefile.el -(load! "anotherfile" doom-private-dir) ; loads ~/.doom.d/anotherfile.el +(load! "anotherfile" doom-user-dir) ; loads ~/.doom.d/anotherfile.el ;; If you don't want a `load!' call to throw an error if the file doesn't exist: (load! "~/.maynotexist" nil t) diff --git a/modules/lang/org/config.el b/modules/lang/org/config.el index 641cd77e6..b4a40b16e 100644 --- a/modules/lang/org/config.el +++ b/modules/lang/org/config.el @@ -532,7 +532,7 @@ relative to `org-directory', unless it is an absolute path." '("wolfram" . "https://wolframalpha.com/input/?i=%s") '("doom" . "https://github.com/hlissner/doom-emacs/%s") `("emacsdir" . ,(doom-path doom-emacs-dir "%s")) - `("doomdir" . ,(doom-path doom-private-dir "%s"))) + `("doomdir" . ,(doom-path doom-user-dir "%s"))) (+org-define-basic-link "org" 'org-directory) (+org-define-basic-link "doom" 'doom-emacs-dir) diff --git a/modules/term/eshell/config.el b/modules/term/eshell/config.el index 8f733ee2e..30b14edb3 100644 --- a/modules/term/eshell/config.el +++ b/modules/term/eshell/config.el @@ -8,7 +8,7 @@ ;; is restored. (defvar +eshell-config-dir - (expand-file-name "eshell/" doom-private-dir) + (expand-file-name "eshell/" doom-user-dir) "Where to store eshell configuration files, as opposed to `eshell-directory-name', which is where Doom will store temporary/data files.") diff --git a/modules/tools/lsp/+lsp.el b/modules/tools/lsp/+lsp.el index 79b22463a..00d918cc8 100644 --- a/modules/tools/lsp/+lsp.el +++ b/modules/tools/lsp/+lsp.el @@ -45,7 +45,7 @@ Can be a list of backends; accepts any value `company-backends' accepts.") lsp-vetur-global-snippets-dir (expand-file-name "vetur" (or (bound-and-true-p +snippets-dir) - (concat doom-private-dir "snippets/"))) + (concat doom-user-dir "snippets/"))) lsp-xml-jar-file (expand-file-name "org.eclipse.lsp4xml-0.3.0-uber.jar" lsp-server-install-dir) lsp-groovy-server-file (expand-file-name "groovy-language-server-all.jar" lsp-server-install-dir)) diff --git a/modules/ui/doom-dashboard/config.el b/modules/ui/doom-dashboard/config.el index 7d2d43d74..3999af026 100644 --- a/modules/ui/doom-dashboard/config.el +++ b/modules/ui/doom-dashboard/config.el @@ -69,7 +69,7 @@ Possible values: :action bookmark-jump) ("Open private configuration" :icon (all-the-icons-octicon "tools" :face 'doom-dashboard-menu-title) - :when (file-directory-p doom-private-dir) + :when (file-directory-p doom-user-dir) :action doom/open-private-config) ("Open documentation" :icon (all-the-icons-octicon "book" :face 'doom-dashboard-menu-title)