unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* How to Port Setup to Different OS?
@ 2014-11-05 18:39 Ari King
  2014-11-05 18:42 ` Grant Rettke
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Ari King @ 2014-11-05 18:39 UTC (permalink / raw)
  To: help-gnu-emacs

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.

-Ari


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: How to Port Setup to Different OS?
  2014-11-05 18:39 How to Port Setup to Different OS? Ari King
@ 2014-11-05 18:42 ` Grant Rettke
  2014-11-06  0:17   ` Alexis
  2014-11-05 22:39 ` John Mastro
  2014-11-05 23:25 ` Steven Knight
  2 siblings, 1 reply; 8+ messages in thread
From: Grant Rettke @ 2014-11-05 18:42 UTC (permalink / raw)
  To: Ari King; +Cc: Emacs Help

https://github.com/dimitri/el-get

and

https://github.com/cask/cask

are two great options.

On Wed, Nov 5, 2014 at 12:39 PM, 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.
>
> -Ari



-- 
Grant Rettke
gcr@wisdomandwonder.com | http://www.wisdomandwonder.com/
“Wisdom begins in wonder.” --Socrates
((λ (x) (x x)) (λ (x) (x x)))
“Life has become immeasurably better since I have been forced to stop
taking it seriously.” --Thompson



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: How to Port Setup to Different OS?
  2014-11-05 18:39 How to Port Setup to Different OS? Ari King
  2014-11-05 18:42 ` Grant Rettke
@ 2014-11-05 22:39 ` John Mastro
  2014-11-05 23:25 ` Steven Knight
  2 siblings, 0 replies; 8+ messages in thread
From: John Mastro @ 2014-11-05 22:39 UTC (permalink / raw)
  To: help-gnu-emacs@gnu.org; +Cc: Ari King

 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



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: How to Port Setup to Different OS?
  2014-11-05 18:39 How to Port Setup to Different OS? Ari King
  2014-11-05 18:42 ` Grant Rettke
  2014-11-05 22:39 ` John Mastro
@ 2014-11-05 23:25 ` Steven Knight
  2014-11-06  2:40   ` Jorge Araya Navarro
  2 siblings, 1 reply; 8+ messages in thread
From: Steven Knight @ 2014-11-05 23:25 UTC (permalink / raw)
  To: Ari King, help-gnu-emacs

Hello Ari,

I suggest use-package[1].  Here's how you would use it:

; require package, update 'package-archives
(require 'package)
(add-to-list 'package-archives
               '("melpa" . "http://melpa.org/packages/") t)
(package-refresh-contents)
(package-initialize)

; install use-package if necessary
(unless (package-installed-p 'use-package)
   (package-install 'use-package))

; load use-package
(require 'use-package)

; install (if necessary) dash, better-defaults and web-mode
(use-package dash :ensure dash)
(use-package better-defaults :ensure better-defaults)
(use-package web-mode :ensure web-mode)

The ":ensure" option tells use-package to install the package if 
necessary [2].

Thank you,

[1] https://github.com/jwiegley/use-package
[2] https://github.com/jwiegley/use-package#for-packageel-users


--
Steven Knight steven@knight.cx <mailto:steven@knight.cx>

On Wed 05 Nov 2014 01:39:32 PM EST, 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.
>
> -Ari
>



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: How to Port Setup to Different OS?
  2014-11-05 18:42 ` Grant Rettke
@ 2014-11-06  0:17   ` Alexis
  0 siblings, 0 replies; 8+ messages in thread
From: Alexis @ 2014-11-06  0:17 UTC (permalink / raw)
  To: help-gnu-emacs


Grant Rettke writes:

> https://github.com/dimitri/el-get
>
> and
>
> https://github.com/cask/cask
>
> are two great options.

And, further to the Cask option:

https://github.com/rdallasgray/pallet


Alexis.



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: How to Port Setup to Different OS?
  2014-11-05 23:25 ` Steven Knight
@ 2014-11-06  2:40   ` Jorge Araya Navarro
  2014-11-06 18:43     ` Grant Rettke
  0 siblings, 1 reply; 8+ messages in thread
From: Jorge Araya Navarro @ 2014-11-06  2:40 UTC (permalink / raw)
  To: help-gnu-emacs


I actually generate a list of packages using a Python script inside a org source code block, resulting in a
.el file that is later loaded by Emacs.

You can take a look at my conf here[1], and the resulting file here[2]

I use this to same some time making my list of dependencies.

[1]: https://bitbucket.org/shackra/.emacs.d/src/c70ac0056202654c21ecf102ab6a1bbb9a103a5a/emacs-init.org?at=master#cl-91
[2]: https://bitbucket.org/shackra/.emacs.d/src/c70ac0056202654c21ecf102ab6a1bbb9a103a5a/paquetes.el?at=master

Steven Knight writes:

> Hello Ari,
>
> I suggest use-package[1].  Here's how you would use it:
>
> ; require package, update 'package-archives
> (require 'package)
> (add-to-list 'package-archives
>                '("melpa" . "http://melpa.org/packages/") t)
> (package-refresh-contents)
> (package-initialize)
>
> ; install use-package if necessary
> (unless (package-installed-p 'use-package)
>    (package-install 'use-package))
>
> ; load use-package
> (require 'use-package)
>
> ; install (if necessary) dash, better-defaults and web-mode
> (use-package dash :ensure dash)
> (use-package better-defaults :ensure better-defaults)
> (use-package web-mode :ensure web-mode)
>
> The ":ensure" option tells use-package to install the package if 
> necessary [2].
>
> Thank you,
>
> [1] https://github.com/jwiegley/use-package
> [2] https://github.com/jwiegley/use-package#for-packageel-users

-- 
Pax et bonum.
Jorge Araya Navarro.
ES: Diseñador Publicitario, Programador Python y colaborador en Parabola GNU/Linux-libre
EN: Ads Designer, Python programmer and contributor Parabola GNU/Linux-libre
EO: Anonco grafikisto, Pitino programalingvo programisto kai kontribuanto en Parabola GNU/Linux-libre
https://es.gravatar.com/shackra



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: How to Port Setup to Different OS?
  2014-11-06  2:40   ` Jorge Araya Navarro
@ 2014-11-06 18:43     ` Grant Rettke
  2014-11-06 21:48       ` Jorge Araya Navarro
  0 siblings, 1 reply; 8+ messages in thread
From: Grant Rettke @ 2014-11-06 18:43 UTC (permalink / raw)
  To: Jorge Araya Navarro; +Cc: Emacs Help

On Wed, Nov 5, 2014 at 8:40 PM, Jorge Araya Navarro
<elcorreo@deshackra.com> wrote:
> I actually generate a list of packages using a Python script inside a org source code block, resulting in a
> .el file that is later loaded by Emacs.

We ought to start a sub-list for org based Emacs configuration; they
are always interesting.



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: How to Port Setup to Different OS?
  2014-11-06 18:43     ` Grant Rettke
@ 2014-11-06 21:48       ` Jorge Araya Navarro
  0 siblings, 0 replies; 8+ messages in thread
From: Jorge Araya Navarro @ 2014-11-06 21:48 UTC (permalink / raw)
  To: Grant Rettke; +Cc: Emacs Help


Grant Rettke writes:

> On Wed, Nov 5, 2014 at 8:40 PM, Jorge Araya Navarro
> <elcorreo@deshackra.com> wrote:
>> I actually generate a list of packages using a Python script inside a org source code block, resulting in a
>> .el file that is later loaded by Emacs.
>
> We ought to start a sub-list for org based Emacs configuration; they
> are always interesting.

Indeed ;)

-- 
Pax et bonum.
Jorge Araya Navarro.
ES: Diseñador Publicitario, Programador Python y colaborador en Parabola GNU/Linux-libre
EN: Ads Designer, Python programmer and contributor Parabola GNU/Linux-libre
EO: Anonco grafikisto, Pitino programalingvo programisto kai kontribuanto en Parabola GNU/Linux-libre
https://es.gravatar.com/shackra



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2014-11-06 21:48 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-05 18:39 How to Port Setup to Different OS? Ari King
2014-11-05 18:42 ` Grant Rettke
2014-11-06  0:17   ` Alexis
2014-11-05 22:39 ` John Mastro
2014-11-05 23:25 ` Steven Knight
2014-11-06  2:40   ` Jorge Araya Navarro
2014-11-06 18:43     ` Grant Rettke
2014-11-06 21:48       ` Jorge Araya Navarro

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).