[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Sharing .emacs.d between different hosts: issues with shared elpa fo
From: |
Rasmus |
Subject: |
Re: Sharing .emacs.d between different hosts: issues with shared elpa folder |
Date: |
Sun, 25 Jan 2015 15:06:29 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) |
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!