From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nic Ferrier Newsgroups: gmane.emacs.devel Subject: Re: package.el, auto-installation, and auto-removal Date: Tue, 11 Nov 2014 17:10:51 +0000 Message-ID: <871tp9k6hw.fsf@ferrier.me.uk> References: <87a943umku.fsf@lifelogs.com> <87ppcvm7fj.fsf@newcastle.ac.uk> <87vbmndk46.fsf@lifelogs.com> <87bnoeed7v.fsf@lifelogs.com> <8761emkm7l.fsf@ferrier.me.uk> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1415725881 3042 80.91.229.3 (11 Nov 2014 17:11:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 11 Nov 2014 17:11:21 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Nov 11 18:11:12 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XoEyE-0005YK-90 for ged-emacs-devel@m.gmane.org; Tue, 11 Nov 2014 18:11:10 +0100 Original-Received: from localhost ([::1]:49913 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XoEyD-0004V0-QD for ged-emacs-devel@m.gmane.org; Tue, 11 Nov 2014 12:11:09 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37526) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XoEy4-0004UZ-Us for emacs-devel@gnu.org; Tue, 11 Nov 2014 12:11:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XoExy-0001KP-MC for emacs-devel@gnu.org; Tue, 11 Nov 2014 12:11:00 -0500 Original-Received: from static.17.66.46.78.clients.your-server.de ([78.46.66.17]:55588 helo=po1.ferrier.me.uk) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XoExy-0001KC-Fj for emacs-devel@gnu.org; Tue, 11 Nov 2014 12:10:54 -0500 Original-Received: from nicferrier-dell-xps (140.35.155.90.in-addr.arpa [90.155.35.140]) by po1.ferrier.me.uk (Postfix) with ESMTPA id B9163AC0498; Tue, 11 Nov 2014 18:29:14 +0100 (CET) Original-Received: from nicferrier-XPS13-9333 (localhost [127.0.0.1]) by nicferrier-dell-xps (Postfix) with ESMTPS id 47F686BA00; Tue, 11 Nov 2014 17:10:51 +0000 (GMT) In-Reply-To: (Stefan Monnier's message of "Tue, 11 Nov 2014 11:22:11 -0500") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 78.46.66.17 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:176761 Archived-At: Stefan Monnier writes: >> It would be nice to keep it as a directory structure because they are >> easier to edit: >> .emacs.d/elpa/ >> .emacs.d/elpa/archives/ >> .emacs.d/elpa/archives/marmalade/ >> .emacs.d/elpa/archives/gnu/ >> .emacs.d/elpa/archives/user-installed/ >> .emacs.d/elpa/archives/user-installed/elnode >> .emacs.d/elpa/archives/user-installed/rcirc > > I was thinking of keeping it in a Custom var, since that's easy to edit. > So the equivalent of a Cask file could look like > > % cat CaskNG.el > (setq package-archives ((gnu ...) > (melpa ...))) > (setq packages-installed '(dash foo bar)) > ... > % > > and you could run your tests with something like > > emacs --batch -l CaskNG.el -f package-install-packages ... I don't think a custom var is as good as something persistent in the file system. It would be completely orthogonal to the existing data storage which is all in the elpa dir (even the package-archives variable is just an index of what is actually stored nicely in the elpa directory, you can't recreate it wholly from there, but it's good enough). Great that you used a cask example. Because you'd actually need python to run that. Hurray! > So, my request is for someone to help set up the core of this, i.e. add > the `packages-installed' var (automatically updated by > package-install/delete and friends (I notice now that package-delete is > not a command, surprisingly)), and add the package-install-packages > command (so users can install their packages on a new system simply by > setting packages-installed and then running package-install-packages). > Bonus points for writing `package-gc' which deletes packages not > required by packages-installed. Yeah, as I say elpakit already has this. I could extract the code. One thing about elpakit's solution is that elpakit does this by making a package with the right dependencies. Elpakit's solution is in fact just a package depend builder. Choose X, Y and Z packages and then make a new package depending on those. Maybe the current package installed by user state could be constantly regenerated as a package. The reason elpakit does that was in response to teams of clojure users who wanted to homogenize their emacs config. So we made a system where they could generate a base package to pull in all standard packages. And then they could all iterate on top of that. So making a new package all the time would be kinda useful because you could easily share it with other people. What do you think of that idea? Nic