From: rearman Date: Tue, 28 Feb 2023 18:19:22 +0000 (-0500) Subject: Put custom-set-variables into their own file X-Git-Url: https://git.earman.xyz/?a=commitdiff_plain;h=04782912f5d22f3c726ae0c0b3bb6420e18cfef2;p=emacsinit.git Put custom-set-variables into their own file Also set up variables for user-x.el files, for simpler bindings to bring up for editing. --- diff --git a/bindings.el b/bindings.el index f9fbedf..09c8687 100644 --- a/bindings.el +++ b/bindings.el @@ -4,14 +4,14 @@ (global-set-key (kbd "C-c a") 'org-agenda) (global-set-key (kbd "C-c b") 'buffer-menu-other-window) (global-set-key (kbd "C-c c") 'org-capture) +(global-set-key (kbd "C-c C-e") (lambda () (interactive) (dired user-emacs-directory))) (global-set-key (kbd "C-c ei") (lambda () (interactive) (find-file user-init-file))) -(global-set-key (kbd "C-c ep") (lambda () (interactive) (find-file (expand-file-name "package-config.el" user-emacs-directory)))) -(global-set-key (kbd "C-c es") (lambda () (interactive) (find-file (expand-file-name "setq-defaults.el" user-emacs-directory)))) -(global-set-key (kbd "C-c ew") (lambda () (interactive) (find-file (expand-file-name "work-eqs.el" user-emacs-directory)))) -(global-set-key (kbd "C-c ed") (lambda () (interactive) (find-file (expand-file-name "defuns.el" user-emacs-directory)))) -(global-set-key (kbd "C-c eo") (lambda () (interactive) (find-file (expand-file-name "org-setup.el" user-emacs-directory)))) -(global-set-key (kbd "C-c eh") (lambda () (interactive) (find-file (expand-file-name "hooks-puts.el" user-emacs-directory)))) -(global-set-key (kbd "C-c eb") (lambda () (interactive) (find-file (expand-file-name "bindings.el" user-emacs-directory)))) +(global-set-key (kbd "C-c ep") (lambda () (interactive) (find-file user-packages))) +(global-set-key (kbd "C-c es") (lambda () (interactive) (find-file user-setqs))) +(global-set-key (kbd "C-c ew") (lambda () (interactive) (find-file user-work-eqs))) +(global-set-key (kbd "C-c ed") (lambda () (interactive) (find-file user-defuns))) +(global-set-key (kbd "C-c eh") (lambda () (interactive) (find-file user-hooks))) +(global-set-key (kbd "C-c eb") (lambda () (interactive) (find-file user-bindings))) (global-set-key (kbd "C-c s") 'eshell) (global-set-key (kbd "") 'scratch-only) (global-set-key (kbd "") 'recentf-open-files) diff --git a/custom-set-variables.el b/custom-set-variables.el new file mode 100644 index 0000000..2192bd7 --- /dev/null +++ b/custom-set-variables.el @@ -0,0 +1,24 @@ +(custom-set-variables + ;; custom-set-variables was added by Custom. + ;; If you edit it by hand, you could mess it up, so be careful. + ;; Your init file should contain only one such instance. + ;; If there is more than one, they won't work right. + '(ledger-reports + '(("assets" "%(binary) -f %(ledger-file) bal assets") + ("income" "%(binary) -f %(ledger-file) bal income") + ("expenses" "%(binary) -f %(ledger-file) bal expenses") + ("liabilities" "%(binary) -f %(ledger-file) bal liabilities") + ("bal" "%(binary) -f %(ledger-file) bal") + ("reg" "%(binary) -f %(ledger-file) reg") + ("payee" "%(binary) -f %(ledger-file) reg @%(payee)") + ("account" "%(binary) -f %(ledger-file) reg %(account)"))) + '(minibuffer-prompt-properties '(read-only t cursor-intangible t face minibuffer-prompt)) + '(package-selected-packages + '(page-break-lines popup-kill-ring auto-package-update s openwith gnuplot-mode magit expand-region company use-package))) +(custom-set-faces + ;; custom-set-faces was added by Custom. + ;; If you edit it by hand, you could mess it up, so be careful. + ;; Your init file should contain only one such instance. + ;; If there is more than one, they won't work right. + '(mode-line ((t (:foreground "black" :background "gray")))) + '(mode-line-inactive ((t (:foreground "black" :background "#cae0a6"))))) diff --git a/early-init.el b/early-init.el index c7bd6bd..ac7e270 100644 --- a/early-init.el +++ b/early-init.el @@ -10,4 +10,4 @@ initial-scratch-message nil server-client-instructions nil) -(setq package-enable-at-startup t) +(setq package-enable-at-startup nil) diff --git a/init.el b/init.el index 7cb8dcf..2b364d7 100644 --- a/init.el +++ b/init.el @@ -1,12 +1,18 @@ ;; -*- lexical-binding: t; -*- -(load (expand-file-name "package-config.el" user-emacs-directory)) -(load (expand-file-name "setq-defaults.el" user-emacs-directory)) -(load (expand-file-name "work-eqs.el" user-emacs-directory)) -(load (expand-file-name "defuns.el" user-emacs-directory)) -(load (expand-file-name "org-setup.el" user-emacs-directory)) -(load (expand-file-name "hooks-puts.el" user-emacs-directory)) -(load (expand-file-name "bindings.el" user-emacs-directory)) +(defvar user-packages (expand-file-name "package-config.el" user-emacs-directory)) +(defvar user-setqs (expand-file-name "setq-defaults.el" user-emacs-directory)) +(defvar user-work-eqs (expand-file-name "work-eqs.el" user-emacs-directory)) +(defvar user-defuns (expand-file-name "defuns.el" user-emacs-directory)) +(defvar user-hooks (expand-file-name "hooks-puts.el" user-emacs-directory)) +(defvar user-bindings (expand-file-name "bindings.el" user-emacs-directory)) + +(load user-packages) +(load user-setqs) +(load user-work-eqs) +(load user-defuns) +(load user-hooks) +(load user-bindings) ;; SETUP FOR SHARED WINDOWS/WSL INIT (if (eq system-type 'windows-nt) @@ -26,28 +32,4 @@ ("\\.doc\\'" "libreoffice" (file)) ("\\.docx\\'" "libreoffice" (file))))) -(custom-set-variables - ;; custom-set-variables was added by Custom. - ;; If you edit it by hand, you could mess it up, so be careful. - ;; Your init file should contain only one such instance. - ;; If there is more than one, they won't work right. - '(ledger-reports - '(("assets" "%(binary) -f %(ledger-file) bal assets") - ("income" "%(binary) -f %(ledger-file) bal income") - ("expenses" "%(binary) -f %(ledger-file) bal expenses") - ("liabilities" "%(binary) -f %(ledger-file) bal liabilities") - ("bal" "%(binary) -f %(ledger-file) bal") - ("reg" "%(binary) -f %(ledger-file) reg") - ("payee" "%(binary) -f %(ledger-file) reg @%(payee)") - ("account" "%(binary) -f %(ledger-file) reg %(account)"))) - '(minibuffer-prompt-properties '(read-only t cursor-intangible t face minibuffer-prompt)) - '(package-selected-packages - '(acme-theme ledger-mode s openwith gnuplot-mode magit expand-region company use-package))) -(custom-set-faces - ;; custom-set-faces was added by Custom. - ;; If you edit it by hand, you could mess it up, so be careful. - ;; Your init file should contain only one such instance. - ;; If there is more than one, they won't work right. - '(mode-line ((t (:foreground "black" :background "gray")))) - '(mode-line-inactive ((t (:foreground "black" :background "#cae0a6")))) - ) +(load custom-file 'noerror)