mirror of
https://github.com/SqrtMinusOne/dotfiles.git
synced 2025-12-10 19:23:03 +03:00
fix(emacs): do not load private.el if not present
This commit is contained in:
parent
623df333e4
commit
1121bd865c
2 changed files with 11 additions and 7 deletions
|
|
@ -73,8 +73,8 @@
|
|||
(load custom-file 'noerror)
|
||||
|
||||
(let ((private-file (expand-file-name "private.el" user-emacs-directory)))
|
||||
|
||||
(load-file private-file))
|
||||
(when (file-exists-p private-file)
|
||||
(load-file private-file)))
|
||||
|
||||
(use-package no-littering
|
||||
:straight t)
|
||||
|
|
@ -1912,7 +1912,7 @@ Returns (<buffer> . <workspace-index>) or nil."
|
|||
"RET" 'plantuml-preview)
|
||||
|
||||
(use-package subed
|
||||
:straight (:host github :repo "rndusr/subed" :files ("subed/*.el"))
|
||||
:straight (:host github :repo "rndusr/subed" :files ("subed/*.el") :build (:not native-compile))
|
||||
:mode (rx (| "srt" "vtt" "ass") eos))
|
||||
|
||||
(use-package langtool
|
||||
|
|
@ -3065,7 +3065,9 @@ Returns (<buffer> . <workspace-index>) or nil."
|
|||
(insert (my/org-roam-daily-format-target-links (cdr group) path))))))
|
||||
|
||||
(defun my/org-roam-daily-transclusions-hook ()
|
||||
(when (org-roam-dailies--daily-note-p)
|
||||
(when (and
|
||||
(fboundp 'org-roam-dailies--daily-note-p)
|
||||
(org-roam-dailies--daily-note-p))
|
||||
(my/org-roam-daily-dispatch-transclusions)
|
||||
(message "Tranclusions dispatched!")))
|
||||
|
||||
|
|
|
|||
|
|
@ -494,8 +494,8 @@ I have some variables which I don't commit to the repo, e.g. my current location
|
|||
|
||||
#+begin_src emacs-lisp
|
||||
(let ((private-file (expand-file-name "private.el" user-emacs-directory)))
|
||||
|
||||
(load-file private-file))
|
||||
(when (file-exists-p private-file)
|
||||
(load-file private-file)))
|
||||
#+end_src
|
||||
*** No littering
|
||||
By default Emacs and its packages create a lot files in =.emacs.d= and in other places. [[https://github.com/emacscollective/no-littering][no-littering]] is a collective effort to redirect all of that to two folders in =user-emacs-directory=.
|
||||
|
|
@ -4428,7 +4428,9 @@ Put it all together. Yay!
|
|||
Finally, let's put this function into the save hook:
|
||||
#+begin_src emacs-lisp
|
||||
(defun my/org-roam-daily-transclusions-hook ()
|
||||
(when (org-roam-dailies--daily-note-p)
|
||||
(when (and
|
||||
(fboundp 'org-roam-dailies--daily-note-p)
|
||||
(org-roam-dailies--daily-note-p))
|
||||
(my/org-roam-daily-dispatch-transclusions)
|
||||
(message "Tranclusions dispatched!")))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue