all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Rasmus <rasmus@gmx.us>
To: help-gnu-emacs@gnu.org
Subject: Re: Sharing .emacs.d between different hosts: issues with shared elpa folder
Date: Sun, 25 Jan 2015 15:06:29 +0100	[thread overview]
Message-ID: <87mw57t0nu.fsf@gmx.us> (raw)
In-Reply-To: 87lhkrnglm.fsf@gmail.com

Alexis <flexibeast@gmail.com> writes:

> Karl Voit writes:
>
>> I read that sharing the elpa folder is not recommended and I guess
>> this results in issues like the one above.
>>
>> I don't want to manage different sets of packages per host. So: how
>> do I accomplish working sharing of packages/dot-emacs?
>
> In terms of package management, you could perhaps use Pallet:
>
> https://github.com/rdallasgray/pallet
>
> to create a Cask file which you sync between your various systems, and
> then do `pallet-install` and `pallet-update` as required.

Here's what I do

    ;;* PACKAGES
    ;; Start by loading package

    (setq package-archives '(("gnu" . "http://elpa.gnu.org/packages/")
                             ("melpa" . "http://melpa.org/packages/")
                             ("marmalade" . "http://marmalade-repo.org/packages/")))

    (package-initialize)

    (defcustom rasmus/packages '(async auctex darkroom)
      "Packages to install.")

    (defun install-packages (pkgs)
      (let (updated)
        (mapc
         (lambda (pkg) (unless (package-installed-p pkg)
                         (unless updated
                           (package-refresh-contents)
                           (setq updated t))
                         (package-install pkg)))
         pkgs)))
      (install-packages rasmus/packages)

    (defun update-packages ()
      "Upgrade all installed packages."
      (interactive)
      (list-packages)
      (package-menu-mark-upgrades)
      (package-menu-mark-obsolete-for-deletion)
      (cl-letf (((symbol-function 'yes-or-no-p) (lambda (&optional arg) t))
                ((symbol-function 'y-or-n-p) (lambda (&optional arg) t)))
        ;; don't ask questions...  This may be risky.
        (package-menu-execute))
      (quit-window))

This file is part of ~/annex/conf.annex/.emacs.d  From ~/annex I do 

     stow -r conf.annex

My emacs.d look something like this:

    elpa
    abbrev_defs
    ac-comphist.dat
    bookmarks -> ../annex/conf.annex/.emacs.d/bookmarks
    init.el -> ../annex/conf.annex/.emacs.d/init.el
    init-org-async.el -> ../annex/conf.annex/.emacs.d/init-org-async.el
    lisp -> ../annex/conf.annex/.emacs.d/lisp
    network-security.data
    org-caldav-8b63d83.el -> ../annex/conf.annex/.emacs.d/org-caldav-8b63d83.el
    retired.el -> ../annex/conf.annex/.emacs.d/retired.el
    tramp

Thus, ~/.emacs.d/elpa/ is local to each computer, but controlled (partly)
via init.el which is under version-control.  I can install additional
packages on each computer as desired.

—Rasmus

-- 
Enough with the bla bla!




      reply	other threads:[~2015-01-25 14:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-23  9:33 Sharing .emacs.d between different hosts: issues with shared elpa folder Karl Voit
2015-01-25 13:18 ` Alexis
2015-01-25 14:06   ` Rasmus [this message]

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=87mw57t0nu.fsf@gmx.us \
    --to=rasmus@gmx.us \
    --cc=help-gnu-emacs@gnu.org \
    /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.