From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#13291: The package description buffer needs an URL button Date: Sun, 13 Jan 2013 10:49:11 +0400 Message-ID: <50F258E7.4040908@yandex.ru> References: <50DDAF17.7020602@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------010706040507020908080400" X-Trace: ger.gmane.org 1358059816 13866 80.91.229.3 (13 Jan 2013 06:50:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 13 Jan 2013 06:50:16 +0000 (UTC) Cc: 13291@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jan 13 07:50:34 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1TuHOn-000377-OH for geb-bug-gnu-emacs@m.gmane.org; Sun, 13 Jan 2013 07:50:29 +0100 Original-Received: from localhost ([::1]:53182 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TuHOX-0005wh-Ej for geb-bug-gnu-emacs@m.gmane.org; Sun, 13 Jan 2013 01:50:13 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:33854) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TuHOG-0005r1-Ci for bug-gnu-emacs@gnu.org; Sun, 13 Jan 2013 01:50:11 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TuHO6-0002pg-NT for bug-gnu-emacs@gnu.org; Sun, 13 Jan 2013 01:49:56 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:52079) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TuHO6-0002pc-J3 for bug-gnu-emacs@gnu.org; Sun, 13 Jan 2013 01:49:46 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TuHOM-0006ZU-DE for bug-gnu-emacs@gnu.org; Sun, 13 Jan 2013 01:50:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 13 Jan 2013 06:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13291 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 13291-submit@debbugs.gnu.org id=B13291.135805977925218 (code B ref 13291); Sun, 13 Jan 2013 06:50:02 +0000 Original-Received: (at 13291) by debbugs.gnu.org; 13 Jan 2013 06:49:39 +0000 Original-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 Original-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 Original-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) Original-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) User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130107 Thunderbird/17.0.2 In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:69694 Archived-At: 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--