* package.el (describe-package-1): tell the archive used to install a package.
@ 2013-02-01 11:59 Nicolas Richard
2013-02-01 15:58 ` Stefan Monnier
2013-02-01 23:55 ` Xue Fuqiao
0 siblings, 2 replies; 4+ messages in thread
From: Nicolas Richard @ 2013-02-01 11:59 UTC (permalink / raw)
To: emacs-devel
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")
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: package.el (describe-package-1): tell the archive used to install a package.
2013-02-01 11:59 package.el (describe-package-1): tell the archive used to install a package Nicolas Richard
@ 2013-02-01 15:58 ` Stefan Monnier
2013-02-06 16:11 ` Bastien
2013-02-01 23:55 ` Xue Fuqiao
1 sibling, 1 reply; 4+ messages in thread
From: Stefan Monnier @ 2013-02-01 15:58 UTC (permalink / raw)
To: Nicolas Richard; +Cc: emacs-devel
> When I'm going to install a package, I like to know where it comes from.
> I use the following patch to do that.
That looks like a good improvement, thank you. Could someone more
familiar with the package.el code double-check it and install it?
Stefan
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: package.el (describe-package-1): tell the archive used to install a package.
2013-02-01 11:59 package.el (describe-package-1): tell the archive used to install a package Nicolas Richard
2013-02-01 15:58 ` Stefan Monnier
@ 2013-02-01 23:55 ` Xue Fuqiao
1 sibling, 0 replies; 4+ messages in thread
From: Xue Fuqiao @ 2013-02-01 23:55 UTC (permalink / raw)
To: Nicolas Richard; +Cc: elpa, nferrier, emacs-devel
On Fri, 01 Feb 2013 12:59:35 +0100
"Nicolas Richard" <theonewiththeevillook@yahoo.fr> 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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: package.el (describe-package-1): tell the archive used to install a package.
2013-02-01 15:58 ` Stefan Monnier
@ 2013-02-06 16:11 ` Bastien
0 siblings, 0 replies; 4+ messages in thread
From: Bastien @ 2013-02-06 16:11 UTC (permalink / raw)
To: Stefan Monnier; +Cc: Nicolas Richard, emacs-devel
Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> When I'm going to install a package, I like to know where it comes from.
>> I use the following patch to do that.
>
> That looks like a good improvement, thank you. Could someone more
> familiar with the package.el code double-check it and install it?
Tested and applied in trunk, thanks Nicolas.
--
Bastien
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-02-06 16:11 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-01 11:59 package.el (describe-package-1): tell the archive used to install a package Nicolas Richard
2013-02-01 15:58 ` Stefan Monnier
2013-02-06 16:11 ` Bastien
2013-02-01 23:55 ` Xue Fuqiao
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.