all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Jorgen Schäfer" <contact@jorgenschaefer.de>
To: bruce.connor.am@gmail.com
Cc: emacs-devel <emacs-devel@gnu.org>
Subject: Re: [Emacs-diffs] master b689b90: Package archives now have priorities.
Date: Sat, 17 Jan 2015 12:02:17 +0100	[thread overview]
Message-ID: <CALqDrSebFLH8nE1eAAUc98oUA6i_qVeG2hs59bNrYtxbF=hC7w@mail.gmail.com> (raw)
In-Reply-To: <CAAdUY-Jrza3Y020RHmHm1TPfCTAZs0-44GcoLCXcVDK4gE=CKw@mail.gmail.com>

On Sat, Jan 17, 2015 at 12:48 AM, Artur Malabarba
<bruce.connor.am@gmail.com> wrote:
>> +(defcustom package-archive-priorities nil
>> +  "An alist of priorities for packages.
>> +
>> +Each element has the form (ARCHIVE-ID . PRIORITY).
>> +
>> +When installing packages, the package with the highest version
>> +number from the archive with the highest priority is
>> +selected. When higher versions are available from archives with
>> +lower priorities, the user has to select those manually.
>> +
>> +Archives not in this list have the priority 0."
>> +  :type 'integer
> I think you meant 'alist?

Indeed, thanks for catching this. Fixed in d80fed.

>> +(defun package--add-to-alist (pkg-desc alist)
>> +  "Add PKG-DESC to ALIST.
>> +
>> +Packages are grouped by name. The package descriptions are sorted
>> +by version number."
>> +  (let* ((name (package-desc-name pkg-desc))
>> +         (priority-version (package-desc-priority-version pkg-desc))
>> +         (existing-packages (assq name alist)))
>> +    (if (not existing-packages)
>> +        (cons (list name pkg-desc)
> This list should be a cons, probably why the test is failing.

Why should this be a cons? The alist maps package names to ordered
package descriptors – I guess (cons name (list pkg-desc)) would be
clearer in intent.

Regards,
Jorgen



  reply	other threads:[~2015-01-17 11:02 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20150116102411.11014.8945@vcs.savannah.gnu.org>
     [not found] ` <E1YC44Z-0002sG-4a@vcs.savannah.gnu.org>
2015-01-16 19:10   ` [Emacs-diffs] master b689b90: Package archives now have priorities Glenn Morris
2015-01-16 19:33     ` Jorgen Schäfer
2015-01-16 20:09       ` Glenn Morris
2015-01-19 21:40       ` Glenn Morris
2015-01-20  9:03         ` Jorgen Schäfer
2015-01-20 15:26           ` Dmitry Gutov
2015-01-20 17:11             ` Jorgen Schäfer
2015-01-20 17:19               ` Dmitry Gutov
2015-01-21 20:06           ` Glenn Morris
2015-01-16 23:48   ` Artur Malabarba
2015-01-17 11:02     ` Jorgen Schäfer [this message]
2015-01-17 12:12       ` [Emacs-diffs] " Artur Malabarba
2015-01-17 12:27         ` Jorgen Schäfer
2015-01-17 14:11         ` Stefan Monnier
2015-01-17 21:44           ` Stephen J. Turnbull

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='CALqDrSebFLH8nE1eAAUc98oUA6i_qVeG2hs59bNrYtxbF=hC7w@mail.gmail.com' \
    --to=contact@jorgenschaefer.de \
    --cc=bruce.connor.am@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.