diff --git a/init.d/basics/package-management.el b/init.d/basics/package-management.el index ce018e9..f871e6f 100644 --- a/init.d/basics/package-management.el +++ b/init.d/basics/package-management.el @@ -1,6 +1,6 @@ ;;; package-management.el --- Initialize package management -*- lexical-binding: t; -*- -;; Time-stamp: <2020-03-29T21:16:55+0200> +;; Time-stamp: <2020-03-30T00:21:50+0200> ;;; Commentary: ;; * Set up straight @@ -48,10 +48,11 @@ (defun my/straight-check-last-update () "Notify if 7 days have passed since the last package was built." - (let ((days 7)) - (when (> (- (time-to-seconds) - (time-to-seconds (file-attribute-modification-time - (file-attributes (straight--build-dir))))) + (let ((days 7) + (mtime-seconds (time-to-seconds + (file-attribute-modification-time + (file-attributes (straight--build-dir)))))) + (when (> (- (time-to-seconds) mtime-seconds) (* 60 60 24 days)) (message "The last package update was more than %d days ago." days)))) (add-hook 'emacs-startup-hook #'my/straight-check-last-update)