[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: package.el (describe-package-1): tell the archive used to install a
From: |
Xue Fuqiao |
Subject: |
Re: package.el (describe-package-1): tell the archive used to install a package. |
Date: |
Sat, 2 Feb 2013 07:55:27 +0800 |
On Fri, 01 Feb 2013 12:59:35 +0100
"Nicolas Richard" <address@hidden> wrote:
>
> Hi there,
>
> When I'm going to install a package, I like to know where it comes from.
> I use the following patch to do that.
>
> === 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-02-01 11:57:08 +0000
> @@ -1182,7 +1182,7 @@
> (require 'lisp-mnt)
> (let ((package-name (symbol-name package))
> (built-in (assq package package--builtins))
> - desc pkg-dir reqs version installable)
> + desc pkg-dir reqs version installable archive)
> (prin1 package)
> (princ " is ")
> (cond
> @@ -1196,6 +1196,7 @@
> ;; Available packages are in `package-archive-contents'.
> ((setq desc (cdr (assq package package-archive-contents)))
> (setq version (package-version-join (package-desc-vers desc))
> + archive (aref desc (- (length desc) 1))
> installable t)
> (if built-in
> (insert "a built-in package.\n\n")
> @@ -1224,8 +1225,10 @@
> (installable
> (if built-in
> (insert (propertize "Built-in." 'font-lock-face
> 'font-lock-builtin-face)
> - " Alternate version available -- ")
> - (insert "Available -- "))
> + " Alternate version available")
> + (insert "Available"))
> + (insert " from " archive)
> + (insert " -- ")
> (let ((button-text (if (display-graphic-p) "Install" "[Install]"))
> (button-face (if (display-graphic-p)
> '(:box (:line-width 2 :color "dark grey")
>
>
Looks great, I've Cc'd Nic and Tom. Can you double-check it and expess your
opinion?
--
Best regards, Xue Fuqiao.
http://www.emacswiki.org/emacs/XueFuqiao