From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 28 09:40:41 2012 Received: (at submit) by debbugs.gnu.org; 28 Dec 2012 14:40:41 +0000 Received: from localhost ([127.0.0.1]:34610 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tob72-0002Vt-0U for submit@debbugs.gnu.org; Fri, 28 Dec 2012 09:40:41 -0500 Received: from eggs.gnu.org ([208.118.235.92]:54764) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tob6w-0002Vh-TE for submit@debbugs.gnu.org; Fri, 28 Dec 2012 09:40:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tob5z-0002Ha-9T for submit@debbugs.gnu.org; Fri, 28 Dec 2012 09:39:41 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW,T_DKIM_INVALID autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:56749) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tob5z-0002HW-73 for submit@debbugs.gnu.org; Fri, 28 Dec 2012 09:39:35 -0500 Received: from eggs.gnu.org ([208.118.235.92]:37834) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tob5t-0002m9-Qv for bug-gnu-emacs@gnu.org; Fri, 28 Dec 2012 09:39:35 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tob5g-0002CZ-Ga for bug-gnu-emacs@gnu.org; Fri, 28 Dec 2012 09:39:29 -0500 Received: from mail-la0-f51.google.com ([209.85.215.51]:52511) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tob5g-0002CU-8p for bug-gnu-emacs@gnu.org; Fri, 28 Dec 2012 09:39:16 -0500 Received: by mail-la0-f51.google.com with SMTP id fj20so896531lab.38 for ; Fri, 28 Dec 2012 06:39:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:message-id:date:from:user-agent:mime-version:to :subject:content-type:content-transfer-encoding; bh=b+T5L2NTDqVPSHZn3tYreGAvCo1qaWjcsUWavy/DoYA=; b=eFFpbGvq0UFYiq9ckGMPJsI3Mo5t/JSrM0R630R71boTbYOgbwo5hW/+S9dI/RPRK2 HgPARMUhk8pYUOTXN5Ij56w8WLvnSdZukDkZpdmV5hKTj6kR1KskVlVjzlo70XNOaIxn lvF3yzf5fWz+rSHsRixWDe/BuUJdotWilVU7snCVF8kal/CFHCL2rhTZCMPwLaxe2sTg cSxL8pU25bezk6QE278+2ibXlDlAbGu5UWnfCKrzRe8VDNGr+WwcqQOdASsqyVXu4Ze9 h6frra0Er/EbpllWFSnHYzS7NhpkS5848v4Kn8G/aw/C+ekWdIxyyt3KvV95s+jrArfK QALA== X-Received: by 10.152.108.37 with SMTP id hh5mr31640145lab.52.1356705554969; Fri, 28 Dec 2012 06:39:14 -0800 (PST) Received: from [127.0.0.1] ([178.252.98.87]) by mx.google.com with ESMTPS id ml1sm12377463lab.15.2012.12.28.06.39.12 (version=SSLv3 cipher=OTHER); Fri, 28 Dec 2012 06:39:13 -0800 (PST) Message-ID: <50DDAF17.7020602@yandex.ru> Date: Fri, 28 Dec 2012 18:39:19 +0400 From: Dmitry Gutov User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: bug-gnu-emacs@gnu.org Subject: The package description buffer needs an URL button Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 208.118.235.17 X-Spam-Score: -3.4 (---) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.2 (----) We can get the addresses from the semi-standard URL header, it's mentioned on these two pages, so at least some people are using it: http://emacswiki.org/emacs/AutomaticFileHeaders http://marmalade-repo.org/doc-files/package.5.html#SINGLE-FILE-PACKAGES Plus, when the header's absent, the package repository can try to add the field automatically. Melpa can derive it from the recipe settings, and GNU Elpa can at least show links to the repository browser. Or maybe to the pages at elpa.gnu.org. They basically contain the same information as the description buffer, though, so probably not. Also see https://github.com/milkypostman/melpa/issues/424. Any opposing opinions? --Dmitry From debbugs-submit-bounces@debbugs.gnu.org Fri Jan 11 22:29:08 2013 Received: (at 13291) by debbugs.gnu.org; 12 Jan 2013 03:29:08 +0000 Received: from localhost ([127.0.0.1]:56005 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TtrmO-00070Y-7t for submit@debbugs.gnu.org; Fri, 11 Jan 2013 22:29:08 -0500 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:40183) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TtrmL-000705-Tw for 13291@debbugs.gnu.org; Fri, 11 Jan 2013 22:29:07 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AtkGAG6Zu09FpZpV/2dsb2JhbABEgXuyFoEIghUBAQQBViMFCwsOJhIUGA0kiBwFugmQRAOIQo1ojQmBWIMH X-IronPort-AV: E=Sophos;i="4.75,637,1330923600"; d="scan'208";a="212347455" Received: from 69-165-154-85.dsl.teksavvy.com (HELO pastel.home) ([69.165.154.85]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 11 Jan 2013 22:28:50 -0500 Received: by pastel.home (Postfix, from userid 20848) id C33B15943D; Fri, 11 Jan 2013 22:28:49 -0500 (EST) From: Stefan Monnier To: Dmitry Gutov Subject: Re: bug#13291: The package description buffer needs an URL button Message-ID: References: <50DDAF17.7020602@yandex.ru> Date: Fri, 11 Jan 2013 22:28:49 -0500 In-Reply-To: <50DDAF17.7020602@yandex.ru> (Dmitry Gutov's message of "Fri, 28 Dec 2012 18:39:19 +0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.8 (/) X-Debbugs-Envelope-To: 13291 Cc: 13291@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: 0.8 (/) I don't see any problem with this idea. > Elpa can at least show links to the repository browser. > Or maybe to the pages at elpa.gnu.org. It should point to the pages at elpa.gnu.org. > They basically contain the same information as the description buffer, > though, so probably not. The are meant to be the "canonical page" for the package. Admittedly, they seem to contain the same info as the description buffer, but they already contain a bit more info (a pointer to the repository browser, a list of past revisions) and that could grow over time. Stefan From debbugs-submit-bounces@debbugs.gnu.org Sat Jan 12 02:41:26 2013 Received: (at 13291) by debbugs.gnu.org; 12 Jan 2013 07:41:26 +0000 Received: from localhost ([127.0.0.1]:56164 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TtviY-0005XL-5w for submit@debbugs.gnu.org; Sat, 12 Jan 2013 02:41:26 -0500 Received: from mail-la0-f53.google.com ([209.85.215.53]:55349) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TtviT-0005X5-B1 for 13291@debbugs.gnu.org; Sat, 12 Jan 2013 02:41:23 -0500 Received: by mail-la0-f53.google.com with SMTP id fn20so2425004lab.40 for <13291@debbugs.gnu.org>; Fri, 11 Jan 2013 23:41:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type; bh=aufoxHViTWsyd33g/gJsJ/2+09Xi828wdf1nDil4JLc=; b=FyA09WvxKW+I72Bi4Op7vdM+QaMdgSbc/emzbVDci9Wr+vg9YM8r6jY/klbK74aH8w IUZo23lMJ7/VP3zU0CwTE+YtJKaE/MjJyXVGw9TC1nVQQWubirGaaAqgMUzDtsStCrgT FLoK/v1ydt7qLOT3V3w6hBKI39tC8LeOTBy0jSFDD9t2yBCif222/DGBmsA4QLzt9/Hv x6o7xn0iQbWzZeqmCfEWPm5tIaj27Yl1RH88nTwB3GU2DKwrglT5NiL6N4UxPrGcuBCz vb7tcRsoIE19i8fnbYZad8n8JE3wI05sDWE0/bXK3hYam/lUnDlRnseaKx0+spKB+0S1 zbKA== X-Received: by 10.152.108.12 with SMTP id hg12mr15246500lab.43.1357976463774; Fri, 11 Jan 2013 23:41:03 -0800 (PST) Received: from [127.0.0.1] ([178.252.98.87]) by mx.google.com with ESMTPS id u5sm2897722lbm.8.2013.01.11.23.41.01 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 11 Jan 2013 23:41:02 -0800 (PST) Message-ID: <50F11390.3000205@yandex.ru> Date: Sat, 12 Jan 2013 11:41:04 +0400 From: Dmitry Gutov User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130107 Thunderbird/17.0.2 MIME-Version: 1.0 To: Stefan Monnier Subject: Re: bug#13291: The package description buffer needs an URL button References: <50DDAF17.7020602@yandex.ru> In-Reply-To: Content-Type: multipart/mixed; boundary="------------050909040406050205000200" X-Spam-Score: 0.1 (/) X-Debbugs-Envelope-To: 13291 Cc: 13291@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) This is a multi-part message in MIME format. --------------050909040406050205000200 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit On 12.01.2013 7:28, Stefan Monnier wrote: > I don't see any problem with this idea. Terrific. Patch attached. Note that I haven't tested it with an actual package repository supporting this extension, just with modified -pkg.el and archive-contents files. >> Elpa can at least show links to the repository browser. >> Or maybe to the pages at elpa.gnu.org. > > It should point to the pages at elpa.gnu.org. > >> They basically contain the same information as the description buffer, >> though, so probably not. > > The are meant to be the "canonical page" for the package. Admittedly, > they seem to contain the same info as the description buffer, but they > already contain a bit more info (a pointer to the repository browser, a list > of past revisions) and that could grow over time. Sounds good to me. Hopefully, the code responsible for it will take care of the case when those pages are not in fact canonical, like org, auctex, etc. --------------050909040406050205000200 Content-Type: text/plain; charset=windows-1251; name="package-homepage-button.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="package-homepage-button.diff" === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-01-11 23:24:52 +0000 +++ lisp/ChangeLog 2013-01-12 07:33:28 +0000 @@ -1,3 +1,16 @@ +2013-01-12 Dmitry Gutov + + * emacs-lisp/package.el (package-desc-kind): Get the kind from the + metadata plist. + (package-desc-meta): Return metadata plist. + (define-package): Store EXTRA-PROPERTIES as the 4th element of + the package data vector. + (package--add-to-archive-contents): Instead of just package kind, + use the 4th element of the vector for the matadata. Include kind + in the metadata. + (describe-package-1): When the package metadata includes + `:homepage', display a link button for it (bug#13291). + 2013-01-11 Felix H. Dahlke * progmodes/js.el: Fix multiline declarations's indentation (bug#8576). === modified file 'lisp/emacs-lisp/package.el' --- lisp/emacs-lisp/package.el 2013-01-01 09:11:05 +0000 +++ lisp/emacs-lisp/package.el 2013-01-12 07:23:54 +0000 @@ -302,12 +302,13 @@ Each element has the form (PKG . DESC), where PKG is a package name (a symbol) and DESC is a vector that describes the package. -The vector DESC has the form [VERSION-LIST REQS DOCSTRING]. +The vector DESC has the form [VERSION-LIST REQS DOCSTRING META]. VERSION-LIST is a version list. REQS is a list of packages required by the package, each requirement having the form (NAME VL) where NAME is a string and VL is a version list. DOCSTRING is a brief description of the package. + META is a property list mapping metadata keywords to values. This variable is set automatically by `package-load-descriptor', called via `package-initialize'. To change which packages are @@ -426,6 +427,10 @@ (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)) (defun package--dir (name version) @@ -525,7 +530,7 @@ (defun define-package (name-string version-string &optional docstring requirements - &rest _extra-properties) + &rest extra-properties) "Define a new package. NAME-STRING is the name of the package, as a string. VERSION-STRING is the version of the package, as a string. @@ -533,8 +538,8 @@ REQUIREMENTS is a list of dependencies on other packages. Each requirement is of the form (OTHER-PACKAGE OTHER-VERSION), where OTHER-VERSION is a string. - -EXTRA-PROPERTIES is currently unused." +EXTRA-PROPERTIES is a property list mapping additional metadata +keywords (e.g. `:homepage') to values." (let* ((name (intern name-string)) (version (version-to-list version-string)) (new-pkg-desc @@ -545,7 +550,8 @@ (list (car elt) (version-to-list (car (cdr elt))))) requirements) - docstring))) + docstring + extra-properties))) (old-pkg (assq name package-alist))) (cond ;; If there's no old package, just add this to `package-alist'. @@ -853,8 +859,15 @@ Also, add the originating archive to the end of the package vector." (let* ((name (car package)) (version (package-desc-vers (cdr package))) + (data (append (cdr package) nil)) + (ex-len (- (length data) 3)) + (extras (last data ex-len)) (entry (cons name - (vconcat (cdr package) (vector archive)))) + (vconcat (nbutlast data ex-len) + ;; Save the kind and any following + ;; keyword-value pairs as metadata. + (vector (cons :kind extras) + archive)))) (existing-package (assq name package-archive-contents))) (cond ((not existing-package) (add-to-list 'package-archive-contents entry)) @@ -1261,7 +1274,13 @@ (help-insert-xref-button text 'help-package name)) (insert "\n"))) (insert " " (propertize "Summary" 'font-lock-face 'bold) - ": " (if desc (package-desc-doc desc)) "\n\n") + ": " (if desc (package-desc-doc desc)) "\n") + (let ((homepage (plist-get (package-desc-meta desc) :homepage))) + (when homepage + (insert " " (propertize "Homepage" 'font-lock-face 'bold) ": ") + (help-insert-xref-button homepage 'help-url homepage) + (insert "\n"))) + (insert "\n") (if built-in ;; For built-in packages, insert the commentary. --------------050909040406050205000200-- From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 13 01:49:38 2013 Received: (at 13291) by debbugs.gnu.org; 13 Jan 2013 06:49:39 +0000 Received: from localhost ([127.0.0.1]:57543 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TuHNy-0006Yg-Av for submit@debbugs.gnu.org; Sun, 13 Jan 2013 01:49:38 -0500 Received: from mail-we0-f181.google.com ([74.125.82.181]:44499) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TuHNu-0006YO-Ee for 13291@debbugs.gnu.org; Sun, 13 Jan 2013 01:49:36 -0500 Received: by mail-we0-f181.google.com with SMTP id t11so1502901wey.26 for <13291@debbugs.gnu.org>; Sat, 12 Jan 2013 22:49:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type; bh=1+iqqdUHaiBTLTf/TUbJPhGrJqlO+THycE61XGfSXuQ=; b=Q0NnuZNr5PcMWIjGxlY21+/dXDT/KJFT387Z0POujitaAFz4FTENls5aW77dNecunr 9/ZUrhPFomZaMfnaIZDbTdnLoUZHPHyXrubPPRj4DeQwIN7hlPbv1TG0dU51hd5agrra ch0SvxgCsE27mxwvD1z/M/xnt9o/WP5Mm0AYQrh6YyxYlI9LQh4ZOhJgHTgx8+MepiDQ 0GW6h8cayWlRiPp/vi7V0oThftTsg0e+U6Wnn8CHmsplGLm/ieaUX4znwMa5sMj1sMm2 XxHUilSHhZPIcijBOoHAwQf0nQqiorGXU0pTkPxTJyN10VhLqXs0gIr9lswc3ABDqIyk rbhQ== X-Received: by 10.194.57.206 with SMTP id k14mr128680049wjq.26.1358059752045; Sat, 12 Jan 2013 22:49:12 -0800 (PST) Received: from [127.0.0.1] ([178.252.98.87]) by mx.google.com with ESMTPS id l5sm7494372wia.10.2013.01.12.22.49.09 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 12 Jan 2013 22:49:10 -0800 (PST) Message-ID: <50F258E7.4040908@yandex.ru> Date: Sun, 13 Jan 2013 10:49:11 +0400 From: Dmitry Gutov User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130107 Thunderbird/17.0.2 MIME-Version: 1.0 To: Stefan Monnier Subject: Re: bug#13291: The package description buffer needs an URL button References: <50DDAF17.7020602@yandex.ru> In-Reply-To: Content-Type: multipart/mixed; boundary="------------010706040507020908080400" X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 13291 Cc: 13291@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) This is a multi-part message in MIME format. --------------010706040507020908080400 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Here's a rough patch for elpa/admin/archive-contents.el --------------010706040507020908080400 Content-Type: text/plain; charset=windows-1251; name="archive-contents-homepage.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="archive-contents-homepage.diff" === modified file 'admin/archive-contents.el' (properties changed: -x to +x) --- admin/archive-contents.el 2012-11-29 17:21:45 +0000 +++ admin/archive-contents.el 2013-01-13 06:17:37 +0000 @@ -122,15 +122,16 @@ (defun archive--simple-package-p (dir pkg) "Test whether DIR contains a simple package named PKG. -If so, return a list (VERSION DESCRIPTION REQ COMMENTARY), where -VERSION is the version string of the simple package, DESCRIPTION -is the brief description of the package, REQ is a list of -requirements, and COMMENTARY is the package commentary. +If so, return a list (VERSION DESCRIPTION REQ COMMENTARY +METADATA...), where VERSION is the version string of the simple +package, DESCRIPTION is the brief description of the package, REQ +is a list of requirements, COMMENTARY is the package commentary, +and METADATA is a property list with additional metadata. Otherwise, return nil." (let* ((pkg-file (expand-file-name (concat pkg "-pkg.el") dir)) (mainfile (expand-file-name (concat pkg ".el") dir)) (files (directory-files dir nil archive-re-no-dot)) - version description req commentary) + version description req commentary homepage) (dolist (file (prog1 files (setq files ()))) (unless (string-match "\\.elc\\'" file) (push file files))) @@ -157,11 +158,15 @@ (setq req (mapcar 'archive--convert-require (car (read-from-string requires-str)))))) (setq commentary (lm-commentary)) - (list version description req commentary)))) + (setq homepage (or (lm-homepage) + (format "http://elpa.gnu.org/packages/%s.html" pkg))) + (list version description req commentary + :homepage homepage)))) ((not (file-exists-p pkg-file)) (error "Can find single file nor package desc file in %s" dir))))) -(defun archive--process-simple-package (dir pkg vers desc req commentary) +(defun archive--process-simple-package (dir pkg vers desc req commentary + &rest extra-properties) "Deploy the contents of DIR into the archive as a simple package. Rename DIR/PKG.el to PKG-VERS.el, delete DIR, and write the package commentary to PKG-readme.txt. Return the descriptor." @@ -205,7 +210,9 @@ (save-buffer) (kill-buffer))) (delete-directory dir t) - (cons (intern pkg) (vector (version-to-list vers) req desc 'single))) + (cons (intern pkg) (vconcat + (vector (version-to-list vers) req desc 'single) + extra-properties))) (defun archive--make-changelog (dir) "Export Bzr log info of DIR into a ChangeLog file." @@ -239,7 +246,9 @@ (when (file-exists-p readme) (copy-file readme (concat pkg "-readme.txt") 'ok-if-already-exists)) (rename-file dir (concat pkg "-" vers)) - (cons (intern pkg) (vector (version-to-list vers) req (nth 3 exp) 'tar)))) + (cons (intern pkg) (vconcat + (vector (version-to-list vers) req (nth 3 exp) 'tar) + (cdr (cddddr exp)))))) (defun archive--multi-file-package-def (dir pkg) "Reurn the `define-package' form in the file DIR/PKG-pkg.el." @@ -294,7 +303,8 @@ ;; FIXME: Don't compile the -pkg.el files! (byte-recompile-directory dir 0)))) -(defun archive--write-pkg-file (pkg-dir name version desc requires &rest ignored) +(defun archive--write-pkg-file (pkg-dir name version desc requires + &rest extra-properties) (let ((pkg-file (expand-file-name (concat name "-pkg.el") pkg-dir)) (print-level nil) (print-length nil)) @@ -302,17 +312,19 @@ (concat (format ";; Generated package description from %s.el\n" name) (prin1-to-string - (list 'define-package - name - version - desc - (list 'quote - ;; Turn version lists into string form. - (mapcar - (lambda (elt) - (list (car elt) - (package-version-join (cadr elt)))) - requires)))) + (nconc + (list 'define-package + name + version + desc + (list 'quote + ;; Turn version lists into string form. + (mapcar + (lambda (elt) + (list (car elt) + (package-version-join (cadr elt)))) + requires))) + extra-properties)) "\n") nil pkg-file))) --------------010706040507020908080400-- From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 13 02:40:10 2013 Received: (at 13291) by debbugs.gnu.org; 13 Jan 2013 07:40:10 +0000 Received: from localhost ([127.0.0.1]:57573 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TuIAr-0007pJ-IR for submit@debbugs.gnu.org; Sun, 13 Jan 2013 02:40:10 -0500 Received: from mail-we0-f172.google.com ([74.125.82.172]:64730) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TuDiw-00016J-HR for 13291@debbugs.gnu.org; Sat, 12 Jan 2013 21:55:03 -0500 Received: by mail-we0-f172.google.com with SMTP id r3so1466978wey.31 for <13291@debbugs.gnu.org>; Sat, 12 Jan 2013 18:54:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:message-id:date:from:user-agent:mime-version:to:cc :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=/w0LjC2uSpXMNwEB83q1WzoWVzyH+wu3FELnkTDJ9Cw=; b=YMDLjUC8qmPtL9+q4+e3IWoFc/6JXSPAgmB5icLVv1e0s9OSvuUSAeOX2lXPqthdjy clyyBAad56iWt/T66bEN8doclZ9hb2jw0bkcFeQYliEX96AtEXnBDuqsvqTkWdoHkVEp ogY8zKK2FKFiwt7lJQ6gkrlAsJ0AhOBE8+xGkuImgD0FH5la/qx6si+Tn9i4+mXZOAQk jULLvVstInt60s3f/e6DTjTQD1ljaOy6CL32f6zGoyvExGaavGYHjzPs3fQ+v+yHJdg0 Di8e7R5S/Sw81cwV8cjsj1Hu5R5wHIF8mFnJXZhw1mFQ3nrDrWEC5XkaO2pJRNEum1NC FM3A== X-Received: by 10.194.158.100 with SMTP id wt4mr25312946wjb.37.1358045679775; Sat, 12 Jan 2013 18:54:39 -0800 (PST) Received: from [127.0.0.1] ([178.252.98.87]) by mx.google.com with ESMTPS id h19sm6354694wiv.7.2013.01.12.18.54.37 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 12 Jan 2013 18:54:38 -0800 (PST) Message-ID: <50F221EE.7070000@gmail.com> Date: Sun, 13 Jan 2013 06:54:38 +0400 From: Dmitry Gutov User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130107 Thunderbird/17.0.2 MIME-Version: 1.0 To: Dmitry Gutov Subject: Re: bug#13291: The package description buffer needs an URL button References: <50DDAF17.7020602@yandex.ru> <50F11390.3000205@yandex.ru> In-Reply-To: <50F11390.3000205@yandex.ru> Content-Type: text/plain; charset=windows-1251; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: 0.1 (/) X-Debbugs-Envelope-To: 13291 X-Mailman-Approved-At: Sun, 13 Jan 2013 02:40:07 -0500 Cc: 13291@debbugs.gnu.org, Stefan Monnier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) On 12.01.2013 11:41, Dmitry Gutov wrote: > On 12.01.2013 7:28, Stefan Monnier wrote: >> I don't see any problem with this idea. > > Terrific. Patch attached. > > Note that I haven't tested it with an actual package repository > supporting this extension, just with modified -pkg.el and > archive-contents files. To clarify, here's how they look: smex-pkg.el: (define-package "smex" "20120915.2041" "M-x interface with Ido-style fuzzy matching. [source: github]" (quote nil) :homepage "https://github.com/nonsequitur/smex") archive-contents: (1 (zotelo . [(20121024 1114) nil "Manage Zotero collections from emacs [source: github]" single :homepage "https://github.com/vitoshka/zotelo"]) ...) From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 13 03:04:59 2013 Received: (at 13291) by debbugs.gnu.org; 13 Jan 2013 08:04:59 +0000 Received: from localhost ([127.0.0.1]:57597 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TuIYs-0008QG-UE for submit@debbugs.gnu.org; Sun, 13 Jan 2013 03:04:59 -0500 Received: from mail-wg0-f46.google.com ([74.125.82.46]:53363) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TuIYp-0008Q2-V8 for 13291@debbugs.gnu.org; Sun, 13 Jan 2013 03:04:57 -0500 Received: by mail-wg0-f46.google.com with SMTP id dr13so1470307wgb.1 for <13291@debbugs.gnu.org>; Sun, 13 Jan 2013 00:04:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type; bh=AVgwzUiBijDnx3TMLMuk+GWYp3TMQxeHDXo0PaNkq4Q=; b=My+rZ877vy0q8RkznpsXB4/BTQ+QoZ3hQV0/i5A7jwLHNQBIU7tpwYheAGU+aMmPUt aaO5FmtvNfjEzFq0AUamX7obIiczAWz5H862593GEKbjjRK1RlsCKA6i4gyac8I2aHlO dxcraoBScqlWl2NnWhZKFnJJcq1ukRy3J98fcFE6SUjbwgP3m1rg7nfUXooTGBARLFqe WMPXpQdBMNblMZNwZdbP4qG5+McMbzTcKGAmsQaTl2VDAwvZErYkZakMKusEOO9hXYza Akn/kOG3MskRZfyQzDQSPzcAp7POnsmH75okmLR2/Ot73J9N3oDls2T+lbZPyEhyCoQW zN6Q== X-Received: by 10.180.82.41 with SMTP id f9mr6628276wiy.25.1358064273286; Sun, 13 Jan 2013 00:04:33 -0800 (PST) Received: from [127.0.0.1] ([178.252.98.87]) by mx.google.com with ESMTPS id g2sm7716220wiy.0.2013.01.13.00.04.30 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 13 Jan 2013 00:04:31 -0800 (PST) Message-ID: <50F26A91.1090905@yandex.ru> Date: Sun, 13 Jan 2013 12:04:33 +0400 From: Dmitry Gutov User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130107 Thunderbird/17.0.2 MIME-Version: 1.0 To: Stefan Monnier Subject: Re: bug#13291: The package description buffer needs an URL button References: <50DDAF17.7020602@yandex.ru> In-Reply-To: Content-Type: multipart/mixed; boundary="------------080104070301070004080806" X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 13291 Cc: 13291@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) This is a multi-part message in MIME format. --------------080104070301070004080806 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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'. Again, probably less tested that it should be. --------------080104070301070004080806 Content-Type: text/plain; charset=windows-1251; name="package-homepage-button.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="package-homepage-button.diff" === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-01-12 19:24:27 +0000 +++ lisp/ChangeLog 2013-01-13 07:54:01 +0000 @@ -1,3 +1,27 @@ +2013-01-13 Dmitry Gutov + + * emacs-lisp/package.el (package-desc-kind): Get the kind from the + metadata plist. + (package-desc-meta): Return metadata plist. + (define-package): Store EXTRA-PROPERTIES as the 4th element of + the package data vector. + (package--add-to-archive-contents): Instead of just package kind, + use the 4th element of the vector for the matadata. Include kind + in the metadata. + (describe-package-1): When the package metadata includes + `:homepage', display a link button for it (bug#13291). + (package-unpack-single): Accept a 5th argument, with metadata. + Appent it to the `define-package' form. + (package-download-single): Accept and pass on the META argument. + (package-download-transaction): Pass the package metadata to + `package-download-single'. + (package-buffer-info): Return the package metadata (currently with + just homepage) as the 6th vector argument. + (package-tar-file-info): Same. Like most of the elements of the + returned vector, though, it won't be used by the caller. + (package-install-from-buffer): Get package metadata from PKG-INFO + and pass it to `package-unpack-single'. + 2013-01-12 Michael Albinus * autorevert.el (auto-revert-notify-watch-descriptor): Give it === modified file 'lisp/emacs-lisp/package.el' --- lisp/emacs-lisp/package.el 2013-01-01 09:11:05 +0000 +++ lisp/emacs-lisp/package.el 2013-01-13 07:44:34 +0000 @@ -170,6 +170,7 @@ ;;; Code: (require 'tabulated-list) +(require 'cl-lib) (defgroup package nil "Manager for Emacs Lisp packages." @@ -302,12 +303,13 @@ Each element has the form (PKG . DESC), where PKG is a package name (a symbol) and DESC is a vector that describes the package. -The vector DESC has the form [VERSION-LIST REQS DOCSTRING]. +The vector DESC has the form [VERSION-LIST REQS DOCSTRING META]. VERSION-LIST is a version list. REQS is a list of packages required by the package, each requirement having the form (NAME VL) where NAME is a string and VL is a version list. DOCSTRING is a brief description of the package. + META is a property list mapping metadata keywords to values. This variable is set automatically by `package-load-descriptor', called via `package-initialize'. To change which packages are @@ -426,6 +428,10 @@ (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)) (defun package--dir (name version) @@ -525,7 +531,7 @@ (defun define-package (name-string version-string &optional docstring requirements - &rest _extra-properties) + &rest extra-properties) "Define a new package. NAME-STRING is the name of the package, as a string. VERSION-STRING is the version of the package, as a string. @@ -533,8 +539,8 @@ REQUIREMENTS is a list of dependencies on other packages. Each requirement is of the form (OTHER-PACKAGE OTHER-VERSION), where OTHER-VERSION is a string. - -EXTRA-PROPERTIES is currently unused." +EXTRA-PROPERTIES is a property list mapping additional metadata +keywords (e.g. `:homepage') to values." (let* ((name (intern name-string)) (version (version-to-list version-string)) (new-pkg-desc @@ -545,7 +551,8 @@ (list (car elt) (version-to-list (car (cdr elt))))) requirements) - docstring))) + docstring + extra-properties))) (old-pkg (assq name package-alist))) (cond ;; If there's no old package, just add this to `package-alist'. @@ -642,7 +649,7 @@ (let ((buffer-file-coding-system 'no-conversion)) (write-region (point-min) (point-max) file-name))) -(defun package-unpack-single (file-name version desc requires) +(defun package-unpack-single (file-name version desc requires meta) "Install the contents of the current buffer as a package." ;; Special case "package". (if (string= file-name "package") @@ -661,17 +668,19 @@ (write-region (concat (prin1-to-string - (list 'define-package - file-name - version - desc - (list 'quote - ;; Turn version lists into string form. - (mapcar - (lambda (elt) - (list (car elt) - (package-version-join (cadr elt)))) - requires)))) + (nconc + (list 'define-package + file-name + version + desc + (list 'quote + ;; Turn version lists into string form. + (mapcar + (lambda (elt) + (list (car elt) + (package-version-join (cadr elt)))) + requires))) + meta)) "\n") nil pkg-file @@ -721,12 +730,12 @@ (end-of-line) (point))))))) -(defun package-download-single (name version desc requires) +(defun package-download-single (name version desc requires meta) "Download and install a single-file package." (let ((location (package-archive-base name)) (file (concat (symbol-name name) "-" version ".el"))) (package--with-work-buffer location file - (package-unpack-single (symbol-name name) version desc requires)))) + (package-unpack-single (symbol-name name) version desc requires meta)))) (defun package-download-tar (name version) "Download and install a tar package." @@ -853,8 +862,15 @@ Also, add the originating archive to the end of the package vector." (let* ((name (car package)) (version (package-desc-vers (cdr package))) + (data (append (cdr package) nil)) + (ex-len (- (length data) 3)) + (extras (last data ex-len)) (entry (cons name - (vconcat (cdr package) (vector archive)))) + (vconcat (nbutlast data ex-len) + ;; Save the kind and any following + ;; keyword-value pairs as metadata. + (vector (cons :kind extras) + archive)))) (existing-package (assq name package-archive-contents))) (cond ((not existing-package) (add-to-list 'package-archive-contents entry)) @@ -886,7 +902,8 @@ ((eq kind 'single) (package-download-single elt v-string (package-desc-doc desc) - (package-desc-reqs desc))) + (package-desc-reqs desc) + (package-desc-meta desc))) (t (error "Unknown package kind: %s" (symbol-name kind)))) ;; If package A depends on package B, then A may `require' B @@ -942,7 +959,7 @@ "Return a vector describing the package in the current buffer. The vector has the form - [FILENAME REQUIRES DESCRIPTION VERSION COMMENTARY] + [FILENAME REQUIRES DESCRIPTION VERSION COMMENTARY META] FILENAME is the file name, a string, sans the \".el\" extension. REQUIRES is a list of requirements, each requirement having the @@ -950,6 +967,7 @@ DESCRIPTION is the package description, a string. VERSION is the version, a string. COMMENTARY is the commentary section, a string, or nil if none. +META is a property list with additional metadata. If the buffer does not contain a conforming package, signal an error. If there is a package, narrow the buffer to the file's @@ -975,7 +993,8 @@ (pkg-version (or (package-strip-rcs-id (lm-header "package-version")) (package-strip-rcs-id (lm-header "version")))) - (commentary (lm-commentary))) + (commentary (lm-commentary)) + (homepage (lm-homepage))) (unless pkg-version (error "Package lacks a \"Version\" or \"Package-Version\" header")) @@ -986,7 +1005,8 @@ (list (car elt) (version-to-list (car (cdr elt))))) requires)) - (vector file-name requires desc pkg-version commentary)))) + (vector file-name requires desc pkg-version commentary + (list :homepage homepage))))) (defun package-tar-file-info (file) "Find package information for a tar file. @@ -1013,6 +1033,7 @@ (version-string (nth 2 pkg-def-parsed)) (docstring (nth 3 pkg-def-parsed)) (requires (nth 4 pkg-def-parsed)) + (meta (cdr (cl-cddddr pkg-def-parsed))) (readme (shell-command-to-string ;; Requires GNU tar. (concat "tar -xOf " file " " @@ -1032,7 +1053,7 @@ (list (car elt) (version-to-list (cadr elt)))) requires)) - (vector pkg-name requires docstring version-string readme))))) + (vector pkg-name requires docstring version-string readme meta))))) ;;;###autoload (defun package-install-from-buffer (pkg-info type) @@ -1052,14 +1073,15 @@ (desc (if (string= (aref pkg-info 2) "") "No description available." (aref pkg-info 2))) - (pkg-version (aref pkg-info 3))) + (pkg-version (aref pkg-info 3)) + (meta (aref pkg-info 5))) ;; Download and install the dependencies. (let ((transaction (package-compute-transaction nil requires))) (package-download-transaction transaction)) ;; Install the package itself. (cond ((eq type 'single) - (package-unpack-single file-name pkg-version desc requires)) + (package-unpack-single file-name pkg-version desc requires meta)) ((eq type 'tar) (package-unpack (intern file-name) pkg-version)) (t @@ -1261,7 +1283,13 @@ (help-insert-xref-button text 'help-package name)) (insert "\n"))) (insert " " (propertize "Summary" 'font-lock-face 'bold) - ": " (if desc (package-desc-doc desc)) "\n\n") + ": " (if desc (package-desc-doc desc)) "\n") + (let ((homepage (plist-get (package-desc-meta desc) :homepage))) + (when homepage + (insert " " (propertize "Homepage" 'font-lock-face 'bold) ": ") + (help-insert-xref-button homepage 'help-url homepage) + (insert "\n"))) + (insert "\n") (if built-in ;; For built-in packages, insert the commentary. --------------080104070301070004080806-- From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 05 12:13:18 2013 Received: (at 13291) by debbugs.gnu.org; 5 Mar 2013 17:13:18 +0000 Received: from localhost ([127.0.0.1]:60941 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UCvQT-0006XB-8A for submit@debbugs.gnu.org; Tue, 05 Mar 2013 12:13:18 -0500 Received: from mail-la0-f42.google.com ([209.85.215.42]:50684) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UCvQM-0006Wn-WB for 13291@debbugs.gnu.org; Tue, 05 Mar 2013 12:13:15 -0500 Received: by mail-la0-f42.google.com with SMTP id fe20so6470626lab.15 for <13291@debbugs.gnu.org>; Tue, 05 Mar 2013 09:12:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:message-id:date:from:user-agent:mime-version:cc:subject :references:in-reply-to:content-type:content-transfer-encoding :x-antivirus:x-antivirus-status; bh=wlpTalTS1Bg5uVsYf4DCVfTSgN90YYdP4SREFfYyGNY=; b=GJYgo0O6POt6kBfBCvzDF7Ce7H1du0nJfdygkY83gNP+Jjs+bQ1131ThUldMsUxS0/ 7gOI6XR9ukp+XzbhOpbbegvgbAXNNG4JQdBFa3u8NMCuBDkxShg1Bx83qFvAE3o+XH51 1mVsPXKHm0woZyIN2FscVrYgYMnJOI7anhRq/QfCKt63AUhW9fRATQkceGqZBsSPqKo+ qsMdsEEmHEk1IKZ+MgS4nGd0Qb1lmelAjn3jsHMrdM5CvaHaG8aumVlR2m7IiAw9SDED +OVvnPUk+65ReufLNKudfnFlCCqbPWuSnsaUVGK61pW/sn8iKLLC9TPE/f9d9KmMEKpF 2DPA== X-Received: by 10.152.46.12 with SMTP id r12mr22205509lam.15.1362503563285; Tue, 05 Mar 2013 09:12:43 -0800 (PST) Received: from [127.0.0.1] ([178.252.98.87]) by mx.google.com with ESMTPS id k15sm8802181lbd.6.2013.03.05.09.12.41 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 05 Mar 2013 09:12:42 -0800 (PST) Message-ID: <5136278C.6000807@gmail.com> Date: Tue, 05 Mar 2013 21:12:44 +0400 From: Dmitry Gutov User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130215 Thunderbird/17.0.3 MIME-Version: 1.0 Subject: Re: bug#13291: The package description buffer needs an URL button References: <50DDAF17.7020602@yandex.ru> <50F26A91.1090905@yandex.ru> In-Reply-To: <50F26A91.1090905@yandex.ru> Content-Type: text/plain; charset=windows-1251; format=flowed Content-Transfer-Encoding: 7bit X-Antivirus: avast! (VPS 130305-0, 05.03.2013), Outbound message X-Antivirus-Status: Clean X-Spam-Score: 1.1 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Hey all, Could someone take a look at package-homepage-button.diff and package-homepage-button.diff I submitted previously? I'd like to install them sometime soon. I'll test them again before installing and will deal with any fallout, so the main issue I'd like an additional opinion on is the changes in the formats of pkg.el and archive-contents files (http://debbugs.gnu.org/cgi/bugreport.cgi?bug=13291#17). [...] Content analysis details: (1.1 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.215.42 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (raaahh[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record 1.0 MISSING_HEADERS Missing To: header 0.8 BAYES_50 BODY: Bayes spam probability is 40 to 60% [score: 0.4993] 0.0 T_DKIM_INVALID DKIM-Signature header exists but is not valid X-Debbugs-Envelope-To: 13291 Cc: 13291@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: 0.3 (/) Hey all, Could someone take a look at package-homepage-button.diff and package-homepage-button.diff I submitted previously? I'd like to install them sometime soon. I'll test them again before installing and will deal with any fallout, so the main issue I'd like an additional opinion on is the changes in the formats of pkg.el and archive-contents files (http://debbugs.gnu.org/cgi/bugreport.cgi?bug=13291#17). For example, is it okay that the definition vectors in archive-contents can be of variable length, or would it be better to keep all extra metadata in one plist, in 4th element? IIRC, I chose the former because the package type (single or not) ends up in the same metadata structure, but changing the format of the 3rd element would break backward compatibility. So it makes some sense to keep the rest of the metadata as separate elements, too. From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 11 13:41:11 2013 Received: (at 13291) by debbugs.gnu.org; 11 Mar 2013 17:41:11 +0000 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 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" 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 Received: by ceviche.home (Postfix, from userid 20848) id 36823660E5; Mon, 11 Mar 2013 13:40:06 -0400 (EDT) From: Stefan Monnier To: Dmitry Gutov Subject: Re: bug#13291: The package description buffer needs an URL button Message-ID: References: <50DDAF17.7020602@yandex.ru> <50F26A91.1090905@yandex.ru> Date: Mon, 11 Mar 2013 13:40:06 -0400 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) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.8 (/) X-Debbugs-Envelope-To: 13291 Cc: 13291@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -0.0 (/) > 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 From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 12 07:50:49 2013 Received: (at 13291) by debbugs.gnu.org; 12 Mar 2013 11:50:49 +0000 Received: from localhost ([127.0.0.1]:48005 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UFNjE-0000ke-U9 for submit@debbugs.gnu.org; Tue, 12 Mar 2013 07:50:49 -0400 Received: from mail-la0-f53.google.com ([209.85.215.53]:37636) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UFNjB-0000kQ-A5 for 13291@debbugs.gnu.org; Tue, 12 Mar 2013 07:50:47 -0400 Received: by mail-la0-f53.google.com with SMTP id fr10so5097594lab.12 for <13291@debbugs.gnu.org>; Tue, 12 Mar 2013 04:49:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding:x-antivirus:x-antivirus-status; bh=lTxm10/KeaIVFwzVoqmq/CXx8frIYOpL9Ef2ANgqHg4=; b=daYx2KvN2rEWL/ZOrzr531gDxloUIYNZhC1hgSWYF52MrbBhWr7Ee90lhlaXkkSHKj F77YSnL9OqaPqqh/QHhNK6L1TTm5DxS01ACn760r9YQ3lOABO+EoXyWbkPEl8JkakqPQ jftPH1l9tDk9D0WzASnGXrVV1oEAqW4xlmj9gnnAxO5GgoinjzU16hEMmUqaCWF0SfZs UQ4M4dkHajGCoAH9OALkZZVeUJisn7yqJGIBIuiGZpAAXVY4OxGYxK0b/+pj8BHzWgri vzOrI1u0zbN5DJbWYQwDM6dEvFwPe2XXytQQsS2RzdtccMhniS6kpiPOHrR1pcLgeCj0 Fe8A== X-Received: by 10.112.16.137 with SMTP id g9mr5968109lbd.119.1363088979525; Tue, 12 Mar 2013 04:49:39 -0700 (PDT) Received: from [127.0.0.1] ([178.252.98.87]) by mx.google.com with ESMTPS id xw14sm9089985lab.6.2013.03.12.04.49.37 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 12 Mar 2013 04:49:38 -0700 (PDT) Message-ID: <513F1650.6070700@yandex.ru> Date: Tue, 12 Mar 2013 15:49:36 +0400 From: Dmitry Gutov User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130307 Thunderbird/17.0.4 MIME-Version: 1.0 To: Stefan Monnier Subject: Re: bug#13291: The package description buffer needs an URL button References: <50DDAF17.7020602@yandex.ru> <50F26A91.1090905@yandex.ru> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Antivirus: avast! (VPS 130312-0, 12.03.2013), Outbound message X-Antivirus-Status: Clean X-Spam-Score: 0.1 (/) X-Debbugs-Envelope-To: 13291 Cc: 13291@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.2 (-) On 11.03.2013 21:40, Stefan Monnier wrote: >> 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. Not a problem, I rather expected some other developers familiar with this package to chime in. >> +(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. Thanks, good to know. I wasn't aware that `nthcdr' is implemented in C. >> -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. Sounds good. > 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. ] Hmm, I kinda assumed that the simpler structure would result in better, not worse, theoretical performance. Food for thought. But I'm not really sure if we're ever going to want to iterate over the extra properties. Right now, where it's accessed, the change to alist will mostly mean going from (plist-get (package-desc-meta desc) :homepage) to (cdr (assoc :homepage (package-desc-meta desc))) which is not as nice. >> (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? Yes. > Why not add a 5th field instead? It actually has a 5th field already (containing the name of the repository). This is a bit complicated, because we also have `package-alist', its entries don't have the last two elements, and we want the homepage url to be available in both. But I guess we could push the new element before `kind' instead. This may be moot now, now that we have the updated Daniel's defstruct-based rewrite, which uses struct accessor functions here, so adding another slot would be the way to go. (Since it has a test suite, merging this patch on top of it should be easier than going the other way around). >> (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. One of the things you haven't commented on is that the vectors in the archive-contents file are of variable length with this proposal. Should (cl-lib . [(0 2) nil "Prefixed!" single :homepage "http://foo"]) turn into (cl-lib . [(0 2) nil "Prefixed!" single (:homepage "http://foo")]) or maybe (cl-lib . [(0 2) nil "Prefixed!" single (:homepage . "http://foo")]) ? From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 07 05:54:56 2013 Received: (at 13291) by debbugs.gnu.org; 7 Aug 2013 09:54:56 +0000 Received: from localhost ([127.0.0.1]:44832 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V70SE-00014H-De for submit@debbugs.gnu.org; Wed, 07 Aug 2013 05:54:55 -0400 Received: from forward5.mail.yandex.net ([77.88.46.21]:45068) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V70S9-00013u-NF for 13291@debbugs.gnu.org; Wed, 07 Aug 2013 05:54:52 -0400 Received: from smtp4.mail.yandex.net (smtp4.mail.yandex.net [77.88.46.104]) by forward5.mail.yandex.net (Yandex) with ESMTP id 59A6F1200D90; Wed, 7 Aug 2013 13:54:43 +0400 (MSK) Received: from smtp4.mail.yandex.net (localhost [127.0.0.1]) by smtp4.mail.yandex.net (Yandex) with ESMTP id 22D9C5C084D; Wed, 7 Aug 2013 13:54:43 +0400 (MSK) Received: from 62-107-247.netrun.cytanet.com.cy (62-107-247.netrun.cytanet.com.cy [62.228.107.247]) by smtp4.mail.yandex.net (nwsmtp/Yandex) with ESMTP id a74XjMVm2M-sfbOkYfV; Wed, 7 Aug 2013 13:54:42 +0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1375869282; bh=rsIJcftjt0c6jSWrrh3RJuYkkljIFQLEkHEE8c0ABs4=; h=Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject: References:In-Reply-To:Content-Type; b=Wp/Rd99qVnvIFNyU3DAW35hVvRjRKxpB5cWRYvh20nvrgHd3zo9IKG6TaekTxRTF9 QwAu5oGvKM35RM1SjiNyK3lmrnpknXcCTpH+MgCUVnENebbe5NErwTu7R9durPItSA bzndrEloraPLO5RntiLlpt4hR9qlALvMFW5r6DxM= Authentication-Results: smtp4.mail.yandex.net; dkim=pass header.i=@yandex.ru Message-ID: <52021960.3050109@yandex.ru> Date: Wed, 07 Aug 2013 12:54:40 +0300 From: Dmitry Gutov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130623 Thunderbird/17.0.7 MIME-Version: 1.0 To: Stefan Monnier Subject: Re: bug#13291: The package description buffer needs an URL button References: <50DDAF17.7020602@yandex.ru> <50F26A91.1090905@yandex.ru> <513F1650.6070700@yandex.ru> In-Reply-To: <513F1650.6070700@yandex.ru> Content-Type: multipart/mixed; boundary="------------040505090908000005000903" X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 13291 Cc: 13291@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) This is a multi-part message in MIME format. --------------040505090908000005000903 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Here's an updated patch for package, package-x and tests. Please comment, I'd like to install it soon-ish. Notes: * Converting from plist to alist and back is a hassle, but it gives us an opportunity to clear out keys with nil values in `package-desc-from-define'. * Not passing :homepage to `package-desc-from-define' in `package-buffer-info' when its value is nil seems hard. * `package--add-to-archive-contents' tries to retain backward compatibility by checking the given vector's length. Now we just need a package archive that would include homepage information. --------------040505090908000005000903 Content-Type: text/x-patch; name="package-homepage-button-new.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="package-homepage-button-new.diff" === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-08-06 12:18:43 +0000 +++ lisp/ChangeLog 2013-08-07 09:14:53 +0000 @@ -1,3 +1,22 @@ +2013-08-07 Dmitry Gutov + + * emacs-lisp/package.el (package-desc-from-define): Accept + additional arguments as plist, convert it to an alist and store it + in the `extras' slot. + (package-generate-description-file): Convert extras alist back to + plist and append to the `define-package' form arguments. + (package--alist-to-plist): New function. + (package--ac-desc): Add `extras' slot. + (package--add-to-archive-contents): Check if the archive-contents + vector is long enough, and if it is, pass its `extras' slot value + to `package-desc-create'. + (package-buffer-info): Call `lm-homepage', pass the returned value + to `package-desc-from-define'. + (describe-package-1): Render the homepage button. + + * emacs-lisp/package-x.el (package-upload-buffer-internal): Pass + `extras' slot from `package-desc' to `package-make-ac-desc'. + 2013-08-06 Juanma Barranquero * frameset.el (frameset, frameset-filter-alist) === modified file 'lisp/emacs-lisp/package-x.el' --- lisp/emacs-lisp/package-x.el 2013-06-27 09:26:54 +0000 +++ lisp/emacs-lisp/package-x.el 2013-08-07 08:31:50 +0000 @@ -209,6 +209,7 @@ (pcase file-type (`single (lm-commentary)) (`tar nil))) ;; FIXME: Get it from the README file. + (extras (package-desc-extras pkg-desc)) (pkg-version (package-version-join split-version)) (pkg-buffer (current-buffer))) @@ -217,7 +218,7 @@ (let ((contents (or (package--archive-contents-from-url archive-url) (package--archive-contents-from-file))) (new-desc (package-make-ac-desc - split-version requires desc file-type))) + split-version requires desc file-type extras))) (if (> (car contents) package-archive-version) (error "Unrecognized archive version %d" (car contents))) (let ((elt (assq pkg-name (cdr contents)))) === modified file 'lisp/emacs-lisp/package.el' --- lisp/emacs-lisp/package.el 2013-08-03 02:34:22 +0000 +++ lisp/emacs-lisp/package.el 2013-08-07 08:51:42 +0000 @@ -296,7 +296,7 @@ (:constructor package-desc-from-define (name-string version-string &optional summary requirements - &key kind archive &allow-other-keys + &rest rest-plist &aux (name (intern name-string)) (version (version-to-list version-string)) @@ -305,7 +305,19 @@ (version-to-list (cadr elt)))) (if (eq 'quote (car requirements)) (nth 1 requirements) - requirements)))))) + requirements))) + (kind (plist-get rest-plist :kind)) + (archive (plist-get rest-plist :archive)) + (extras (let (alist) + (cl-remf rest-plist :kind) + (cl-remf rest-plist :archive) + (while rest-plist + (let ((value (cadr rest-plist))) + (when value + (push (cons (car rest-plist) value) + alist))) + (setq rest-plist (cddr rest-plist))) + alist))))) "Structure containing information about an individual package. Slots: @@ -327,14 +339,17 @@ package came. `dir' The directory where the package is installed (if installed), - `builtin' if it is built-in, or nil otherwise." + `builtin' if it is built-in, or nil otherwise. + +`extras' Optional alist of additional keyword-value pairs." name version (summary package--default-summary) reqs kind archive - dir) + dir + extras) ;; Pseudo fields. (defun package-desc-full-name (pkg-desc) @@ -635,22 +650,28 @@ (write-region (concat (prin1-to-string - (list 'define-package - (symbol-name name) - (package-version-join (package-desc-version pkg-desc)) - (package-desc-summary pkg-desc) - (let ((requires (package-desc-reqs pkg-desc))) - (list 'quote - ;; Turn version lists into string form. - (mapcar - (lambda (elt) - (list (car elt) - (package-version-join (cadr elt)))) - requires))))) + (nconc + (list 'define-package + (symbol-name name) + (package-version-join (package-desc-version pkg-desc)) + (package-desc-summary pkg-desc) + (let ((requires (package-desc-reqs pkg-desc))) + (list 'quote + ;; Turn version lists into string form. + (mapcar + (lambda (elt) + (list (car elt) + (package-version-join (cadr elt)))) + requires)))) + (package--alist-to-plist + (package-desc-extras pkg-desc)))) "\n") nil pkg-file)))) +(defun package--alist-to-plist (alist) + (apply #'nconc (mapcar (lambda (pair) (list (car pair) (cdr pair))) alist))) + (defun package-unpack (pkg-desc) "Install the contents of the current buffer as a package." (let* ((name (package-desc-name pkg-desc)) @@ -886,10 +907,10 @@ ;; Changing this defstruct implies changing the format of the ;; "archive-contents" files. (cl-defstruct (package--ac-desc - (:constructor package-make-ac-desc (version reqs summary kind)) + (:constructor package-make-ac-desc (version reqs summary kind extras)) (:copier nil) (:type vector)) - version reqs summary kind) + version reqs summary kind extras) (defun package--add-to-archive-contents (package archive) "Add the PACKAGE from the given ARCHIVE if necessary. @@ -904,7 +925,11 @@ :reqs (package--ac-desc-reqs (cdr package)) :summary (package--ac-desc-summary (cdr package)) :kind (package--ac-desc-kind (cdr package)) - :archive archive)) + :archive archive + :extras (and (> (length (cdr package)) 4) + ;; Older archive-contents files have only 4 + ;; elements here. + (package--ac-desc-extras (cdr package))))) (existing-packages (assq name package-archive-contents)) (pinned-to-archive (assoc name package-pinned-packages))) (cond @@ -997,14 +1022,16 @@ ;; probably wants us to use it. Otherwise try Version. (pkg-version (or (package-strip-rcs-id (lm-header "package-version")) - (package-strip-rcs-id (lm-header "version"))))) + (package-strip-rcs-id (lm-header "version")))) + (homepage (lm-homepage))) (unless pkg-version (error "Package lacks a \"Version\" or \"Package-Version\" header")) (package-desc-from-define file-name pkg-version desc (if requires-str (package-read-from-string requires-str)) - :kind 'single)))) + :kind 'single + :homepage homepage)))) (declare-function tar-get-file-descriptor "tar-mode" (file)) (declare-function tar--extract "tar-mode" (descriptor)) @@ -1173,6 +1200,8 @@ (reqs (if desc (package-desc-reqs desc))) (version (if desc (package-desc-version desc))) (archive (if desc (package-desc-archive desc))) + (homepage (if desc (cdr (assoc :homepage + (package-desc-extras desc))))) (built-in (eq pkg-dir 'builtin)) (installable (and archive (not built-in))) (status (if desc (package-desc-status desc) "orphan"))) @@ -1241,7 +1270,10 @@ (insert "\n"))) (insert " " (propertize "Summary" 'font-lock-face 'bold) ": " (if desc (package-desc-summary desc)) "\n") - + (when homepage + (insert " " (propertize "Homepage" 'font-lock-face 'bold) ": ") + (help-insert-xref-button homepage 'help-url homepage) + (insert "\n")) (let* ((all-pkgs (append (cdr (assq name package-alist)) (cdr (assq name package-archive-contents)) (let ((bi (assq name package--builtins))) === modified file 'test/ChangeLog' --- test/ChangeLog 2013-08-05 01:32:00 +0000 +++ test/ChangeLog 2013-08-07 09:43:50 +0000 @@ -1,3 +1,29 @@ +2013-08-07 Dmitry Gutov + + * automated/package-test.el (simple-single-desc-1-4): Remove, it + was unused. + (simple-single-desc): Expect :homepage property. + (multi-file-desc): Same. + (with-package-test): Do not save previous `default-directory' + value, let-bind the var instead. + (package-test-install-single): Expect :homepage property in the + generated pkg file. + (package-test-describe-package): Expect Homepage button. + (package-test-describe-non-installed-package) + (package-test-describe-non-installed-multi-file-package): Same. + (package-test-describe-not-installed-package): Remove, it was a + duplicate. + + * automated/package-x-test.el + (package-x-test--single-archive-entry-1-3): Expect :homepage + property. + (package-x-test--single-archive-entry-1-4): Expect nil extras slot. + + * automated/data/package/simple-single-1.3.el: Add URL header. + + * automated/data/package/archive-contents: Add :homepage + properties to `simple-single' and `multi-file'. + 2013-08-05 Glenn Morris * automated/mule-util.el: New file, with tests extracted from === modified file 'test/automated/data/package/archive-contents' --- test/automated/data/package/archive-contents 2013-06-27 09:26:54 +0000 +++ test/automated/data/package/archive-contents 2013-08-07 08:37:09 +0000 @@ -1,10 +1,12 @@ (1 (simple-single . [(1 3) - nil "A single-file package with no dependencies" single]) + nil "A single-file package with no dependencies" single + ((:homepage . "http://doodles.au"))]) (simple-depend . [(1 0) ((simple-single (1 3))) "A single-file package with a dependency." single]) (multi-file . [(0 2 3) - nil "Example of a multi-file tar package" tar])) + nil "Example of a multi-file tar package" tar + ((:homepage . "http://puddles.li"))])) === modified file 'test/automated/data/package/multi-file-0.2.3.tar' Binary files test/automated/data/package/multi-file-0.2.3.tar 2013-06-27 09:26:54 +0000 and test/automated/data/package/multi-file-0.2.3.tar 2013-08-06 22:11:14 +0000 differ === modified file 'test/automated/data/package/simple-single-1.3.el' --- test/automated/data/package/simple-single-1.3.el 2013-06-27 09:26:54 +0000 +++ test/automated/data/package/simple-single-1.3.el 2013-08-07 08:36:44 +0000 @@ -3,6 +3,7 @@ ;; Author: J. R. Hacker ;; Version: 1.3 ;; Keywords: frobnicate +;; URL: http://doodles.au ;;; Commentary: === modified file 'test/automated/package-test.el' --- test/automated/package-test.el 2013-07-11 16:01:26 +0000 +++ test/automated/package-test.el 2013-08-07 09:44:09 +0000 @@ -47,16 +47,10 @@ (package-desc-create :name 'simple-single :version '(1 3) :summary "A single-file package with no dependencies" - :kind 'single) + :kind 'single + :extras '((:homepage . "http://doodles.au"))) "Expected `package-desc' parsed from simple-single-1.3.el.") -(defvar simple-single-desc-1-4 - (package-desc-create :name 'simple-single - :version '(1 4) - :summary "A single-file package with no dependencies" - :kind 'single) - "Expected `package-desc' parsed from simple-single-1.4.el.") - (defvar simple-depend-desc (package-desc-create :name 'simple-depend :version '(1 0) @@ -69,7 +63,8 @@ (package-desc-create :name 'multi-file :version '(0 2 3) :summary "Example of a multi-file tar package" - :kind 'tar) + :kind 'tar + :extras '((:homepage . "http://puddles.li"))) "Expected `package-desc' from \"multi-file-0.2.3.tar\".") (defvar new-pkg-desc @@ -100,7 +95,7 @@ (package-user-dir package-test-user-dir) (package-archives `(("gnu" . ,package-test-data-dir))) (old-yes-no-defn (symbol-function 'yes-or-no-p)) - (old-pwd default-directory) + (default-directory package-test-file-dir) package--initialized package-alist ,@(if update-news @@ -131,8 +126,7 @@ (when (and (boundp 'package-test-archive-upload-base) (file-directory-p package-test-archive-upload-base)) (delete-directory package-test-archive-upload-base t)) - (setf (symbol-function 'yes-or-no-p) old-yes-no-defn) - (cd old-pwd)))) + (setf (symbol-function 'yes-or-no-p) old-yes-no-defn)))) (defmacro with-fake-help-buffer (&rest body) "Execute BODY in a temp buffer which is treated as the \"*Help*\" buffer." @@ -232,7 +226,9 @@ (should (string= (buffer-string) (concat "(define-package \"simple-single\" \"1.3\" " "\"A single-file package " - "with no dependencies\" 'nil)\n")))) + "with no dependencies\" 'nil " + ":homepage \"http://doodles.au\"" + ")\n")))) (should (file-exists-p autoloads-file)) (should-not (get-file-buffer autoloads-file))))) @@ -357,23 +353,12 @@ (should (search-forward "Version: 1.3" nil t)) (should (search-forward "Summary: A single-file package with no dependencies" nil t)) + (should (search-forward "Homepage: http://doodles.au" nil t)) ;; No description, though. Because at this point we don't know ;; what archive the package originated from, and we don't have ;; its readme file saved. ))) -(ert-deftest package-test-describe-not-installed-package () - "Test displaying of the readme for not-installed package." - - (with-package-test () - (package-initialize) - (package-refresh-contents) - (with-fake-help-buffer - (describe-package 'simple-single) - (goto-char (point-min)) - (should (search-forward "This package provides a minor mode to frobnicate" - nil t))))) - (ert-deftest package-test-describe-non-installed-package () "Test displaying of the readme for non-installed package." @@ -383,6 +368,7 @@ (with-fake-help-buffer (describe-package 'simple-single) (goto-char (point-min)) + (should (search-forward "Homepage: http://doodles.au" nil t)) (should (search-forward "This package provides a minor mode to frobnicate" nil t))))) @@ -395,6 +381,7 @@ (with-fake-help-buffer (describe-package 'multi-file) (goto-char (point-min)) + (should (search-forward "Homepage: http://puddles.li" nil t)) (should (search-forward "This is a bare-bones readme file for the multi-file" nil t))))) === modified file 'test/automated/package-x-test.el' --- test/automated/package-x-test.el 2013-07-09 07:11:50 +0000 +++ test/automated/package-x-test.el 2013-08-07 08:34:21 +0000 @@ -48,14 +48,16 @@ (cons 'simple-single (package-make-ac-desc '(1 3) nil "A single-file package with no dependencies" - 'single)) + 'single + '((:homepage . "http://doodles.au")))) "Expected contents of the archive entry from the \"simple-single\" package.") (defvar package-x-test--single-archive-entry-1-4 (cons 'simple-single (package-make-ac-desc '(1 4) nil "A single-file package with no dependencies" - 'single)) + 'single + nil)) "Expected contents of the archive entry from the updated \"simple-single\" package.") (ert-deftest package-x-test-upload-buffer () --------------040505090908000005000903-- From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 29 15:44:03 2013 Received: (at 13291) by debbugs.gnu.org; 29 Sep 2013 19:44:03 +0000 Received: from localhost ([127.0.0.1]:45156 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VQMuR-0007Dk-CD for submit@debbugs.gnu.org; Sun, 29 Sep 2013 15:44:03 -0400 Received: from mail-ea0-f177.google.com ([209.85.215.177]:63937) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VQMuO-0007DD-Un for 13291@debbugs.gnu.org; Sun, 29 Sep 2013 15:44:01 -0400 Received: by mail-ea0-f177.google.com with SMTP id f15so2243964eak.36 for <13291@debbugs.gnu.org>; Sun, 29 Sep 2013 12:44:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=SXlxoygAv4S6MvvvHFF6Nz8DY2bnyJ85PpVSNhRjygg=; b=rw/vXowEM5Xt6toLrxcZ0wqGxZQpN5gheMqqrUE5/6UeFVutNbIFCABEIH/IXrMNIR ihlfGrPtz2Bk5bHK4MNWzqA5HTlkIAfzgghbebecUaMter2O09McffdDrhVI+0N/xKP3 8SKNCUwtIdh7nATWYVOaUH9dVzpxNloYsqERoGZbBjV9ebAouS9FOtYzigpJ0S9JbPXy Hx7AfBIj4aNuo5huLPivqzKb5yibuDCXhXqXGK5SVfp7Dt+0cDiND4ukGGC0vJpi6QUe 2mca58S9mMRD/oj6BWlzerRk6pt3lwzwodkBbpGsfTH6B+9OLw4cKbFF2IvUfet3L5z3 7q0A== X-Received: by 10.14.184.132 with SMTP id s4mr31341024eem.13.1380483839996; Sun, 29 Sep 2013 12:43:59 -0700 (PDT) Received: from axl (62-118-214.netrun.cytanet.com.cy. [62.228.118.214]) by mx.google.com with ESMTPSA id b45sm42687875eef.4.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sun, 29 Sep 2013 12:43:58 -0700 (PDT) From: Dmitry Gutov To: 13291@debbugs.gnu.org Subject: Re: bug#13291: The package description buffer needs an URL button References: <50DDAF17.7020602@yandex.ru> <50F26A91.1090905@yandex.ru> <513F1650.6070700@yandex.ru> <52021960.3050109@yandex.ru> Date: Sun, 29 Sep 2013 22:43:46 +0300 In-Reply-To: <52021960.3050109@yandex.ru> (Dmitry Gutov's message of "Wed, 07 Aug 2013 12:54:40 +0300") Message-ID: <87vc1jtnv1.fsf@yandex.ru> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 13291 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Patch installed in revision 114484. Guess what's left is to add ELPA support. From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 01 21:01:11 2013 Received: (at 13291) by debbugs.gnu.org; 2 Oct 2013 01:01:11 +0000 Received: from localhost ([127.0.0.1]:48257 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VRAoQ-0002Ql-Nz for submit@debbugs.gnu.org; Tue, 01 Oct 2013 21:01:11 -0400 Received: from mail-ea0-f172.google.com ([209.85.215.172]:56475) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VRAoN-0002Qa-TI for 13291@debbugs.gnu.org; Tue, 01 Oct 2013 21:01:08 -0400 Received: by mail-ea0-f172.google.com with SMTP id r16so47698ead.3 for <13291@debbugs.gnu.org>; Tue, 01 Oct 2013 18:01:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=4R999Xkx0EgPcTaAa4IOfdPEmnozCUcJ7LGBkf96Rp0=; b=NEoED+RwDyRU+/Qx6mIkWH6KeAOQUdL2bhqq/PjpMwOonyaYodVlRslMMBuoEWIGrZ 1uJYVh6j3lDsMNK3/Qs6vdTBS4ch3oyBk03R01pTPynxcxZK02APqXMwvBHiOXVEefGI +kownrpXiHWO54sx1T6QidqvocRKuGHPfq5XGn9hWfNA6Mhf9M7bsiKM/4MtwRGM9xCO IRLYFugXMb6EX8VlE7d81hjNYpuN+UpjUzVIXwn0lNT1mt/Ypsz3Qbcn+tQIQn9Rd1MP 85xsK/nZ0GKEpxLqYj9ETP4Ntt+TomHClopDWDcyPhP26xnMc6Fqzo6mt842qk6Udc6d tBLA== X-Received: by 10.15.43.13 with SMTP id w13mr49996075eev.37.1380675666975; Tue, 01 Oct 2013 18:01:06 -0700 (PDT) Received: from axl (62-118-214.netrun.cytanet.com.cy. [62.228.118.214]) by mx.google.com with ESMTPSA id bn13sm19007383eeb.11.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 01 Oct 2013 18:01:05 -0700 (PDT) From: Dmitry Gutov To: 13291@debbugs.gnu.org Subject: Re: bug#13291: The package description buffer needs an URL button References: <50DDAF17.7020602@yandex.ru> <50F26A91.1090905@yandex.ru> <513F1650.6070700@yandex.ru> <52021960.3050109@yandex.ru> <87vc1jtnv1.fsf@yandex.ru> Date: Wed, 02 Oct 2013 04:00:51 +0300 In-Reply-To: <87vc1jtnv1.fsf@yandex.ru> (Dmitry Gutov's message of "Sun, 29 Sep 2013 22:43:46 +0300") Message-ID: <874n90fpvg.fsf@yandex.ru> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 13291 Cc: Stefan Monnier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --=-=-= Content-Type: text/plain And here's the updated patch for admin/archive-contents.el. Does the ELPA server use the stable version of Emacs, or the current trunk? The attached code uses `package-desc-from-define' and `package--alist-to-plist', requiring a very recent version. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=archive-contents-homepage-new.diff Content-Description: archive-contents url patch diff --git a/admin/archive-contents.el b/admin/archive-contents.el index 499728e..17a4e17 100644 --- a/admin/archive-contents.el +++ b/admin/archive-contents.el @@ -158,11 +158,12 @@ Currently only refreshes the ChangeLog files." (defun archive--simple-package-p (dir pkg) "Test whether DIR contains a simple package named PKG. -Return a list (SIMPLE VERSION DESCRIPTION REQ), where +Return a list (SIMPLE VERSION DESCRIPTION REQ EXTRAS), where SIMPLE is non-nil if the package is indeed simple; VERSION is the version string of the simple package; DESCRIPTION is the brief description of the package; -REQ is a list of requirements. +REQ is a list of requirements; +EXTRAS is an alist with additional metadata. Otherwise, return nil." (let* ((pkg-file (expand-file-name (concat pkg "-pkg.el") dir)) (mainfile (expand-file-name (concat pkg ".el") dir)) @@ -186,15 +187,17 @@ Otherwise, return nil." (requires-str (lm-header "package-requires")) (pt (lm-header "package-type")) (simple (if pt (equal pt "simple") (= (length files) 1))) + (url (or (lm-homepage) + (format "http://elpa.gnu.org/packages/%s.html" pkg))) (req (if requires-str (mapcar 'archive--convert-require (car (read-from-string requires-str)))))) - (list simple version description req))))) + (list simple version description req (list (cons :url url))))))) ((not (file-exists-p pkg-file)) (error "Can find single file nor package desc file in %s" dir))))) -(defun archive--process-simple-package (dir pkg vers desc req) +(defun archive--process-simple-package (dir pkg vers desc req extras) "Deploy the contents of DIR into the archive as a simple package. Rename DIR/PKG.el to PKG-VERS.el, delete DIR, and return the descriptor." ;; Write DIR/foo.el to foo-VERS.el and delete DIR @@ -220,7 +223,7 @@ Rename DIR/PKG.el to PKG-VERS.el, delete DIR, and return the descriptor." (kill-buffer))) (delete-directory dir t) (cons (intern pkg) (vector (archive--version-to-list vers) - req desc 'single))) + req desc 'single extras))) (defun archive--make-changelog (dir srcdir) "Export Git log info of DIR into a ChangeLog file." @@ -251,19 +254,18 @@ Rename DIR/PKG.el to PKG-VERS.el, delete DIR, and return the descriptor." "Deploy the contents of DIR into the archive as a multi-file package. Rename DIR/ to PKG-VERS/, and return the descriptor." (let* ((exp (archive--multi-file-package-def dir pkg)) - (vers (nth 2 exp)) - (req-exp (nth 4 exp)) - (req (mapcar 'archive--convert-require - (if (eq 'quote (car-safe req-exp)) (nth 1 req-exp) - (when req-exp - (error "REQ should be a quoted constant: %S" - req-exp)))))) - (unless (equal (nth 1 exp) pkg) + (pkg-desc (apply #'package-desc-from-define (cdr exp))) + (pkg-name (package-desc-name pkg-desc))) + (unless (string= pkg-name pkg) (error (format "Package name %s doesn't match file name %s" - (nth 1 exp) pkg))) - (rename-file dir (concat pkg "-" vers)) - (cons (intern pkg) (vector (archive--version-to-list vers) - req (nth 3 exp) 'tar)))) + pkg-name pkg))) + (rename-file dir (concat pkg "-" (package-version-join + (package-desc-version pkg-desc)))) + (cons (intern pkg) (vector (package-desc-version pkg-desc) + (package-desc-reqs pkg-desc) + (package-desc-summary pkg-desc) + 'tar + (package-desc-extras pkg-desc))))) (defun archive--multi-file-package-def (dir pkg) "Return the `define-package' form in the file DIR/PKG-pkg.el." @@ -286,7 +288,7 @@ Rename DIR/ to PKG-VERS/, and return the descriptor." ;; (message "Not refreshing pkg description of %s" pkg) ))) -(defun archive--write-pkg-file (pkg-dir name version desc requires &rest ignored) +(defun archive--write-pkg-file (pkg-dir name version desc requires extras) (let ((pkg-file (expand-file-name (concat name "-pkg.el") pkg-dir)) (print-level nil) (print-quoted t) @@ -295,17 +297,19 @@ Rename DIR/ to PKG-VERS/, and return the descriptor." (concat (format ";; Generated package description from %s.el\n" name) (prin1-to-string - (list 'define-package - name - version - desc - (list 'quote - ;; Turn version lists into string form. - (mapcar - (lambda (elt) - (list (car elt) - (package-version-join (cadr elt)))) - requires)))) + (nconc + (list 'define-package + name + version + desc + (list 'quote + ;; Turn version lists into string form. + (mapcar + (lambda (elt) + (list (car elt) + (package-version-join (cadr elt)))) + requires))) + (package--alist-to-plist extras))) "\n") nil pkg-file))) @@ -388,30 +392,29 @@ Rename DIR/ to PKG-VERS/, and return the descriptor." (replace-regexp-in-string "<" "<" (replace-regexp-in-string "&" "&" txt))) -(defun archive--insert-repolinks (name srcdir mainsrcfile) - (let ((url (archive--get-prop "URL" name srcdir mainsrcfile))) - (if url - (insert (format "

Origin: %s

\n" - url (archive--quote url))) - (let* ((externals - (with-temp-buffer - (insert-file-contents - (expand-file-name "../../../elpa/externals-list" srcdir)) - (read (current-buffer)))) - (external (eq :external (nth 1 (assoc name externals)))) - (git-sv "http://git.savannah.gnu.org/") - (urls (if external - '("cgit/emacs/elpa.git/?h=externals/" - "gitweb/?p=emacs/elpa.git;a=shortlog;h=refs/heads/externals/") - '("cgit/emacs/elpa.git/tree/packages/" - "gitweb/?p=emacs/elpa.git;a=tree;f=packages/")))) - (insert (format - (concat "

Browse repository: %s" - " or %s

\n") - (concat git-sv (nth 0 urls) name) - 'CGit - (concat git-sv (nth 1 urls) name) - 'Gitweb)))))) +(defun archive--insert-repolinks (name srcdir mainsrcfile url) + (if url + (insert (format "

Origin: %s

\n" + url (archive--quote url))) + (let* ((externals + (with-temp-buffer + (insert-file-contents + (expand-file-name "../../../elpa/externals-list" srcdir)) + (read (current-buffer)))) + (external (eq :external (nth 1 (assoc name externals)))) + (git-sv "http://git.savannah.gnu.org/") + (urls (if external + '("cgit/emacs/elpa.git/?h=externals/" + "gitweb/?p=emacs/elpa.git;a=shortlog;h=refs/heads/externals/") + '("cgit/emacs/elpa.git/tree/packages/" + "gitweb/?p=emacs/elpa.git;a=tree;f=packages/")))) + (insert (format + (concat "

Browse repository: %s" + " or %s

\n") + (concat git-sv (nth 0 urls) name) + 'CGit + (concat git-sv (nth 1 urls) name) + 'Gitweb))))) (defun archive--html-make-pkg (pkg files) (let* ((name (symbol-name (car pkg))) @@ -431,7 +434,8 @@ Rename DIR/ to PKG-VERS/, and return the descriptor." (let ((maint (archive--get-prop "Maintainer" name srcdir mainsrcfile))) (when maint (insert (format "

Maintainer: %s

\n" (archive--quote maint))))) - (archive--insert-repolinks name srcdir mainsrcfile) + (archive--insert-repolinks name srcdir mainsrcfile + (cdr (assoc :url (aref (cdr pkg) 4)))) (let ((rm (archive--get-section "Commentary" '("README" "README.rst" "README.md" "README.org") srcdir mainsrcfile))) --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 01 23:09:27 2013 Received: (at 13291) by debbugs.gnu.org; 2 Oct 2013 03:09:27 +0000 Received: from localhost ([127.0.0.1]:48407 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VRCoU-0005Lb-TQ for submit@debbugs.gnu.org; Tue, 01 Oct 2013 23:09:27 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:48199) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VRCoO-0005LN-C7 for 13291@debbugs.gnu.org; Tue, 01 Oct 2013 23:09:20 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFFFxLEV/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLDiYSFBgNJIgeBrEfkA6RCgOSWwOSHIFegxM X-IPAS-Result: Av4EABK/CFFFxLEV/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLDiYSFBgNJIgeBrEfkA6RCgOSWwOSHIFegxM X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="31659485" Received: from 69-196-177-21.dsl.teksavvy.com (HELO fmsmemgm.homelinux.net) ([69.196.177.21]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 01 Oct 2013 23:05:57 -0400 Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id 138D0AE147; Tue, 1 Oct 2013 23:09:15 -0400 (EDT) From: Stefan Monnier To: Dmitry Gutov Subject: Re: bug#13291: The package description buffer needs an URL button Message-ID: References: <50DDAF17.7020602@yandex.ru> <50F26A91.1090905@yandex.ru> <513F1650.6070700@yandex.ru> <52021960.3050109@yandex.ru> <87vc1jtnv1.fsf@yandex.ru> <874n90fpvg.fsf@yandex.ru> Date: Tue, 01 Oct 2013 23:09:15 -0400 In-Reply-To: <874n90fpvg.fsf@yandex.ru> (Dmitry Gutov's message of "Wed, 02 Oct 2013 04:00:51 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 13291 Cc: 13291@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) > Does the ELPA server use the stable version of Emacs, or the current > trunk? It uses the emacs24 package from Debian, IIRC. Stefan From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 01 23:23:00 2013 Received: (at 13291) by debbugs.gnu.org; 2 Oct 2013 03:23:00 +0000 Received: from localhost ([127.0.0.1]:48422 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VRD1g-0005ek-86 for submit@debbugs.gnu.org; Tue, 01 Oct 2013 23:23:00 -0400 Received: from mail-ea0-f171.google.com ([209.85.215.171]:58875) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VRD1d-0005eb-Ge for 13291@debbugs.gnu.org; Tue, 01 Oct 2013 23:22:58 -0400 Received: by mail-ea0-f171.google.com with SMTP id n15so84471ead.30 for <13291@debbugs.gnu.org>; Tue, 01 Oct 2013 20:22:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=NhyXba6stB+hArCLPBuvW6Ow/gHDDTUIDccsa1OIamY=; b=gMif1YfVIw3rHI6NEk0P1X0VwhPQZaFmWrvkLJWYPUbEmHqXazp5xP+gh6oZ0ayaTu TRaPZIq48QLq4EcB7Pik4lGKssgTNPh9jwbA66TUQECJ060i1WxS5z3oL5WpC6oO5etz BUzJzwkWwR7YKsYswUPwRj/MC15fFImCL6U6IiOT7/KAfECaL9rBEEXfP6+Q5gZNRWJq kpePlcDwEMDRSimkBxb4sHFzRbvkzH4JkP8mFt9ivPjckfP7Sjg8B+OSQaI6Utx1OOZu 2vluXw4wWY41rkmXN+gf7tZmYjRzxs7MgZ15W7L6h+EpAVO9CylGjNTsejBnC9vRsU7S hP7A== X-Received: by 10.14.4.137 with SMTP id 9mr74586eej.124.1380684176478; Tue, 01 Oct 2013 20:22:56 -0700 (PDT) Received: from [192.168.10.2] (62-118-214.netrun.cytanet.com.cy. [62.228.118.214]) by mx.google.com with ESMTPSA id i1sm20000729eeg.0.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 01 Oct 2013 20:22:55 -0700 (PDT) Message-ID: <524B918B.5010600@yandex.ru> Date: Wed, 02 Oct 2013 06:22:51 +0300 From: Dmitry Gutov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.0 MIME-Version: 1.0 To: Stefan Monnier Subject: Re: bug#13291: The package description buffer needs an URL button References: <50DDAF17.7020602@yandex.ru> <50F26A91.1090905@yandex.ru> <513F1650.6070700@yandex.ru> <52021960.3050109@yandex.ru> <87vc1jtnv1.fsf@yandex.ru> <874n90fpvg.fsf@yandex.ru> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 13291 Cc: 13291@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On 02.10.2013 06:09, Stefan Monnier wrote: >> Does the ELPA server use the stable version of Emacs, or the current >> trunk? > > It uses the emacs24 package from Debian, IIRC. That's too bad, I'd rather not reimplement the alist-to-plist and plist-to-alist code from package.el. And we could use the new struct types more. There are some snapshot packages here: http://emacs.naquadah.org/ Can we use it? I understand using auto-updateable snapshot package will be dangerous, but if it's only updated manually, it could be fine. From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 04 15:04:37 2013 Received: (at 13291) by debbugs.gnu.org; 4 Oct 2013 19:04:37 +0000 Received: from localhost ([127.0.0.1]:54443 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VSAg0-00013S-Ui for submit@debbugs.gnu.org; Fri, 04 Oct 2013 15:04:37 -0400 Received: from chene.dit.umontreal.ca ([132.204.246.20]:53679) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VSAfu-00012b-Gk for 13291@debbugs.gnu.org; Fri, 04 Oct 2013 15:04:34 -0400 Received: from faina.iro.umontreal.ca (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id r94J4T4n007824; Fri, 4 Oct 2013 15:04:29 -0400 Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id 99BBEB4168; Thu, 3 Oct 2013 09:46:44 -0400 (EDT) From: Stefan Monnier To: Dmitry Gutov Subject: Re: bug#13291: The package description buffer needs an URL button Message-ID: References: <50DDAF17.7020602@yandex.ru> <50F26A91.1090905@yandex.ru> <513F1650.6070700@yandex.ru> <52021960.3050109@yandex.ru> <87vc1jtnv1.fsf@yandex.ru> <874n90fpvg.fsf@yandex.ru> <524B918B.5010600@yandex.ru> Date: Thu, 03 Oct 2013 09:46:44 -0400 In-Reply-To: <524B918B.5010600@yandex.ru> (Dmitry Gutov's message of "Wed, 02 Oct 2013 06:22:51 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Level: * X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 1.2 X-NAI-Spam-Rules: 4 Rules triggered WB_LK3_SLK=0.5, WB_LK3_SLK_W_GEN_SPAM_FEATRE=0.5, GEN_SPAM_FEATRE=0.2, RV4721=0 X-NAI-Spam-Version: 2.3.0.9362 : core <4721> : inlines <126> : streams <1050162> : uri <1555789> X-Spam-Score: -1.5 (-) X-Debbugs-Envelope-To: 13291 Cc: 13291@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.5 (-) > That's too bad, I'd rather not reimplement the alist-to-plist and > plist-to-alist code from package.el. You can copy&paste it. > There are some snapshot packages here: http://emacs.naquadah.org/ > Can we use it? I'd rather not bother. Stefan From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 06 23:45:48 2013 Received: (at 13291-done) by debbugs.gnu.org; 7 Oct 2013 03:45:48 +0000 Received: from localhost ([127.0.0.1]:58857 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VT1lT-0000YH-P1 for submit@debbugs.gnu.org; Sun, 06 Oct 2013 23:45:47 -0400 Received: from mail-ee0-f50.google.com ([74.125.83.50]:42958) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VT1lR-0000Y9-PS for 13291-done@debbugs.gnu.org; Sun, 06 Oct 2013 23:45:46 -0400 Received: by mail-ee0-f50.google.com with SMTP id d51so2899522eek.23 for <13291-done@debbugs.gnu.org>; Sun, 06 Oct 2013 20:45:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=X/kOg2vw76T5aS7KmRo8NKLOBtXevqtm42PN/hhiNm0=; b=szGe8TE9hsKgxErqh6PZvFcC4Th7EQUyZIbPYfH2WzdrJ+MxTYgxHqaYQ0xmhEcVlA YxsXgCaOc8Lw3FoBU9LSAE8FRwYvohb2fq2W/bi6uoJeusd8W5lQMJ4tVJchabfh1MzU dEo8U2JGoxAXbtn+9Smo+MO1QF7hKXWawLyvS1RI6GoeklnC7rD0BgYh2AR6UoGNSu3q wXrXKSVO4pfGct1RJKbQqITRnl8szBei9JjTvQ3jFC7ioo2yyeiEm5oxMjuy9UCic24j XR20R374gZEyGohMvdLMkmKCxeDT0LZquhNiuq/lB6o/4E5ilnFVC/tQZLqfrz8Wvccv Buxw== X-Received: by 10.15.98.194 with SMTP id bj42mr45991549eeb.12.1381117544466; Sun, 06 Oct 2013 20:45:44 -0700 (PDT) Received: from [192.168.10.2] (93-113-74.netrun.cytanet.com.cy. [93.109.113.74]) by mx.google.com with ESMTPSA id r48sm58054531eev.14.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 06 Oct 2013 20:45:43 -0700 (PDT) Message-ID: <52522E60.9050303@yandex.ru> Date: Mon, 07 Oct 2013 06:45:36 +0300 From: Dmitry Gutov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.0 MIME-Version: 1.0 To: Stefan Monnier Subject: Re: bug#13291: The package description buffer needs an URL button References: <50DDAF17.7020602@yandex.ru> <50F26A91.1090905@yandex.ru> <513F1650.6070700@yandex.ru> <52021960.3050109@yandex.ru> <87vc1jtnv1.fsf@yandex.ru> <874n90fpvg.fsf@yandex.ru> <524B918B.5010600@yandex.ru> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 13291-done Cc: 13291-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) On 03.10.2013 16:46, Stefan Monnier wrote: >> That's too bad, I'd rather not reimplement the alist-to-plist and >> plist-to-alist code from package.el. > > You can copy&paste it. Okay, done, thanks for the reality check. Patch installed, now let's see how it works live. From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 07 00:50:33 2013 Received: (at 13291-done) by debbugs.gnu.org; 7 Oct 2013 04:50:33 +0000 Received: from localhost ([127.0.0.1]:58945 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VT2m8-0002DB-T0 for submit@debbugs.gnu.org; Mon, 07 Oct 2013 00:50:33 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:42201) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VT2m3-0002Cy-Ut for 13291-done@debbugs.gnu.org; Mon, 07 Oct 2013 00:50:29 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFHO+K8t/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLDiYSFBgNJIgeBsEtkQoDklsDkhyBXoMT X-IPAS-Result: Av4EABK/CFHO+K8t/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLDiYSFBgNJIgeBsEtkQoDklsDkhyBXoMT X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="34903521" Received: from 206-248-175-45.dsl.teksavvy.com (HELO fmsmemgm.homelinux.net) ([206.248.175.45]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 07 Oct 2013 00:46:51 -0400 Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id BA224AE4CB; Mon, 7 Oct 2013 00:50:26 -0400 (EDT) From: Stefan Monnier To: Dmitry Gutov Subject: Re: bug#13291: The package description buffer needs an URL button Message-ID: References: <50DDAF17.7020602@yandex.ru> <50F26A91.1090905@yandex.ru> <513F1650.6070700@yandex.ru> <52021960.3050109@yandex.ru> <87vc1jtnv1.fsf@yandex.ru> <874n90fpvg.fsf@yandex.ru> <524B918B.5010600@yandex.ru> <52522E60.9050303@yandex.ru> Date: Mon, 07 Oct 2013 00:50:26 -0400 In-Reply-To: <52522E60.9050303@yandex.ru> (Dmitry Gutov's message of "Mon, 07 Oct 2013 06:45:36 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 13291-done Cc: 13291-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) > Okay, done, thanks for the reality check. > Patch installed, now let's see how it works live. I had to replace lm-homepage since it's not in Emacs-24.3, but other than that it seems to work. Thanks, Stefan From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 15 02:32:17 2013 Received: (at control) by debbugs.gnu.org; 15 Oct 2013 06:32:17 +0000 Received: from localhost ([127.0.0.1]:49841 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VVyAy-0000tZ-AZ for submit@debbugs.gnu.org; Tue, 15 Oct 2013 02:32:16 -0400 Received: from fencepost.gnu.org ([208.118.235.10]:57972 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VVyAw-0000tR-4d for control@debbugs.gnu.org; Tue, 15 Oct 2013 02:32:14 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1VVyAv-0005Ko-Nv for control@debbugs.gnu.org; Tue, 15 Oct 2013 02:32:13 -0400 Date: Tue, 15 Oct 2013 02:32:13 -0400 Message-Id: Subject: control message for bug 15619 To: X-Mailer: mail (GNU Mailutils 2.1) From: Glenn Morris X-Spam-Score: -5.5 (-----) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.5 (-----) forcemerge 13291 15619 From unknown Sun Jun 22 17:16:49 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 13 Nov 2013 12:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator