From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tom Tromey Newsgroups: gmane.emacs.devel Subject: Re: package.el Date: Mon, 21 May 2007 11:40:57 -0600 Message-ID: References: <2cd46e7f0705101124r72000f78xdf05d18ca815ca57@mail.gmail.com> <17991.47259.210100.801472@localhost.localdomain> <85d50wq6a9.fsf@lola.goethe.zz> Reply-To: tromey@redhat.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1179770477 5431 80.91.229.12 (21 May 2007 18:01:17 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 21 May 2007 18:01:17 +0000 (UTC) Cc: emacs-devel@gnu.org To: David Reitter Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon May 21 20:01:14 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HqCC2-0000vE-77 for ged-emacs-devel@m.gmane.org; Mon, 21 May 2007 20:01:14 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HqCC1-0001qU-Sc for ged-emacs-devel@m.gmane.org; Mon, 21 May 2007 14:01:13 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HqCBY-0001Qu-Fo for emacs-devel@gnu.org; Mon, 21 May 2007 14:00:44 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HqCBX-0001Py-Ot for emacs-devel@gnu.org; Mon, 21 May 2007 14:00:44 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HqCBX-0001Pj-JO for emacs-devel@gnu.org; Mon, 21 May 2007 14:00:43 -0400 Original-Received: from mx1.redhat.com ([66.187.233.31]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1HqCBX-0000pe-1D for emacs-devel@gnu.org; Mon, 21 May 2007 14:00:43 -0400 Original-Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.1/8.13.1) with ESMTP id l4LI0bL4017536; Mon, 21 May 2007 14:00:37 -0400 Original-Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [10.11.255.20]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id l4LI0alI011918; Mon, 21 May 2007 14:00:36 -0400 Original-Received: from opsy.redhat.com (ton.toronto.redhat.com [172.16.14.15]) by pobox.corp.redhat.com (8.13.1/8.13.1) with ESMTP id l4LI0YsP025880; Mon, 21 May 2007 14:00:34 -0400 Original-Received: by opsy.redhat.com (Postfix, from userid 500) id 6A16B88835A; Mon, 21 May 2007 11:40:57 -0600 (MDT) X-Attribution: Tom In-Reply-To: (David Reitter's message of "Mon\, 21 May 2007 11\:17\:54 +0100") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.95 (gnu/linux) X-detected-kernel: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:71536 Archived-At: >>>>> "David" == David Reitter writes: David> I just had a look at package.el. A few comments: Thanks for your time and your feedback. If emacs-devel folks don't like this traffic here we can move it elsewhere. `elpa@tromey.com' is my package.el address. >> If you don't know what "eval" means, it means that you should copy >> this into your *scratch* buffer, move your cursor just after the >> final closing paren, and type C-j. David> *scratch* is not guaranteed to be in emacs-lisp-mode. So C-j might David> not work. M-x eval-region would! I wasn't aware of this. Is this a common situation? Those instructions are intended for people who know very little about Emacs; are they likely to have changed the mode for *scratch*? David> From your installer file: David> (expand-file-name "~/.emacs.d/elpa") David> please don't assume that this directory is something where you can David> (or the user wants to) install things. David> There should be a customization variable for this. This applies David> to package.el itself as well, where you have a defvar, not a David> defcustom, for package-user-dir. Yes, I agree. I don't know much about custom (my last emacs lisp hacking experience predates the existence of custom -- sad but true). But I will learn and I'll make the appropriate fix. However, for the installer, I think this is an ok choice. I don't see how we would support customizing the package install directory before actually installing package.el. And, I suspect users who know about and use features like this probably won't have much trouble hand installing package.el. What do you think about this? David> In package.el, I'm not sure what's going on with `package-activated- David> list', but you seem to make assumptions about which packages are David> installed by default. Yes. package.el knows a bit about which packages are shipped as part of Emacs. This supports one of the use cases I was interested in, something I've run into a reasonable number of times. The use case is this: suppose I install some package, for example ERC, in my $HOME. Then later I upgrade to Emacs 22, which includes ERC. At this point I want my private ERC to be deactivated in favor of Emacs' built-in version. But then later I may upgrade to a later ERC, in which case I want to use my newer private copy again. In package.el this is solved by knowing the versions of large packages which are included in Emacs. This list isn't complete though -- known bug. David> Does your code also check for actually installed files? Nope. It could though, I think, perhaps not without drastically slowing down Emacs startup. I want to avoid that as much as possible. I suppose my ideal situation here would be for distros to support package.el directly (my real ideal was to get this into Emacs itself but that is looking less likely :-). This is intentionally not hard to do... but I think it is still a bit early to approach them on this topic. Tom