Use Olivetti and define-word!

Added `ignore-errors` such that this won't fail when there is no
connection to the internet.

Also renamed the section from Package to Packages.
This commit is contained in:
Lars Tveito 2015-08-06 17:02:56 +02:00
parent 606cb5f199
commit 0207821219

View File

@ -127,7 +127,7 @@
(load-file private-file)))))
#+END_SRC
** Package
** Packages
Managing extensions for Emacs is simplified using =package= which is
built in to Emacs 24 and newer. To load downloaded packages we need to
@ -159,7 +159,9 @@
'(ace-jump-mode ; quick cursor location minor mode
auto-compile ; automatically compile Emacs Lisp libraries
centered-window-mode ; Center the text when there's only one window
cider ; Clojure Interactive Development Environment
company ; Modular text completion framework
define-word ; display the definition of word at point
diminish ; Diminished modes from modeline
elscreen ; window session manager
expand-region ; Increase selected region by semantic units
@ -177,22 +179,22 @@
monokai-theme ; A fruity color theme for Emacs
move-text ; Move current line or region with M-up or M-down
multiple-cursors ; Multiple cursors for Emacs.
olivetti ; Minor mode for a nice writing environment
org ; Outline-based notes management and organizer
paredit ; minor mode for editing parentheses
powerline ; Rewrite of Powerline
pretty-lambdada ; the word `lambda' as the Greek letter.
projectile ; Manage and navigate projects in Emacs easily
slime ; Superior Lisp Interaction Mode for Emacs
undo-tree ; Treat undo history as a tree
try)) ; Try out Emacs packages
;; Remove all packages already installed
(packages (remove-if 'package-installed-p packages)))
(when packages
(package-refresh-contents)
(ignore-errors (package-refresh-contents)
(mapcar 'package-install packages)
;; This package is only relevant for Mac OS X.
(when (memq window-system '(mac ns))
(package-install 'exec-path-from-shell))))
(package-install 'exec-path-from-shell)))))
#+END_SRC
** Mac OS X
@ -1163,6 +1165,19 @@
"A keymap for custom bindings.")
#+END_SRC
Bindings for [[https://github.com/rnkn/olivetti][olivetti]].
#+BEGIN_SRC emacs-lisp
(define-key custom-bindings-map (kbd "C-c [") 'olivetti-shrink)
(define-key custom-bindings-map (kbd "C-c ]") 'olivetti-expand)
#+END_SRC
Bindings for [[https://github.com/abo-abo/define-word][define-word]].
#+BEGIN_SRC emacs-lisp
(define-key custom-bindings-map (kbd "C-c D") 'define-word-at-point)
#+END_SRC
Bindings for [[https://github.com/magnars/expand-region.el][expand-region]].
#+BEGIN_SRC emacs-lisp