help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to Port Setup to Different OS?


From: John Mastro
Subject: Re: How to Port Setup to Different OS?
Date: Wed, 5 Nov 2014 14:39:26 -0800

 Ari King <ari.brandeis.king@gmail.com> wrote:
> I've installed and configured Emacs with various ELPA, MELPA,
> Marmalade packages on Ubuntu. I'd like to take this setup and re-use
> it with Emacs on Windows. Is there a way for me to have emacs
> automatically install the packages rather than manually selecting them
> via the package manager? Thanks.

I just put something like the following in my init file. You have to
list the packages explicitly, but you'd probably need to do that anyway.

    (require 'package)

    (add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/";))

    (package-initialize)

    (let* ((packages '(some-mode
                       some-other-mode
                       and-so-on))
           (needed (cl-loop for pkg in packages
                            unless (package-installed-p pkg) collect pkg)))
      (when needed
        (package-refresh-contents)
        (mapc #'package-install needed)))

-- 
john



reply via email to

[Prev in Thread] Current Thread [Next in Thread]