Skip to content

Commit

Permalink
Add automatic package update configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
daviwil committed Feb 8, 2021
1 parent 1c8455a commit 4e921cc
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 1 deletion.
25 changes: 25 additions & 0 deletions Emacs.org
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,25 @@ Emacs has a built in package manager but it doesn't make it easy to automaticall

#+end_src

** Automatic Package Updates

The auto-package-update package helps us keep our Emacs packages up to date! It will prompt you after a certain number of days either at startup or at a specific time of day to remind you to update your packages.

You can also use =M-x auto-package-update-now= to update right now!

#+begin_src emacs-lisp

(use-package auto-package-update
:custom
(auto-package-update-interval 7)
(auto-package-update-prompt-before-update t)
(auto-package-update-hide-results t)
:config
(auto-package-update-maybe))
(auto-package-update-at-time "09:00"))

#+end_src

* Keep Folders Clean

We use the [[https://github.com/emacscollective/no-littering/blob/master/no-littering.el][no-littering]] package to keep folders where we edit files and the Emacs configuration folder clean! It knows about a wide variety of variables for built in Emacs features as well as those from community packages so it can be much easier than finding and setting these variables yourself.
Expand Down Expand Up @@ -1082,3 +1101,9 @@ This is an example of configuring another non-Emacs application using org-mode.
value=<<the-value()>>

#+end_src

#+begin_src emacs-lisp

(message "Init file finished loading!")

#+end_src
13 changes: 12 additions & 1 deletion init.el
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,15 @@
(require 'use-package)
(setq use-package-always-ensure t)

(use-package auto-package-update
:custom
(auto-package-update-interval 7)
(auto-package-update-prompt-before-update t)
(auto-package-update-hide-results t)
:config
(auto-package-update-maybe))
(auto-package-update-at-time "09:00"))

;; NOTE: If you want to move everything out of the ~/.emacs.d folder
;; reliably, set `user-emacs-directory` before loading no-littering!
;(setq user-emacs-directory "~/.cache/emacs")
Expand Down Expand Up @@ -215,7 +224,9 @@
(set-face-attribute 'org-verbatim nil :inherit '(shadow fixed-pitch))
(set-face-attribute 'org-special-keyword nil :inherit '(font-lock-comment-face fixed-pitch))
(set-face-attribute 'org-meta-line nil :inherit '(font-lock-comment-face fixed-pitch))
(set-face-attribute 'org-checkbox nil :inherit 'fixed-pitch))
(set-face-attribute 'org-checkbox nil :inherit 'fixed-pitch)
(set-face-attribute 'line-number nil :inherit 'fixed-pitch)
(set-face-attribute 'line-number-current-line nil :inherit 'fixed-pitch))

(defun efs/org-mode-setup ()
(org-indent-mode)
Expand Down

0 comments on commit 4e921cc

Please sign in to comment.