all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: phillip.lord@newcastle.ac.uk (Phillip Lord)
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: package.el, auto-installation, and auto-removal
Date: Tue, 11 Nov 2014 12:44:02 +0000	[thread overview]
Message-ID: <87389pvre5.fsf@newcastle.ac.uk> (raw)
In-Reply-To: <jwvr3xacs90.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Mon, 10 Nov 2014 22:55:34 -0500")



Stefan Monnier <monnier@iro.umontreal.ca> 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.





  reply	other threads:[~2014-11-11 12:44 UTC|newest]

Thread overview: 80+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-07 13:45 package.el, auto-installation, and auto-removal Stefan Monnier
2014-11-07 14:12 ` Ted Zlatanov
2014-11-07 19:50   ` joakim
2014-11-08  4:27     ` Stefan Monnier
2014-11-10 14:55   ` Phillip Lord
2014-11-10 17:46     ` Ted Zlatanov
2014-11-10 20:27       ` Nic Ferrier
2014-11-10 21:49         ` Stefan Monnier
2014-11-10 22:02           ` package and testing rant (was Re: package.el, auto-installation, and auto-removal) Nic Ferrier
2014-11-10 23:24             ` Stefan Monnier
2014-11-11  2:53               ` Drew Adams
2014-11-11 11:41               ` Nic Ferrier
2014-11-11 16:03                 ` Eli Zaretskii
2014-11-11 17:17                   ` Nic Ferrier
2014-11-11 17:20                   ` Stefan Monnier
2014-11-11 17:53                     ` Eli Zaretskii
2014-11-11 16:24                 ` Stefan Monnier
2014-11-11 17:15                   ` Nic Ferrier
2014-11-11 15:57               ` Eli Zaretskii
2014-11-11 17:18                 ` Stefan Monnier
2014-11-11 17:52                   ` Eli Zaretskii
2014-11-11 18:04                     ` David Kastrup
2014-11-12  3:20                       ` Stephen J. Turnbull
2014-11-12  6:48                         ` David Kastrup
2014-11-11 17:27                 ` Nic Ferrier
2014-11-11 18:20               ` Achim Gratz
2014-11-12 16:13                 ` Stefan Monnier
2014-11-12 17:00                   ` Stephen Leake
2014-11-12 17:51                   ` Nic Ferrier
2014-11-12 20:34                     ` Stefan Monnier
2014-11-12 21:39                       ` Nic Ferrier
2014-11-12 22:40                         ` Stefan Monnier
2014-11-12 23:01                           ` Nic Ferrier
2014-11-12 23:31                             ` Stefan Monnier
2014-11-13  1:09                             ` Stephen J. Turnbull
2014-11-13  5:06                             ` Richard Stallman
2014-11-13 14:59                               ` Nic Ferrier
2014-11-15 17:09                             ` Stephen Leake
2014-11-15 18:20                               ` Nic Ferrier
2014-11-16  3:49                                 ` Stefan Monnier
2014-11-13  8:18                           ` Thien-Thi Nguyen
2014-11-13 10:53                         ` Phillip Lord
2014-11-13 14:54                           ` Nic Ferrier
2014-11-14 11:04                             ` Phillip Lord
2014-11-14 22:56                               ` Nic Ferrier
2014-11-12 18:15                   ` Achim Gratz
2014-11-12 22:21                     ` Stefan Monnier
2014-11-13 20:21                       ` Achim Gratz
2014-11-12 13:05               ` Stephen Leake
2014-11-11 13:30             ` Phillip Lord
2014-11-11 14:12               ` Nic Ferrier
2014-11-11 16:26                 ` Stefan Monnier
2014-11-11 17:13                   ` Nic Ferrier
2014-11-12 16:14                     ` Stefan Monnier
2014-11-12 17:02                       ` Stephen Leake
2014-11-12 17:21                         ` Stefan Monnier
2014-11-10 21:37       ` package.el, auto-installation, and auto-removal Stefan Monnier
2014-11-11  1:29         ` Ted Zlatanov
2014-11-11  2:26           ` Stefan Monnier
2014-11-11  2:59             ` Ted Zlatanov
2014-11-11  3:55               ` Stefan Monnier
2014-11-11 12:44                 ` Phillip Lord [this message]
2014-11-11 13:31                   ` Nic Ferrier
2014-11-11 11:31             ` Nic Ferrier
2014-11-11 16:22               ` Stefan Monnier
2014-11-11 17:10                 ` Nic Ferrier
2014-11-11 19:36                   ` Achim Gratz
2014-11-11 20:40                     ` Nic Ferrier
2014-11-11 21:53                       ` Stefan Monnier
2014-11-12 22:17                         ` Nic Ferrier
2014-11-12 22:59                           ` Stefan Monnier
2014-11-12 23:26                             ` Nic Ferrier
2014-11-13  0:21                               ` Stefan Monnier
2014-11-07 20:00 ` Nic Ferrier
2014-11-08  4:29   ` Stefan Monnier
2014-11-08 23:18     ` Nic Ferrier
2014-11-09  3:17       ` Stefan Monnier
  -- strict thread matches above, loose matches on Subject: below --
2014-11-11 20:55 Robert Dallas Gray
2014-11-11 21:34 ` Nic Ferrier
2014-11-13 10:46   ` Phillip Lord

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=87389pvre5.fsf@newcastle.ac.uk \
    --to=phillip.lord@newcastle.ac.uk \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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.