From: Tassilo Horn <tsdh@gnu.org>
To: Neal Becker <ndbecker2@gmail.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: package management - auto check for updates?
Date: Tue, 25 Mar 2014 16:56:40 +0100 [thread overview]
Message-ID: <87d2hae0g7.fsf@gnu.org> (raw)
In-Reply-To: <lgs361$95r$1@ger.gmane.org> (Neal Becker's message of "Tue, 25 Mar 2014 10:17:52 -0400")
Neal Becker <ndbecker2@gmail.com> writes:
> package management is finally getting pretty nice in emacs.
>
> I use:
> (package-initialize)
> (require 'felineherd)
>
> Now, every now and then, I manually check for updates.
>
> But it'd be nice if emacs could automatically inform me of updates to
> my installed pacakges.
This works, although it's possibly not the cleanest solution. It
messages the upgradeable packages and also notifies you via desktop
notifications.
--8<---------------cut here---------------start------------->8---
(defun th/package-check-upgrades ()
(interactive)
(cl-flet ((check ()
(package-menu-mark-upgrades)
(let ((pkgs (mapcar #'car (package-menu--find-upgrades))))
(when pkgs
(message "PACKAGE UPGRADES: %s" pkgs)
(require 'notifications)
(notifications-notify :title "Emacs Package Upgrades"
:body (format "%s" pkgs))))))
(if (get-buffer "*Packages*")
(with-current-buffer (get-buffer "*Packages*")
(package-menu-refresh)
(funcall #'check))
(save-window-excursion (list-packages))
(with-current-buffer (get-buffer "*Packages*")
(funcall #'check)))))
--8<---------------cut here---------------end--------------->8---
If you want, you could run that from an idle timer.
Bye,
Tassilo
prev parent reply other threads:[~2014-03-25 15:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-25 14:17 package management - auto check for updates? Neal Becker
2014-03-25 15:56 ` Tassilo Horn [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87d2hae0g7.fsf@gnu.org \
--to=tsdh@gnu.org \
--cc=help-gnu-emacs@gnu.org \
--cc=ndbecker2@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.