From: Donald Curtis <dcurtis@gmail.com>
To: emacs-devel@gnu.org
Subject: First attempt at package-update-all for package.el
Date: Mon, 12 Sep 2011 11:32:43 -0500 [thread overview]
Message-ID: <05B187BC-4A22-4259-BC90-3CA39A3E402E@gmail.com> (raw)
I know there is a feature freeze but one of the most requested features (myself included) seems to be an "update" for packages in package.el.
https://gist.github.com/1211655
(defun package-update-all ()
"Update all packages"
(interactive)
(dolist (elt package-alist)
(let* ((name (car elt))
(file-name (symbol-name name))
(available-pkg (assq name package-archive-contents))
(available-version (and available-pkg
(package-desc-vers (cdr available-pkg))))
(current-version (package-desc-vers (cdr elt)))
)
(when (and available-version
(version-list-< current-version available-version))
(message "Updating to: %s - %s" file-name
(package-version-join available-version))
(package-install name)
(package-delete file-name (package-version-join current-version))))))
At least this is available if anyone wants to just put it in their own init file. It's probably not completely right as I am very new to programming this lisp stuff.
Thanks,
Donald
next reply other threads:[~2011-09-12 16:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-12 16:32 Donald Curtis [this message]
2011-09-14 19:05 ` First attempt at package-update-all for package.el Phil Hagelberg
2011-09-14 20:06 ` Chong Yidong
2011-09-15 2:14 ` Chong Yidong
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=05B187BC-4A22-4259-BC90-3CA39A3E402E@gmail.com \
--to=dcurtis@gmail.com \
--cc=emacs-devel@gnu.org \
/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.