mirror of
https://github.com/pestctrl/emacs-config.git
synced 2026-02-16 08:14:15 +00:00
Stop relying on "~/.emacs.d"
This commit is contained in:
parent
519321f6c4
commit
33561250d4
8 changed files with 20 additions and 16 deletions
|
|
@ -272,7 +272,7 @@
|
|||
|
||||
(setq epg-gpg-program "gpg2")
|
||||
;; (setq auth-source-debug t)
|
||||
(setq auth-sources '((:source "~/.emacs.d/secrets/.authinfo.gpg")))
|
||||
(setq auth-sources `((:source ,(ef "secrets/.authinfo.gpg"))))
|
||||
#+end_src
|
||||
** debbugs
|
||||
#+begin_src emacs-lisp
|
||||
|
|
@ -322,7 +322,7 @@
|
|||
)))
|
||||
|
||||
(defun get-authinfo (host port)
|
||||
(let* ((netrc (netrc-parse (expand-file-name "~/.emacs.d/secrets/.authinfo.gpg")))
|
||||
(let* ((netrc (netrc-parse (ef "secrets/.authinfo.gpg")))
|
||||
(hostentry (netrc-machine netrc host port)))
|
||||
(when hostentry (netrc-get hostentry "password"))))
|
||||
|
||||
|
|
@ -440,7 +440,7 @@
|
|||
#+end_src
|
||||
* auto-save files in same directory
|
||||
#+begin_src emacs-lisp
|
||||
(setq backup-directory-alist `(("." . "~/.emacs.d/backups/")))
|
||||
(setq backup-directory-alist `(("." . ,(ef "backups/"))))
|
||||
|
||||
(setq make-backup-files t ; backup of a file the first time it is saved.
|
||||
backup-by-copying t ; don't clobber symlinks
|
||||
|
|
|
|||
|
|
@ -129,7 +129,7 @@
|
|||
#+end_src
|
||||
* exwm-background
|
||||
#+begin_src emacs-lisp
|
||||
(add-to-list 'load-path "~/.emacs.d/submodule/exwm-background/")
|
||||
(add-to-list 'load-path (ef "submodule/exwm-background/"))
|
||||
(require 'exwm-background)
|
||||
|
||||
(let ((wm (shell-command-to-string "wmctrl -m")))
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@
|
|||
(setq beacon-color "#006400")
|
||||
|
||||
;; Use my fork of chinese-etzy
|
||||
(load-file "~/.emacs.d/my-etzy.el")
|
||||
(load-file (ef "my-etzy.el"))
|
||||
|
||||
;; If I ever decide to turn on display-lines-mode, use relative line
|
||||
;; numbering
|
||||
|
|
@ -1049,7 +1049,7 @@
|
|||
(modus-themes-load-themes)
|
||||
(load-theme 'modus-operandi nil t)
|
||||
|
||||
(add-to-list 'custom-theme-load-path "~/.emacs.d/lisp/themes")
|
||||
(add-to-list 'custom-theme-load-path (ef "lisp/themes"))
|
||||
(require 'light-default-theme)
|
||||
(load-theme 'light-default nil t)
|
||||
(require 'dark-default-theme)
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
** fstree
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(add-to-list 'load-path
|
||||
"~/.emacs.d/submodule/org-fstree")
|
||||
(ef "submodule/org-fstree"))
|
||||
(require 'org-fstree)
|
||||
#+END_SRC
|
||||
** org-bullets
|
||||
|
|
@ -43,7 +43,7 @@
|
|||
(setq plstore-cache-passphrase-for-symmetric-encryption t)
|
||||
|
||||
(save-excursion
|
||||
(let ((filename "~/.emacs.d/google-calendar-secret.el"))
|
||||
(let ((filename (ef "google-calendar-secret.el")))
|
||||
(when (file-exists-p filename)
|
||||
(set-buffer (find-file-noselect filename))
|
||||
(let ((var (eval (read (buffer-string)))))
|
||||
|
|
@ -88,7 +88,7 @@
|
|||
*** Old ox-reveal package
|
||||
#+BEGIN_SRC
|
||||
(add-to-list 'load-path
|
||||
"~/.emacs.d/submodule/org-reveal")
|
||||
(ef "submodule/org-reveal"))
|
||||
(require 'ox-reveal)
|
||||
(setq org-reveal-root "file:///home/benson/.reveal.js")
|
||||
(setq org-structure-template-alist (remove-if (lambda (c) (string= (car c) "n")) org-structure-template-alist))
|
||||
|
|
@ -192,7 +192,7 @@
|
|||
(evil-set-initial-state 'org-brain-visualize-mode 'emacs))
|
||||
:config
|
||||
(setq org-id-track-globally t)
|
||||
(setq org-id-locations-file "~/.emacs.d/.org-id-locations")
|
||||
(setq org-id-locations-file (ef ".org-id-locations"))
|
||||
(push '("b" "Brain" plain (function org-brain-goto-end)
|
||||
"* %i%?" :empty-lines 1)
|
||||
org-capture-templates)
|
||||
|
|
@ -218,7 +218,7 @@
|
|||
#+END_SRC
|
||||
** org-now
|
||||
#+begin_src emacs-lisp
|
||||
(add-to-list 'load-path "~/.emacs.d/submodule/org-now")
|
||||
(add-to-list 'load-path (ef "submodule/org-now"))
|
||||
(require 'org-now)
|
||||
(setq org-now-location
|
||||
nil)
|
||||
|
|
@ -782,7 +782,7 @@
|
|||
#+end_src
|
||||
* elgantt
|
||||
#+begin_src emacs-lisp
|
||||
(add-to-list 'load-path "~/.emacs.d/submodule/elgantt")
|
||||
(add-to-list 'load-path (ef "submodule/elgantt"))
|
||||
(require 'elgantt)
|
||||
#+end_src
|
||||
* org-kanban
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
* Youtube-dl
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(when (executable-find "youtube-dl")
|
||||
(add-to-list 'load-path "~/.emacs.d/submodule/youtube-dl-emacs/")
|
||||
(add-to-list 'load-path (ef "submodule/youtube-dl-emacs/"))
|
||||
(require 'youtube-dl)
|
||||
|
||||
(defun youtube-dl-song (url)
|
||||
|
|
|
|||
|
|
@ -201,9 +201,9 @@
|
|||
(use-package erlang)
|
||||
|
||||
(add-to-list 'load-path
|
||||
"~/.emacs.d/submodule/erlang_ls/")
|
||||
(ef "submodule/erlang_ls/"))
|
||||
|
||||
(setq lsp-erlang-server-install-dir "~/.emacs.d/submodule/erlang_ls")
|
||||
(setq lsp-erlang-server-install-dir (ef "submodule/erlang_ls"))
|
||||
|
||||
(defun my/erlang-keymap-hook ()
|
||||
(local-set-key (kbd "C-c C-c") 'erlang-compile))
|
||||
|
|
|
|||
|
|
@ -25,8 +25,9 @@
|
|||
;;; Code:
|
||||
(require 'mmt)
|
||||
(require 'cl)
|
||||
(require 'libs)
|
||||
|
||||
(setq custom-file "~/.emacs.d/customize.el")
|
||||
(setq custom-file (ef "customize.el"))
|
||||
(load custom-file 'noerror)
|
||||
|
||||
(defvar ec/my-variables-list '())
|
||||
|
|
|
|||
|
|
@ -18,4 +18,7 @@
|
|||
;; Register my own rx forms
|
||||
(require 'my-rx-forms)
|
||||
|
||||
(defmacro ef (path)
|
||||
`(expand-file-name ,path user-emacs-directory))
|
||||
|
||||
(provide 'libs)
|
||||
|
|
|
|||
Loading…
Reference in a new issue