One way of doing could be to install package if not already installed, you should update your init file, and add those lines:
(defvar my-packages
'(color-theme db-pg db kv magit-push-remote magit-tramp
magit git-rebase-mode git-commit-mode pg
pretty-lambdada projectile pkg-info epl dash
python-mode rich-minority s yasnippet yasnippet-bundle
use-package key-chord undo-tree guide-key move-text
openwith ack ag aggressive-indent nginx-mode multiple-cursors
smartparens with-editor haskell-mode)
"A list of packages to ensure are installed at launch.")
(defun my-packages-installed-p ()
(loop for p in my-packages
when (not (package-installed-p p)) do (return nil)
finally (return t)))
(unless (my-packages-installed-p)
;; check for new packages (package versions)
(package-refresh-contents)
;; install the missing packages
(dolist (p my-packages)
(when (not (package-installed-p p))
(package-install p))))
Modify the my-packages
variable and add/remove the package you want to be installed. M-x describe-variable package-activated-list
will give you the list of your currently installed package.
After that, the only thing to share is your init file.
I hope it will help.
.emacs.d
directory (or preferably putting it under version control) is generally a good idea. (It's also sensible to rename~/.emacs
to~/.emacs.d/init.el
if you decide to do this.)