Browse Source

Do an automatic package upgrade in prelude-update

custom
Bozhidar Batsov 12 years ago
parent
commit
3c8c7dec05
  1. 31
      README.md
  2. 4
      core/prelude-core.el
  3. 2
      core/prelude-packages.el

31
README.md

@ -90,13 +90,15 @@ You'd do well to replace `~/.emacs.d` with the value of
## Updating Prelude ## Updating Prelude
### Manual update
The update procedure is fairly straightforward and consists of 3 steps: The update procedure is fairly straightforward and consists of 3 steps:
### Update all bundled packages
#### Update all bundled packages
Just run <kbd>M-x package-list-packages RET U x</kbd>. Unfortunately this step cannot be automated.
Just run <kbd>M-x package-list-packages RET U x</kbd>.
### Update Prelude's code
#### Update Prelude's code
```bash ```bash
cd path/to/prelude/installation cd path/to/prelude/installation
@ -106,14 +108,16 @@ git pull
The `path/to/prelude/installation` is usually `~/.emacs.d` (at least The `path/to/prelude/installation` is usually `~/.emacs.d` (at least
on Unix systems). on Unix systems).
Alternatively you can run <kbd>M-x prelude-update</kbd> from Emacs itself.
### Restart Prelude
#### Restart Prelude
It's generally a good idea to stop Emacs after you do the update. The It's generally a good idea to stop Emacs after you do the update. The
next time Prelude starts it will install any new dependencies (if next time Prelude starts it will install any new dependencies (if
there are such). there are such).
### Automatic update
Simply run <kbd>M-x prelude-update</kbd> from Emacs itself and restart Emacs afterwards.
## Enabling additional modules ## Enabling additional modules
By default most of the modules that ship with Prelude are not loaded. For more information on the functionality provided by these modules visit the [docs](modules/doc/README.md). By default most of the modules that ship with Prelude are not loaded. For more information on the functionality provided by these modules visit the [docs](modules/doc/README.md).
@ -428,17 +432,18 @@ If you're not fond of spellchecking on the fly:
### Updating bundled packages ### Updating bundled packages
Currently there is no Emacs Lisp API for updating packages, so you'll
have to update manually the packages that came with Prelude from time
to time.
`M-x package-list-packages RET U x`
Generally it's a good idea to do a package update before running Generally it's a good idea to do a package update before running
`prelude-update`, since the latest Prelude code might depend on newer
updating Prelude, since the latest Prelude code might depend on newer
versions of the bundled packages than you would currently have versions of the bundled packages than you would currently have
installed. installed.
If you're doing manual Prelude updates you should always do a package update first.
`M-x package-list-packages RET U x`
That's not necessary if you're using `M-x prelude-update`, since it
will automatically update the installed packages.
### Problems with flyspell-mode ### Problems with flyspell-mode
Prelude makes heavy use of the flyspell-mode package for spell Prelude makes heavy use of the flyspell-mode package for spell

4
core/prelude-core.el

@ -450,10 +450,14 @@ Doesn't mess with special buffers."
(exchange-point-and-mark) (exchange-point-and-mark)
(deactivate-mark nil)) (deactivate-mark nil))
(require 'epl)
(defun prelude-update () (defun prelude-update ()
"Update Prelude to its latest version." "Update Prelude to its latest version."
(interactive) (interactive)
(when (y-or-n-p "Do you want to update Prelude? ") (when (y-or-n-p "Do you want to update Prelude? ")
(message "Updating installed packages...")
(epl-upgrade)
(message "Updating Prelude...") (message "Updating Prelude...")
(cd prelude-dir) (cd prelude-dir)
(shell-command "git pull") (shell-command "git pull")

2
core/prelude-packages.el

@ -42,7 +42,7 @@
(defvar prelude-packages (defvar prelude-packages
'(ace-jump-mode ack-and-a-half anzu dash diminish elisp-slime-nav '(ace-jump-mode ack-and-a-half anzu dash diminish elisp-slime-nav
expand-region flx-ido flycheck gist
epl expand-region flx-ido flycheck gist
git-commit-mode gitconfig-mode gitignore-mode grizzl git-commit-mode gitconfig-mode gitignore-mode grizzl
guru-mode helm helm-projectile ido-ubiquitous guru-mode helm helm-projectile ido-ubiquitous
key-chord magit move-text rainbow-mode key-chord magit move-text rainbow-mode

Loading…
Cancel
Save