https://github.com/rranelli/auto-package-update.el.git
git clone 'git://github.com/rranelli/auto-package-update.el.git'
Automatically update Emacs packages.
This package provides functionality for automatically updating your Emacs packages periodically. It is specially useful for people that work in multiple machines and tend to forget to manually update packages from time to time.
The main idea is that you set a desired periodicity for the updates, and when you start Emacs, the packages will be automatically updated if enough days have passed since the last update.
This package was tested for GNU Emacs 24.4 and above. Older Emacsen are not supported yet.
You can install via MELPA
, or manually by downloading auto-package-update.el
and
adding the following to your init file:
(add-to-list 'load-path "/path/to/auto-package-update")
(require 'auto-package-update)
If auto-package-update.el
is installed properly, you can add the following
line to your .emacs
.
(auto-package-update-maybe)
This will update your installed packages if there is an update pending.
You can also use the function auto-package-update-now
to update your packages
at any given time.
The periodicity (in days) of the update is given by the custom
variable auto-package-update-interval
. The default interval is 7
days but if you want to change it, all you need is:
(setq auto-package-update-interval 14)
Hooks
If you want to add functions to run before and after the package update, you can
use the auto-package-update-before-hook
and auto-package-update-after-hook
hooks.
For example:
(add-hook 'auto-package-update-before-hook
(lambda () (message "I will update packages now")))
1.4 - Add before and after update hooks.
1.3 - Do not break if a package is not available in the repositories.
Show update results in a temporary buffer instead of the echo area
1.2 - Refactor for independence on package-menu functions.
1.1 - Support GNU Emacs 24.3.
1.0 - First release.
(auto-package-update-now)
Update installed Emacs packages.
(auto-package-update-maybe)
Update installed Emacs packages if at least auto-package-update-interval
days have passed since the last update.
—–