unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* First attempt at package-update-all for package.el
@ 2011-09-12 16:32 Donald Curtis
  2011-09-14 19:05 ` Phil Hagelberg
  0 siblings, 1 reply; 4+ messages in thread
From: Donald Curtis @ 2011-09-12 16:32 UTC (permalink / raw)
  To: emacs-devel

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: First attempt at package-update-all for package.el
  2011-09-12 16:32 First attempt at package-update-all for package.el Donald Curtis
@ 2011-09-14 19:05 ` Phil Hagelberg
  2011-09-14 20:06   ` Chong Yidong
  0 siblings, 1 reply; 4+ messages in thread
From: Phil Hagelberg @ 2011-09-14 19:05 UTC (permalink / raw)
  To: Donald Curtis; +Cc: emacs-devel

On Mon, Sep 12, 2011 at 9:32 AM, Donald Curtis <dcurtis@gmail.com> wrote:
> 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.

For the record, this is a commonly-requested feature where people ask
"why doesn't it do this?" and the response is generally "I dunno, but
it shouldn't be hard to implement; why don't you try?" =)

Would be great to get this in once the feature freeze has melted.
What's the procedure for handling patches in this situation? Just ask
the author to re-submit after the release?

-Phil



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: First attempt at package-update-all for package.el
  2011-09-14 19:05 ` Phil Hagelberg
@ 2011-09-14 20:06   ` Chong Yidong
  2011-09-15  2:14     ` Chong Yidong
  0 siblings, 1 reply; 4+ messages in thread
From: Chong Yidong @ 2011-09-14 20:06 UTC (permalink / raw)
  To: Phil Hagelberg; +Cc: Donald Curtis, emacs-devel

Phil Hagelberg <phil@hagelb.org> writes:

> For the record, this is a commonly-requested feature where people ask
> "why doesn't it do this?" and the response is generally "I dunno, but
> it shouldn't be hard to implement; why don't you try?" =)
>
> Would be great to get this in once the feature freeze has melted.
> What's the procedure for handling patches in this situation? Just ask
> the author to re-submit after the release?

I've discussed with Stefan, and we agree that it's important to have
something like this in 24.1.  I'll take care of it shortly.




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: First attempt at package-update-all for package.el
  2011-09-14 20:06   ` Chong Yidong
@ 2011-09-15  2:14     ` Chong Yidong
  0 siblings, 0 replies; 4+ messages in thread
From: Chong Yidong @ 2011-09-15  2:14 UTC (permalink / raw)
  To: Phil Hagelberg; +Cc: Donald Curtis, emacs-devel

Chong Yidong <cyd@stupidchicken.com> writes:

> Phil Hagelberg <phil@hagelb.org> writes:
>
>> For the record, this is a commonly-requested feature where people ask
>> "why doesn't it do this?" and the response is generally "I dunno, but
>> it shouldn't be hard to implement; why don't you try?" =)
>>
>> Would be great to get this in once the feature freeze has melted.
>> What's the procedure for handling patches in this situation? Just ask
>> the author to re-submit after the release?
>
> I've discussed with Stefan, and we agree that it's important to have
> something like this in 24.1.  I'll take care of it shortly.

OK, I've committed a package-menu-mark-upgrades command to the Package
Menu, bound to U.  This places the appropriate flags for upgrading
packages that can be upgraded.  M-x list-packages also issues a message
if any packages can be upgraded.

As for a M-x package-upgrade-all command, I'm not sure yet.  The code
written by OP is on the right track, but it also needs some additional
machinery for displaying what packages are going to be upgraded
(possibly using a Package Menu buffer?) and prompting the user.



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-09-15  2:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-12 16:32 First attempt at package-update-all for package.el Donald Curtis
2011-09-14 19:05 ` Phil Hagelberg
2011-09-14 20:06   ` Chong Yidong
2011-09-15  2:14     ` Chong Yidong

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).