From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Noam Postavsky Newsgroups: gmane.emacs.bugs Subject: bug#17403: 24.4.50; package-alist doc-string error Date: Sun, 14 Jul 2019 10:26:36 -0400 Message-ID: <87d0ic1ylf.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="243678"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2.90 (gnu/linux) Cc: Richard Kim , 17403@debbugs.gnu.org To: Stefan Kangas Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jul 14 16:27:13 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hmfT7-0011DI-6h for geb-bug-gnu-emacs@m.gmane.org; Sun, 14 Jul 2019 16:27:13 +0200 Original-Received: from localhost ([::1]:60816 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hmfT1-0004R3-9y for geb-bug-gnu-emacs@m.gmane.org; Sun, 14 Jul 2019 10:27:07 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48591) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hmfSx-0004P9-Gh for bug-gnu-emacs@gnu.org; Sun, 14 Jul 2019 10:27:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hmfSw-0002do-IE for bug-gnu-emacs@gnu.org; Sun, 14 Jul 2019 10:27:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:36753) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hmfSw-0002di-EK for bug-gnu-emacs@gnu.org; Sun, 14 Jul 2019 10:27:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hmfSw-0000OV-AQ for bug-gnu-emacs@gnu.org; Sun, 14 Jul 2019 10:27:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Noam Postavsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 14 Jul 2019 14:27:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17403 X-GNU-PR-Package: emacs Original-Received: via spool by 17403-submit@debbugs.gnu.org id=B17403.15631144041464 (code B ref 17403); Sun, 14 Jul 2019 14:27:02 +0000 Original-Received: (at 17403) by debbugs.gnu.org; 14 Jul 2019 14:26:44 +0000 Original-Received: from localhost ([127.0.0.1]:45569 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hmfSe-0000NW-Ag for submit@debbugs.gnu.org; Sun, 14 Jul 2019 10:26:44 -0400 Original-Received: from mail-io1-f67.google.com ([209.85.166.67]:36667) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hmfSd-0000NL-CY for 17403@debbugs.gnu.org; Sun, 14 Jul 2019 10:26:43 -0400 Original-Received: by mail-io1-f67.google.com with SMTP id o9so30217864iom.3 for <17403@debbugs.gnu.org>; Sun, 14 Jul 2019 07:26:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=75ylSFuSj7luA0UC14/ZquWBK6mqgbqlt6rgyG+H0G4=; b=YKdweDYwyQKu3XGH22mQR5lNV8ZxTVctATX4AlCzcZ3vAasnybNTwsjc4zlD9xNnII DOYcyT57ZH1UBXSEbNfizXyWX2qEhp17J2HrCylkou00RgxVmtTZjRbcH89di59wePok l/VasICfKnF5wwU/SDssgzqnDy3KKS8NY0Xj3xYx3L2RMqWnYNleLTiBXJGZvY1wH9fU 8KR63TLUOKEE8DZceSCwDtYZj5dQccYqBHibxtRy2qm8PjW/CWrEJXl6kqrJO5gs2c5v LJz+fB0KNJqAfKYDW55yaYHZOneBAWVkY8zaKby0YDnyIz2sAobULrDlFQ9pOPcXuXsr dLlQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=75ylSFuSj7luA0UC14/ZquWBK6mqgbqlt6rgyG+H0G4=; b=l1J4RxAz5IAETGBDaYkscsMMT5cIg/TKmxpiMLxslPVnDxgxs4vyb+dfoUrRcPcohv SIOYl0Mp94PqKjujOAfFienLru9OjZf1wWOa1zMMuDCYFYyjHKJxXjYt/MJzUcBO4rfi KsHcjvw1xXiMtVI0RwGXS3ouHctMGe34ffND3EROdbesqwWLnvgEfRaTEplVZhqmt/R8 NFVF2DAjWFsXLwNfGXovGoDaFmP8z4Fy+gcVxkcrj6q9Ap8l7oJ4XDFUVdih4su1eRd7 kkTiupvCyuT/Ndfpj3RwCYS2e1R1cGsc1FrojO9iIz+1ZzbuDhOK7m7sHLMaIhv97IPh Taww== X-Gm-Message-State: APjAAAV/rREcj42OLqMSvt+xtTUB/7cdsZYXKsYwOtW6hE6qtfF1Fqrb BL82jfa/ayVqD9XWBT+iwImazwUC X-Google-Smtp-Source: APXvYqxdiyJI5QKCN7JCKK9rRIVQ1uHg3ii5pQ5EeSti0W+HlTj5SwZa5DfVngzIMywneaXoFMziNg== X-Received: by 2002:a5d:9e49:: with SMTP id i9mr19243588ioi.290.1563114397677; Sun, 14 Jul 2019 07:26:37 -0700 (PDT) Original-Received: from minid (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34]) by smtp.gmail.com with ESMTPSA id s10sm44632010iod.46.2019.07.14.07.26.37 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 14 Jul 2019 07:26:37 -0700 (PDT) In-Reply-To: (Stefan Kangas's message of "Sun, 14 Jul 2019 05:22:04 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:162986 Archived-At: Stefan Kangas writes: > Richard Kim writes: > >> I believe the doc-string for package-alist is incorrect. >> Each element is (PKG DESCS) rather than (PKG . DESCS), i.e., >> each item is (list PKG DESCS) rather than (cons PKG DESCS). >> To fix this, the patch shown below can be applied. > > You are correct. There is indeed a difference between what the > documentation says and what the code does. According to the code, > package-alist is *not* an alist, but a list of lists. (This goes back > to at least 2013 AFAICT.) > > Yet it has the suffix "-alist". The only structural requirement for "alist"ness is to be a list of conses. As long as none of the lists are empty, a list of lists is (or can be viewed as) an alist. I don't think there is a bug here, just a misunderstanding of dot notation. >> My assertion is confirmed by the following code from package.el: >> >> (defun package-process-define-package (exp origin) >> ... >> ;; If there's no old package, just add this to `package-alist'. >> (push (list name new-pkg-desc) package-alist) Note that this is equivalent to this: (push (cons name (list new-pkg-desc)) package-alist)