all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Nicolas Richard" <theonewiththeevillook@yahoo.fr>
To: emacs-devel@gnu.org
Subject: package.el (describe-package-1): tell the archive used to install a package.
Date: Fri, 01 Feb 2013 12:59:35 +0100	[thread overview]
Message-ID: <87vcacw8go.fsf@yahoo.fr> (raw)


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")




             reply	other threads:[~2013-02-01 11:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-01 11:59 Nicolas Richard [this message]
2013-02-01 15:58 ` package.el (describe-package-1): tell the archive used to install a package Stefan Monnier
2013-02-06 16:11   ` Bastien
2013-02-01 23:55 ` Xue Fuqiao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87vcacw8go.fsf@yahoo.fr \
    --to=theonewiththeevillook@yahoo.fr \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.