From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#13291: The package description buffer needs an URL button Date: Mon, 11 Mar 2013 13:40:06 -0400 Message-ID: References: <50DDAF17.7020602@yandex.ru> <50F26A91.1090905@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1363023675 1546 80.91.229.3 (11 Mar 2013 17:41:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 11 Mar 2013 17:41:15 +0000 (UTC) Cc: 13291@debbugs.gnu.org To: Dmitry Gutov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Mar 11 18:41:40 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UF6jD-0001Ik-AV for geb-bug-gnu-emacs@m.gmane.org; Mon, 11 Mar 2013 18:41:39 +0100 Original-Received: from localhost ([::1]:38913 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UF6ir-0006mi-4t for geb-bug-gnu-emacs@m.gmane.org; Mon, 11 Mar 2013 13:41:17 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:51705) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UF6ij-0006lf-OB for bug-gnu-emacs@gnu.org; Mon, 11 Mar 2013 13:41:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UF6ih-0007k6-Mg for bug-gnu-emacs@gnu.org; Mon, 11 Mar 2013 13:41:09 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:42549) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UF6ih-0007k2-In for bug-gnu-emacs@gnu.org; Mon, 11 Mar 2013 13:41:07 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1UF6ja-0003vP-H4 for bug-gnu-emacs@gnu.org; Mon, 11 Mar 2013 13:42:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 11 Mar 2013 17:42:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13291 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 13291-submit@debbugs.gnu.org id=B13291.136302367115022 (code B ref 13291); Mon, 11 Mar 2013 17:42:02 +0000 Original-Received: (at 13291) by debbugs.gnu.org; 11 Mar 2013 17:41:11 +0000 Original-Received: from localhost ([127.0.0.1]:46658 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UF6il-0003uE-0Z for submit@debbugs.gnu.org; Mon, 11 Mar 2013 13:41:11 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:1150) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UF6ii-0003tw-7n for 13291@debbugs.gnu.org; Mon, 11 Mar 2013 13:41:09 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFHO+KL9/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLDiYSFBgNJIgeBsEtkQoDklsDkhyBXoMT X-IPAS-Result: Av4EABK/CFHO+KL9/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLDiYSFBgNJIgeBsEtkQoDklsDkhyBXoMT X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="4227660" Original-Received: from 206-248-162-253.dsl.teksavvy.com (HELO ceviche.home) ([206.248.162.253]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 11 Mar 2013 13:40:04 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id 36823660E5; Mon, 11 Mar 2013 13:40:06 -0400 (EDT) In-Reply-To: <50F26A91.1090905@yandex.ru> (Dmitry Gutov's message of "Sun, 13 Jan 2013 12:04:33 +0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:72324 Archived-At: > And here's the updated patch for package.el, with saving the new metadata > to -pkg.el file when a single-file package is being installed, and with > support for it in `package-install-file'. Sorry for taking so long. Here are some comments. > +(require 'cl-lib) AFAICT, you only do that for cl-cddddr, but: - cl-cddddr only requires cl-lib at compile-time. - "nthcdr 4" is both shorter and faster. > -The vector DESC has the form [VERSION-LIST REQS DOCSTRING]. > +The vector DESC has the form [VERSION-LIST REQS DOCSTRING META]. [...] > + META is a property list mapping metadata keywords to values. VERSION-LIST, REQS, and DOCSTRING are also metadata, so I'd call the new entry something like EXTRA or EXTRA-PROPS rather than META. Also, I'd personally use an alist rather than a plist, tho it's largely a question of taste (I prefer alist because they have a bit more structure, which in turn lets you use things like mapcar, memq, dolist, ... on them). [ From a theoretical efficiency viewpoint they are also half as deep as plists, so in an "ideal" PRAM world, they'd be about twice as fast, although in reality I doubt there is any measurable difference. ] > (defsubst package-desc-kind (desc) > "Extract the kind of download from an archive package description vector." > + (plist-get (package-desc-meta desc) :kind)) > + > +(defsubst package-desc-meta (desc) > + "Extract the metadata property list from a package description vector." > (aref desc 3)) Hmm... does that mean that the 4th field of each vector in `archive-contents' is changed from holding either `tar' or `single' to holding a plist? Why not add a 5th field instead? > (defun define-package (name-string version-string > &optional docstring requirements > - &rest _extra-properties) > + &rest extra-properties) [...] > -EXTRA-PROPERTIES is currently unused." > +EXTRA-PROPERTIES is a property list mapping additional metadata > +keywords (e.g. `:homepage') to values." I guess here I agree that a plist is more convenient for the package maintainer. Stefan