Giter VIP home page Giter VIP logo

auto-package-update.el's Introduction

auto-package-update.el

Automatically update Emacs packages.


Build Status MELPA MELPA Stable

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.

Requirements

This package was tested for GNU Emacs 24.4 and above. Older Emacsen are not supported yet.

Installation

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)

Usage

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 at startup if there is an update pending.

You can register a check every day at a given time using auto-package-update-at-time:

(auto-package-update-at-time "03:00")

will check for pending updates every three o'clock a.m..

You can also use the function auto-package-update-now to update your packages immediatelly at any given time.

Customization

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)

Sometimes it is useful to skip an automatic update, e.g. when you're in a hurry or don't have a working internet connection. Use this setting to show a manual prompt before automatic updates:

(setq auto-package-update-prompt-before-update t)

To delete residual old version directory when updating, set to true variable auto-package-update-delete-old-versions. The default value is nil. If you want to enable deleting:

(setq auto-package-update-delete-old-versions t)

By default the results buffer will be shown after auto package update is complete. Set to true for variable auto-package-update-hide-results to hide the results buffer after auto package update is complete:

(setq auto-package-update-hide-results t)

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")))

Changelog

1.7 - Add option to prompt user before running auto-package-update-maybe
1.6.1 - Replace deprecated toggle-read-only with read-only-mode to remove byte compile warnings. Thanx to @syohex.
1.6 - Add option to remove old packages from .emacs.d/elpa when updating. Thanks to @JesusMtnez.
1.5 - Allow user to check for updates every day at specified time.
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.

Function Documentation

(auto-package-update-now)

Update installed Emacs packages.

(auto-package-update-at-time TIME)

Try to update every day at the specified TIME.

(auto-package-update-maybe)

Update installed Emacs packages if at least auto-package-update-interval days have passed since the last update.


Markdown README file generated by make-readme-markdown.el

auto-package-update.el's People

Contributors

rranelli avatar jesusmtnez avatar syohex avatar dylan-conlin avatar ericcrosson avatar fernandoalmeida avatar guillawme avatar ekenberg avatar jsmestad avatar kzkn avatar mgalgs avatar wqer555 avatar yourfin avatar condy0919 avatar tastytea avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.