From 537a4f03874d5a84f2b4c3ac16bca6adce4076c7 Mon Sep 17 00:00:00 2001 From: Riyyi Date: Tue, 28 Jul 2020 23:05:47 +0200 Subject: [PATCH] Rename directories --- .emacs.d/config.org | 48 ++++++++++++++++++++++----------------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/.emacs.d/config.org b/.emacs.d/config.org index 39cd804..4c51ceb 100644 --- a/.emacs.d/config.org +++ b/.emacs.d/config.org @@ -83,13 +83,13 @@ M-x =all-the-icons-install-fonts= Variables for directories and leader keys. #+BEGIN_SRC emacs-lisp - (defvar emacs-d (directory-file-name (file-truename user-emacs-directory)) + (defvar dot-emacs-dir (directory-file-name (file-truename user-emacs-directory)) "Directory base.") - (defvar dot-etc-dir (concat emacs-d "/etc") + (defvar dot-etc-dir (concat dot-emacs-dir "/etc") "Directory for non-volatile storage.") - (defvar emacs-cache (concat (getenv "XDG_CACHE_HOME") "/emacs") + (defvar dot-cache-dir (concat (getenv "XDG_CACHE_HOME") "/emacs") "Directory for cache data.") (defvar dot/leader-key "SPC" @@ -140,7 +140,7 @@ https://github.com/rranelli/auto-package-update.el :custom (auto-package-update-delete-old-versions t) (auto-package-update-hide-results t) - (auto-package-update-last-update-day-path (concat emacs-cache "/last-package-update-day")) + (auto-package-update-last-update-day-path (concat dot-cache-dir "/last-package-update-day")) :config (auto-package-update-maybe)) #+END_SRC @@ -191,7 +191,7 @@ Install and configure packages. :defer t :custom (smex-prompt-string "Command: ") - (smex-save-file (concat emacs-cache "/smex-items")) + (smex-save-file (concat dot-cache-dir "/smex-items")) :config (smex-initialize)) (use-package avy @@ -308,10 +308,10 @@ Project manager. #+BEGIN_SRC emacs-lisp (use-package projectile :custom - (projectile-cache-file (concat emacs-cache "/projectile.cache")) + (projectile-cache-file (concat dot-cache-dir "/projectile.cache")) (projectile-enable-caching t) (projectile-indexing-method 'hybrid) - (projectile-known-projects-file (concat emacs-cache "/projectile-bookmarks.eld")) + (projectile-known-projects-file (concat dot-cache-dir "/projectile-bookmarks.eld")) (projectile-project-search-path '("~")) (projectile-sort-order 'recentf) :config (projectile-mode)) @@ -399,10 +399,10 @@ On the fly syntax checking. (lsp-auto-guess-root t) (lsp-clients-clangd-args '("-compile-commands-dir=build" "-j=2" "-background-index" "-log=error")) (lsp-enable-xref t) - (lsp-intelephense-storage-path (concat emacs-cache "/lsp-cache")) + (lsp-intelephense-storage-path (concat dot-cache-dir "/lsp-cache")) (lsp-keep-workspace-alive nil) (lsp-prefer-flymake nil) - (lsp-session-file (concat emacs-cache "/lsp-session-v1")) + (lsp-session-file (concat dot-cache-dir "/lsp-session-v1")) :config ;; Enable which-key descriptions @@ -451,7 +451,7 @@ On the fly syntax checking. :custom (yas-prompt-functions '(yas-ido-prompt yas-completing-prompt)) - (yas-snippet-dirs (list (concat emacs-d "/snippets"))) + (yas-snippet-dirs (list (concat dot-emacs-dir "/snippets"))) :config (yas-reload-all)) (use-package yasnippet-snippets @@ -470,7 +470,7 @@ Irony requires M-x =irony-install-server=. c++-mode) . irony-mode) (irony-mode . irony-cdb-autosetup-compile-options) - :init (setq irony-user-dir (concat emacs-cache "/irony/")) + :init (setq irony-user-dir (concat dot-cache-dir "/irony/")) :config (push 'glsl-mode irony-supported-major-modes)) (use-package company-irony @@ -551,7 +551,7 @@ https://github.com/laishulu/hl-fill-column (use-package elfeed :defer t :custom - (elfeed-db-directory (concat emacs-cache "/elfeed")) + (elfeed-db-directory (concat dot-cache-dir "/elfeed")) (elfeed-enclosure-default-dir "~/downloads/") (elfeed-search-filter "@6-months-ago +unread") (elfeed-search-clipboard-type 'CLIPBOARD) @@ -655,22 +655,22 @@ Set file paths for built-in features like: auto-saves, backups, packages and tramp. #+BEGIN_SRC emacs-lisp - (unless (file-directory-p emacs-cache) - (make-directory emacs-cache t)) + (unless (file-directory-p dot-cache-dir) + (make-directory dot-cache-dir t)) ;; Set Directory locations - (setq auto-save-list-file-prefix (concat emacs-cache "/auto-save/")) + (setq auto-save-list-file-prefix (concat dot-cache-dir "/auto-save/")) (setq auto-save-file-name-transforms `((".*" ,auto-save-list-file-prefix t))) - (setq backup-directory-alist `((".*" . ,(concat emacs-cache "/backup/")))) - (setq package-user-dir (concat emacs-d "/elpa")) - (setq tramp-auto-save-directory (concat emacs-cache "/tramp-auto-save/")) + (setq backup-directory-alist `((".*" . ,(concat dot-cache-dir "/backup/")))) + (setq package-user-dir (concat dot-emacs-dir "/elpa")) + (setq tramp-auto-save-directory (concat dot-cache-dir "/tramp-auto-save/")) (setq tramp-backup-directory-alist backup-directory-alist) ;; Set file locations (setq bookmark-default-file (concat dot-etc-dir "/bookmarks")) - (setq ido-save-directory-list-file (concat emacs-cache "/ido.last")) - (setq nsm-settings-file (concat emacs-cache "/network-security.data")) - (setq tramp-persistency-file-name (concat emacs-cache "/tramp")) + (setq ido-save-directory-list-file (concat dot-cache-dir "/ido.last")) + (setq nsm-settings-file (concat dot-cache-dir "/network-security.data")) + (setq tramp-persistency-file-name (concat dot-cache-dir "/tramp")) #+END_SRC ** File Backups Versioning @@ -748,7 +748,7 @@ Setup file backups versioning. (setq recentf-filename-handlers '(abbreviate-file-name)) (setq recentf-max-menu-items 0) (setq recentf-max-saved-items 200) - (setq recentf-save-file (concat emacs-cache "/recentf")) + (setq recentf-save-file (concat dot-cache-dir "/recentf")) (recentf-mode) ) #+END_SRC @@ -835,12 +835,12 @@ Functions that only use built-in Emacs functionality. (defun config-visit () "Config edit." (interactive) - (find-file (concat emacs-d "/config.org"))) + (find-file (concat dot-emacs-dir "/config.org"))) (defun config-reload () "Config reload." (interactive) - (org-babel-load-file (concat emacs-d "/config.org"))) + (org-babel-load-file (concat dot-emacs-dir "/config.org"))) (defun display-startup-echo-area-message () "Hide default startup message."