GNU bug report logs - #13291
The package description buffer needs an URL button

Previous Next

Package: emacs;

Reported by: Dmitry Gutov <dgutov <at> yandex.ru>

Date: Fri, 28 Dec 2012 14:41:02 UTC

Severity: wishlist

Merged with 15619

Done: Dmitry Gutov <dgutov <at> yandex.ru>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 13291 in the body.
You can then email your comments to 13291 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#13291; Package emacs. (Fri, 28 Dec 2012 14:41:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Dmitry Gutov <dgutov <at> yandex.ru>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 28 Dec 2012 14:41:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: bug-gnu-emacs <at> gnu.org
Subject: The package description buffer needs an URL button
Date: Fri, 28 Dec 2012 18:39:19 +0400
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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#13291; Package emacs. (Sat, 12 Jan 2013 03:30:02 GMT) Full text and rfc822 format available.

Message #8 received at 13291 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: 13291 <at> debbugs.gnu.org
Subject: Re: bug#13291: The package description buffer needs an URL button
Date: Fri, 11 Jan 2013 22:28:49 -0500
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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#13291; Package emacs. (Sat, 12 Jan 2013 07:42:02 GMT) Full text and rfc822 format available.

Message #11 received at 13291 <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 13291 <at> debbugs.gnu.org
Subject: Re: bug#13291: The package description buffer needs an URL button
Date: Sat, 12 Jan 2013 11:41:04 +0400
[Message part 1 (text/plain, inline)]
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.
[package-homepage-button.diff (text/plain, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#13291; Package emacs. (Sun, 13 Jan 2013 06:50:02 GMT) Full text and rfc822 format available.

Message #14 received at 13291 <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 13291 <at> debbugs.gnu.org
Subject: Re: bug#13291: The package description buffer needs an URL button
Date: Sun, 13 Jan 2013 10:49:11 +0400
[Message part 1 (text/plain, inline)]
Here's a rough patch for elpa/admin/archive-contents.el
[archive-contents-homepage.diff (text/plain, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#13291; Package emacs. (Sun, 13 Jan 2013 07:41:03 GMT) Full text and rfc822 format available.

Message #17 received at 13291 <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <raaahh <at> gmail.com>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: 13291 <at> debbugs.gnu.org, Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: Re: bug#13291: The package description buffer needs an URL button
Date: Sun, 13 Jan 2013 06:54:38 +0400
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"])
 ...)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#13291; Package emacs. (Sun, 13 Jan 2013 08:05:02 GMT) Full text and rfc822 format available.

Message #20 received at 13291 <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 13291 <at> debbugs.gnu.org
Subject: Re: bug#13291: The package description buffer needs an URL button
Date: Sun, 13 Jan 2013 12:04:33 +0400
[Message part 1 (text/plain, inline)]
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.
[package-homepage-button.diff (text/plain, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#13291; Package emacs. (Tue, 05 Mar 2013 17:14:01 GMT) Full text and rfc822 format available.

Message #23 received at 13291 <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <raaahh <at> gmail.com>
Cc: 13291 <at> debbugs.gnu.org
Subject: Re: bug#13291: The package description buffer needs an URL button
Date: Tue, 05 Mar 2013 21:12:44 +0400
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.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#13291; Package emacs. (Mon, 11 Mar 2013 17:42:02 GMT) Full text and rfc822 format available.

Message #26 received at 13291 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: 13291 <at> debbugs.gnu.org
Subject: Re: bug#13291: The package description buffer needs an URL button
Date: Mon, 11 Mar 2013 13:40:06 -0400
> 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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#13291; Package emacs. (Tue, 12 Mar 2013 11:51:01 GMT) Full text and rfc822 format available.

Message #29 received at 13291 <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 13291 <at> debbugs.gnu.org
Subject: Re: bug#13291: The package description buffer needs an URL button
Date: Tue, 12 Mar 2013 15:49:36 +0400
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")])

?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#13291; Package emacs. (Wed, 07 Aug 2013 09:55:02 GMT) Full text and rfc822 format available.

Message #32 received at 13291 <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 13291 <at> debbugs.gnu.org
Subject: Re: bug#13291: The package description buffer needs an URL button
Date: Wed, 07 Aug 2013 12:54:40 +0300
[Message part 1 (text/plain, inline)]
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.
[package-homepage-button-new.diff (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#13291; Package emacs. (Sun, 29 Sep 2013 19:45:02 GMT) Full text and rfc822 format available.

Message #35 received at 13291 <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: 13291 <at> debbugs.gnu.org
Subject: Re: bug#13291: The package description buffer needs an URL button
Date: Sun, 29 Sep 2013 22:43:46 +0300
Patch installed in revision 114484.

Guess what's left is to add ELPA support.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#13291; Package emacs. (Wed, 02 Oct 2013 01:02:01 GMT) Full text and rfc822 format available.

Message #38 received at 13291 <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: 13291 <at> debbugs.gnu.org
Cc: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
Subject: Re: bug#13291: The package description buffer needs an URL button
Date: Wed, 02 Oct 2013 04:00:51 +0300
[Message part 1 (text/plain, inline)]
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.

[archive-contents-homepage-new.diff (text/x-diff, inline)]
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 "<" "&lt;"
                             (replace-regexp-in-string "&" "&amp;" txt)))
 
-(defun archive--insert-repolinks (name srcdir mainsrcfile)
-  (let ((url (archive--get-prop "URL" name srcdir mainsrcfile)))
-    (if url
-        (insert (format "<p>Origin: <a href=%S>%s</a></p>\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 "<p>Browse repository: <a href=%S>%s</a>"
-                         " or <a href=%S>%s</a></p>\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 "<p>Origin: <a href=%S>%s</a></p>\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 "<p>Browse repository: <a href=%S>%s</a>"
+                       " or <a href=%S>%s</a></p>\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 "<p>Maintainer: %s</p>\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)))

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#13291; Package emacs. (Wed, 02 Oct 2013 03:10:02 GMT) Full text and rfc822 format available.

Message #41 received at 13291 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: 13291 <at> debbugs.gnu.org
Subject: Re: bug#13291: The package description buffer needs an URL button
Date: Tue, 01 Oct 2013 23:09:15 -0400
> Does the ELPA server use the stable version of Emacs, or the current
> trunk?

It uses the emacs24 package from Debian, IIRC.


        Stefan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#13291; Package emacs. (Wed, 02 Oct 2013 03:23:01 GMT) Full text and rfc822 format available.

Message #44 received at 13291 <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 13291 <at> debbugs.gnu.org
Subject: Re: bug#13291: The package description buffer needs an URL button
Date: Wed, 02 Oct 2013 06:22:51 +0300
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.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#13291; Package emacs. (Fri, 04 Oct 2013 19:05:02 GMT) Full text and rfc822 format available.

Message #47 received at 13291 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: 13291 <at> debbugs.gnu.org
Subject: Re: bug#13291: The package description buffer needs an URL button
Date: Thu, 03 Oct 2013 09:46:44 -0400
> 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




Reply sent to Dmitry Gutov <dgutov <at> yandex.ru>:
You have taken responsibility. (Mon, 07 Oct 2013 03:46:02 GMT) Full text and rfc822 format available.

Notification sent to Dmitry Gutov <dgutov <at> yandex.ru>:
bug acknowledged by developer. (Mon, 07 Oct 2013 03:46:02 GMT) Full text and rfc822 format available.

Message #52 received at 13291-done <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
Cc: 13291-done <at> debbugs.gnu.org
Subject: Re: bug#13291: The package description buffer needs an URL button
Date: Mon, 07 Oct 2013 06:45:36 +0300
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.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#13291; Package emacs. (Mon, 07 Oct 2013 04:51:02 GMT) Full text and rfc822 format available.

Message #55 received at 13291-done <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: 13291-done <at> debbugs.gnu.org
Subject: Re: bug#13291: The package description buffer needs an URL button
Date: Mon, 07 Oct 2013 00:50:26 -0400
> 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




Forcibly Merged 13291 15619. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Tue, 15 Oct 2013 06:33:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 13 Nov 2013 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 11 years and 224 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.