From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: phillip.lord@newcastle.ac.uk (Phillip Lord) Newsgroups: gmane.emacs.devel Subject: Re: package.el, auto-installation, and auto-removal Date: Tue, 11 Nov 2014 12:44:02 +0000 Message-ID: <87389pvre5.fsf@newcastle.ac.uk> References: <87a943umku.fsf@lifelogs.com> <87ppcvm7fj.fsf@newcastle.ac.uk> <87vbmndk46.fsf@lifelogs.com> <87bnoeed7v.fsf@lifelogs.com> <87389qe92k.fsf@lifelogs.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1415709924 16155 80.91.229.3 (11 Nov 2014 12:45:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 11 Nov 2014 12:45:24 +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 13:45:17 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 1XoAot-0000tC-JO for ged-emacs-devel@m.gmane.org; Tue, 11 Nov 2014 13:45:15 +0100 Original-Received: from localhost ([::1]:48201 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XoAos-0004i4-RN for ged-emacs-devel@m.gmane.org; Tue, 11 Nov 2014 07:45:14 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59524) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XoAnp-0003sd-M6 for emacs-devel@gnu.org; Tue, 11 Nov 2014 07:44:14 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XoAnk-0005L2-Q5 for emacs-devel@gnu.org; Tue, 11 Nov 2014 07:44:09 -0500 Original-Received: from cheviot22.ncl.ac.uk ([128.240.234.22]:43683) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XoAnk-0005Ku-Ht for emacs-devel@gnu.org; Tue, 11 Nov 2014 07:44:04 -0500 Original-Received: from smtpauth-vm.ncl.ac.uk ([10.8.233.129] helo=smtpauth.ncl.ac.uk) by cheviot22.ncl.ac.uk with esmtp (Exim 4.63) (envelope-from ) id 1XoAni-0003LP-Eg; Tue, 11 Nov 2014 12:44:02 +0000 Original-Received: from jangai.ncl.ac.uk ([10.66.67.223] helo=localhost) by smtpauth.ncl.ac.uk with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.63) (envelope-from ) id 1XoAni-0000pI-BL; Tue, 11 Nov 2014 12:44:02 +0000 In-Reply-To: (Stefan Monnier's message of "Mon, 10 Nov 2014 22:55:34 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 128.240.234.22 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:176745 Archived-At: Stefan Monnier writes: >> Pallet hooks (through advice) into package installations, plus it can >> discover the starting list of packages. It then maintains a Cask file. > > OK, next question: what's a Cask file? > >> So it does what you asked for at the beginning of this thread, but >> relays the actual package management to Cask. > > You mean package.el isn't actually used? > >> Cask manages a list of packages in an external file. It's aware of >> dependencies, repos, etc. and is quite popular for its ease of use. > > "Aware of" isn't sufficient for me to understand what it does with that info. > >> As Phillip Lord said, bundling Cask would remove its Python >> requirement and perhaps improve the user experience with package.el >> and the various ELPAs. > > What functionality does it provide for the user (other than > auto-removal of the packages that were not explicitly installed, and > the ability to install the same set of packages, obviously)? So, a brief outline of the various mechanisms for managing packages out of band. Cask is a package (with a small python launcher) that uses a "Cask" file. This is the cask file from cask itself. (source gnu) (source melpa) (package-file "cask.el") ;; (files "*.el" "bin" "templates") (development (depends-on "f") (depends-on "s")) It looks like Lisp but actually isn't; you can't put conditional statements in it for instance. Emacs reads it, and installs the relevant files, using package.el to do so. Cask can be used to configure your "daily" emacs. You can synchronise between several machines by just syncing your Cask file, and then running "cask install" which will pull down all the relevant packages. I do not use Cask for this purpose though. It also lets you run Emacs in batch, with a "sandbox" load-path; I use this to run unit tests both locally and on a continuous integration server. For this use, cask also integrates nicely with evm, which lets you tests for several versions of Emacs. I do use cask for this, and find it works well. Pallet is a package which advices the interactive features of package.el. When you install a package, it also writes the Cask file for you. I don't use pallet myself. So, it provides a GUI mechanism for managing your Cask file. In both cases, there is not specific support for deleting unused packages, although the data is there. In practice, you can just delete your elpa directory, and then run "cask install" to pull the stuff you need again. For myself, I John Wigely's use-package -- it provides a nice convenient way to configure and customise packages (something that Cask does not). So, you can do something like this... (use-package ace-jump-mode :bind ("C-." . ace-jump-mode)) It also has an ":ensure" keyword. So (use-package ace-jump-mode :ensure t :bind ("C-." . ace-jump-mode)) Will ensure that the package is installed and do so if not. I like this because I can just sync my .emacs file between (which I am going to do anyway). When I want to use a new package, I add a use-package statement to my .emacs, and the package installs on my machines next time I start Emacs. This works nicely, although I would quite like a command line tool for managing packages, it doesn't seem worth the effort of moving to Cask at the moment. At the moment, I have not tried elpakit. Sorry, Nic, I probably will give it a go now. I think that any of the solutions would work. What is interesting is that both Elpakit and Cask have additional stuff added. I've been really glad to get Cask working and have it running my test cases for me, outside of my daily emacs. But it's not strictly necessary for persistantly managing packages.