Mercurial > dotfiles
annotate .elisp/settings/00.bootstrap.el @ 336:ea73ef5dc38c
emacs: avoid weird package.el breakage with newish packages
I've been toting around this package.el from 2009 or so, and something
in the package format seems to have changed that broke me. Thanks to
some related diagnostics by Lucas, I've grabbed the last package.el
that worked with emacs 23 and stashed it here. This seems to work,
modulo some things (notably js2-mode and smex) now seem to require
emacs 24 if you install them using package.el, so this will end up
being brittle on my last couple of emacs23 machines.
author | Augie Fackler <raf@durin42.com> |
---|---|
date | Thu, 29 May 2014 14:30:42 -0400 |
parents | 4f49d70f1b69 |
children | 7e97572ac429 |
rev | line source |
---|---|
219
bb74667967e1
emacs bootstrap: record setup command for sanity
Augie Fackler <durin42@gmail.com>
parents:
214
diff
changeset
|
1 ;; emacs -l .elisp/settings/00.bootstrap.el --batch -f af-bootstrap-packages |
bb74667967e1
emacs bootstrap: record setup command for sanity
Augie Fackler <durin42@gmail.com>
parents:
214
diff
changeset
|
2 ;; Use the above for moving into a new machine |
214
2a4efba0fe8b
emacs: move package bootstrap to its own file
Augie Fackler <durin42@gmail.com>
parents:
diff
changeset
|
3 (add-to-list 'load-path (expand-file-name "~/.elisp")) |
336
ea73ef5dc38c
emacs: avoid weird package.el breakage with newish packages
Augie Fackler <raf@durin42.com>
parents:
328
diff
changeset
|
4 |
ea73ef5dc38c
emacs: avoid weird package.el breakage with newish packages
Augie Fackler <raf@durin42.com>
parents:
328
diff
changeset
|
5 ;; emacs 23 compat hack from Lucas Bergman |
ea73ef5dc38c
emacs: avoid weird package.el breakage with newish packages
Augie Fackler <raf@durin42.com>
parents:
328
diff
changeset
|
6 (unless (fboundp 'package-refresh-contents) |
ea73ef5dc38c
emacs: avoid weird package.el breakage with newish packages
Augie Fackler <raf@durin42.com>
parents:
328
diff
changeset
|
7 ;; If ELPA support isn't built in, we're in Emacs <=23. Normally, one |
ea73ef5dc38c
emacs: avoid weird package.el breakage with newish packages
Augie Fackler <raf@durin42.com>
parents:
328
diff
changeset
|
8 ;; would bootstrap ELPA from the source, tromey.com, but that sucks, |
ea73ef5dc38c
emacs: avoid weird package.el breakage with newish packages
Augie Fackler <raf@durin42.com>
parents:
328
diff
changeset
|
9 ;; because that version of package.el doesn't support multiple archives |
ea73ef5dc38c
emacs: avoid weird package.el breakage with newish packages
Augie Fackler <raf@durin42.com>
parents:
328
diff
changeset
|
10 ;; even in 2012. old/package.el is from http://bit.ly/pkg-el23, which is |
ea73ef5dc38c
emacs: avoid weird package.el breakage with newish packages
Augie Fackler <raf@durin42.com>
parents:
328
diff
changeset
|
11 ;; cited at https://github.com/technomancy/package.el as the last emacs23 |
ea73ef5dc38c
emacs: avoid weird package.el breakage with newish packages
Augie Fackler <raf@durin42.com>
parents:
328
diff
changeset
|
12 ;; version of package.el. |
ea73ef5dc38c
emacs: avoid weird package.el breakage with newish packages
Augie Fackler <raf@durin42.com>
parents:
328
diff
changeset
|
13 (unless (load (expand-file-name "~/.elisp/old/package.el")) |
ea73ef5dc38c
emacs: avoid weird package.el breakage with newish packages
Augie Fackler <raf@durin42.com>
parents:
328
diff
changeset
|
14 (error "ELPA is not in Emacs, and local package.el failed to load."))) |
ea73ef5dc38c
emacs: avoid weird package.el breakage with newish packages
Augie Fackler <raf@durin42.com>
parents:
328
diff
changeset
|
15 |
ea73ef5dc38c
emacs: avoid weird package.el breakage with newish packages
Augie Fackler <raf@durin42.com>
parents:
328
diff
changeset
|
16 |
214
2a4efba0fe8b
emacs: move package bootstrap to its own file
Augie Fackler <durin42@gmail.com>
parents:
diff
changeset
|
17 (package-initialize) |
2a4efba0fe8b
emacs: move package bootstrap to its own file
Augie Fackler <durin42@gmail.com>
parents:
diff
changeset
|
18 |
248
e703696d4df5
emacs bootstrap: moved my personal elpa archive
Augie Fackler <durin42@gmail.com>
parents:
236
diff
changeset
|
19 (setq package-archives '(("durin42" . "http://durin42.com/elpa/") |
299
4a7d426f22cb
emacs: add marmalade to elisp package repo list
Augie Fackler <raf@durin42.com>
parents:
276
diff
changeset
|
20 ("marmalade" . "http://marmalade-repo.org/packages/") |
323
aa5afa13e12c
emacs: add go-eldoc for better go programming
Augie Fackler <raf@durin42.com>
parents:
314
diff
changeset
|
21 ("melpa" . "http://melpa.milkbox.net/packages/") |
328
4f49d70f1b69
emacs: update path to ELPA repository
Augie Fackler <raf@durin42.com>
parents:
323
diff
changeset
|
22 ("elpa" . "http://elpa.gnu.org/packages/"))) |
214
2a4efba0fe8b
emacs: move package bootstrap to its own file
Augie Fackler <durin42@gmail.com>
parents:
diff
changeset
|
23 |
2a4efba0fe8b
emacs: move package bootstrap to its own file
Augie Fackler <durin42@gmail.com>
parents:
diff
changeset
|
24 (defun af-bootstrap-packages () |
2a4efba0fe8b
emacs: move package bootstrap to its own file
Augie Fackler <durin42@gmail.com>
parents:
diff
changeset
|
25 (interactive) |
2a4efba0fe8b
emacs: move package bootstrap to its own file
Augie Fackler <durin42@gmail.com>
parents:
diff
changeset
|
26 (unless package-archive-contents (package-refresh-contents)) |
2a4efba0fe8b
emacs: move package bootstrap to its own file
Augie Fackler <durin42@gmail.com>
parents:
diff
changeset
|
27 (dolist (pack '(diff-mode- |
2a4efba0fe8b
emacs: move package bootstrap to its own file
Augie Fackler <durin42@gmail.com>
parents:
diff
changeset
|
28 doctest-mode |
2a4efba0fe8b
emacs: move package bootstrap to its own file
Augie Fackler <durin42@gmail.com>
parents:
diff
changeset
|
29 http-twiddle |
2a4efba0fe8b
emacs: move package bootstrap to its own file
Augie Fackler <durin42@gmail.com>
parents:
diff
changeset
|
30 ipython |
2a4efba0fe8b
emacs: move package bootstrap to its own file
Augie Fackler <durin42@gmail.com>
parents:
diff
changeset
|
31 nose |
336
ea73ef5dc38c
emacs: avoid weird package.el breakage with newish packages
Augie Fackler <raf@durin42.com>
parents:
328
diff
changeset
|
32 |
214
2a4efba0fe8b
emacs: move package bootstrap to its own file
Augie Fackler <durin42@gmail.com>
parents:
diff
changeset
|
33 ;; disabled until I don't need a modified version |
2a4efba0fe8b
emacs: move package bootstrap to its own file
Augie Fackler <durin42@gmail.com>
parents:
diff
changeset
|
34 ;; textmate |
336
ea73ef5dc38c
emacs: avoid weird package.el breakage with newish packages
Augie Fackler <raf@durin42.com>
parents:
328
diff
changeset
|
35 |
214
2a4efba0fe8b
emacs: move package bootstrap to its own file
Augie Fackler <durin42@gmail.com>
parents:
diff
changeset
|
36 iedit |
336
ea73ef5dc38c
emacs: avoid weird package.el breakage with newish packages
Augie Fackler <raf@durin42.com>
parents:
328
diff
changeset
|
37 |
214
2a4efba0fe8b
emacs: move package bootstrap to its own file
Augie Fackler <durin42@gmail.com>
parents:
diff
changeset
|
38 ;; from elpa |
2a4efba0fe8b
emacs: move package bootstrap to its own file
Augie Fackler <durin42@gmail.com>
parents:
diff
changeset
|
39 js2-mode |
220 | 40 magit |
314
7cb31ed262f0
emacs: require markdown-mode
Augie Fackler <raf@durin42.com>
parents:
303
diff
changeset
|
41 markdown-mode |
214
2a4efba0fe8b
emacs: move package bootstrap to its own file
Augie Fackler <durin42@gmail.com>
parents:
diff
changeset
|
42 paredit |
236
3e1ec121efaf
emacs: use smex as a replacement for execute-extended-command
Augie Fackler <durin42@gmail.com>
parents:
220
diff
changeset
|
43 smex |
276
46979cef73b6
emacs: require and configure company mode
Augie Fackler <raf@durin42.com>
parents:
248
diff
changeset
|
44 yaml-mode |
303
6fd7c78744a6
emacs: install wgrep all the time
Augie Fackler <raf@durin42.com>
parents:
299
diff
changeset
|
45 company |
6fd7c78744a6
emacs: install wgrep all the time
Augie Fackler <raf@durin42.com>
parents:
299
diff
changeset
|
46 wgrep |
323
aa5afa13e12c
emacs: add go-eldoc for better go programming
Augie Fackler <raf@durin42.com>
parents:
314
diff
changeset
|
47 ;; for go-eldoc |
aa5afa13e12c
emacs: add go-eldoc for better go programming
Augie Fackler <raf@durin42.com>
parents:
314
diff
changeset
|
48 popup |
aa5afa13e12c
emacs: add go-eldoc for better go programming
Augie Fackler <raf@durin42.com>
parents:
314
diff
changeset
|
49 auto-complete |
aa5afa13e12c
emacs: add go-eldoc for better go programming
Augie Fackler <raf@durin42.com>
parents:
314
diff
changeset
|
50 go-autocomplete |
aa5afa13e12c
emacs: add go-eldoc for better go programming
Augie Fackler <raf@durin42.com>
parents:
314
diff
changeset
|
51 go-eldoc |
303
6fd7c78744a6
emacs: install wgrep all the time
Augie Fackler <raf@durin42.com>
parents:
299
diff
changeset
|
52 )) |
214
2a4efba0fe8b
emacs: move package bootstrap to its own file
Augie Fackler <durin42@gmail.com>
parents:
diff
changeset
|
53 (unless (or (member pack package-activated-list) |
2a4efba0fe8b
emacs: move package bootstrap to its own file
Augie Fackler <durin42@gmail.com>
parents:
diff
changeset
|
54 (functionp pack)) |
2a4efba0fe8b
emacs: move package bootstrap to its own file
Augie Fackler <durin42@gmail.com>
parents:
diff
changeset
|
55 (message "Installing %s" (symbol-name pack)) |
2a4efba0fe8b
emacs: move package bootstrap to its own file
Augie Fackler <durin42@gmail.com>
parents:
diff
changeset
|
56 (package-install pack)))) |