Removed mail and updated the packages section.

This commit is contained in:
larstvei 2013-12-29 19:19:14 +01:00
parent 78337bae43
commit 5477b1f7bc
3 changed files with 74 additions and 72 deletions

65
init.el
View File

@ -35,35 +35,31 @@ PACKAGE is installed and the current version is deleted."
(package-desc-vers (cdr pkg-desc))))) (package-desc-vers (cdr pkg-desc)))))
(package-install package)))) (package-install package))))
(let ((packages (package-refresh-contents)
'(ac-geiser ; Auto-complete backend for geiser (dolist (package
ac-slime ; An auto-complete source using slime completions '(ac-geiser ; Auto-complete backend for geiser
ace-jump-mode ; quick cursor location minor mode ac-slime ; An auto-complete source using slime completions
auto-compile ; automatically compile Emacs Lisp libraries ace-jump-mode ; quick cursor location minor mode
auto-complete ; auto completion auto-compile ; automatically compile Emacs Lisp libraries
elscreen ; window session manager auto-complete ; auto completion
expand-region ; Increase selected region by semantic units elscreen ; window session manager
flx-ido ; flx integration for ido expand-region ; Increase selected region by semantic units
ido-vertical-mode ; Makes ido-mode display vertically. flx-ido ; flx integration for ido
geiser ; GNU Emacs and Scheme talk to each other ido-vertical-mode ; Makes ido-mode display vertically.
haskell-mode ; A Haskell editing mode geiser ; GNU Emacs and Scheme talk to each other
jedi ; Python auto-completion for Emacs haskell-mode ; A Haskell editing mode
magit ; control Git from Emacs jedi ; Python auto-completion for Emacs
markdown-mode ; Emacs Major mode for Markdown-formatted files. magit ; control Git from Emacs
monokai-theme ; A fruity color theme for Emacs. markdown-mode ; Emacs Major mode for Markdown-formatted files.
move-text ; Move current line or region with M-up or M-down monokai-theme ; A fruity color theme for Emacs.
multiple-cursors ; Multiple cursors for Emacs. move-text ; Move current line or region with M-up or M-down
org ; Outline-based notes management and organizer multiple-cursors ; Multiple cursors for Emacs.
paredit ; minor mode for editing parentheses org ; Outline-based notes management and organizer
pretty-lambdada ; the word `lambda' as the Greek letter. paredit ; minor mode for editing parentheses
;; slime ; Superior Lisp Interaction Mode for Emacs pretty-lambdada ; the word `lambda' as the Greek letter.
smex ; M-x interface with Ido-style fuzzy matching. smex ; M-x interface with Ido-style fuzzy matching.
))) ))
;; 'remove-if' is a part of the cl-library, so we require this feature. (upgrade-or-install-package package))
(require 'cl)
(package-refresh-contents)
;; Filter out installed packages and install the remaining.
(mapc 'upgrade-or-install-package packages))
(dolist (feature (dolist (feature
'(auto-compile ; auto-compile .el files '(auto-compile ; auto-compile .el files
@ -89,6 +85,10 @@ PACKAGE is installed and the current version is deleted."
auto-fill-function 'do-auto-fill ; Auto-fill-mode everywhere. auto-fill-function 'do-auto-fill ; Auto-fill-mode everywhere.
) )
(let ((default-directory (concat user-emacs-directory "site-lisp/")))
(normal-top-level-add-to-load-path '("."))
(normal-top-level-add-subdirs-to-load-path))
(fset 'yes-or-no-p 'y-or-n-p) (fset 'yes-or-no-p 'y-or-n-p)
(defvar emacs-autosave-directory (defvar emacs-autosave-directory
@ -152,11 +152,6 @@ PACKAGE is installed and the current version is deleted."
(smex-initialize) (smex-initialize)
(global-set-key (kbd "M-x") 'smex) (global-set-key (kbd "M-x") 'smex)
(setq user-full-name "Lars Tveito"
user-mail-address "larstvei@ifi.uio.no"
smtpmail-smtp-server "smtp.uio.no"
smtpmail-smtp-service 587)
(defun calendar-show-week (arg) (defun calendar-show-week (arg)
"Displaying week number in calendar-mode." "Displaying week number in calendar-mode."
(interactive "P") (interactive "P")
@ -238,6 +233,8 @@ PACKAGE is installed and the current version is deleted."
(global-set-key (kbd "C-c a") 'mc/mark-all-like-this) (global-set-key (kbd "C-c a") 'mc/mark-all-like-this)
(global-set-key (kbd "C-c n") 'mc/mark-next-like-this) (global-set-key (kbd "C-c n") 'mc/mark-next-like-this)
(global-set-key (kbd "C-c m") 'magit-status)
(global-set-key (kbd "C-c SPC") 'ace-jump-mode) (global-set-key (kbd "C-c SPC") 'ace-jump-mode)
(global-set-key (kbd "C-c t") 'org-agenda-list) (global-set-key (kbd "C-c t") 'org-agenda-list)

View File

@ -66,7 +66,7 @@
(package-desc-vers (cdr newest-pkg-desc)))))) (package-desc-vers (cdr newest-pkg-desc))))))
#+END_SRC #+END_SRC
Let's write a function to install the package if it is not installed or Let's write a function to install a package if it is not installed or
upgrades it if a new version has been released. Here our predicate comes upgrades it if a new version has been released. Here our predicate comes
in handy. in handy.
@ -88,35 +88,31 @@
configurations are also dependent on them). configurations are also dependent on them).
#+BEGIN_SRC emacs-lisp :tangle yes #+BEGIN_SRC emacs-lisp :tangle yes
(let ((packages (package-refresh-contents)
'(ac-geiser ; Auto-complete backend for geiser (dolist (package
ac-slime ; An auto-complete source using slime completions '(ac-geiser ; Auto-complete backend for geiser
ace-jump-mode ; quick cursor location minor mode ac-slime ; An auto-complete source using slime completions
auto-compile ; automatically compile Emacs Lisp libraries ace-jump-mode ; quick cursor location minor mode
auto-complete ; auto completion auto-compile ; automatically compile Emacs Lisp libraries
elscreen ; window session manager auto-complete ; auto completion
expand-region ; Increase selected region by semantic units elscreen ; window session manager
flx-ido ; flx integration for ido expand-region ; Increase selected region by semantic units
ido-vertical-mode ; Makes ido-mode display vertically. flx-ido ; flx integration for ido
geiser ; GNU Emacs and Scheme talk to each other ido-vertical-mode ; Makes ido-mode display vertically.
haskell-mode ; A Haskell editing mode geiser ; GNU Emacs and Scheme talk to each other
jedi ; Python auto-completion for Emacs haskell-mode ; A Haskell editing mode
magit ; control Git from Emacs jedi ; Python auto-completion for Emacs
markdown-mode ; Emacs Major mode for Markdown-formatted files. magit ; control Git from Emacs
monokai-theme ; A fruity color theme for Emacs. markdown-mode ; Emacs Major mode for Markdown-formatted files.
move-text ; Move current line or region with M-up or M-down monokai-theme ; A fruity color theme for Emacs.
multiple-cursors ; Multiple cursors for Emacs. move-text ; Move current line or region with M-up or M-down
org ; Outline-based notes management and organizer multiple-cursors ; Multiple cursors for Emacs.
paredit ; minor mode for editing parentheses org ; Outline-based notes management and organizer
pretty-lambdada ; the word `lambda' as the Greek letter. paredit ; minor mode for editing parentheses
;; slime ; Superior Lisp Interaction Mode for Emacs pretty-lambdada ; the word `lambda' as the Greek letter.
smex ; M-x interface with Ido-style fuzzy matching. smex ; M-x interface with Ido-style fuzzy matching.
))) ))
;; 'remove-if' is a part of the cl-library, so we require this feature. (upgrade-or-install-package package))
(require 'cl)
(package-refresh-contents)
;; Filter out installed packages and install the remaining.
(mapc 'upgrade-or-install-package packages))
#+END_SRC #+END_SRC
** Require ** Require
@ -164,6 +160,17 @@
) )
#+END_SRC #+END_SRC
The =load-path= specifies where Emacs should look for =.el=-files (or
Emacs lisp files). I have a directory called =site-lisp= where I keep all
extensions that have been installed manually (these are mostly my own
projects).
#+BEGIN_SRC emacs-lisp :tangle yes
(let ((default-directory (concat user-emacs-directory "site-lisp/")))
(normal-top-level-add-to-load-path '("."))
(normal-top-level-add-subdirs-to-load-path))
#+END_SRC
Answering /yes/ and /no/ to each question from Emacs can be tedious, a Answering /yes/ and /no/ to each question from Emacs can be tedious, a
single /y/ or /n/ will suffice. single /y/ or /n/ will suffice.
@ -310,14 +317,6 @@
(global-set-key (kbd "M-x") 'smex) (global-set-key (kbd "M-x") 'smex)
#+END_SRC #+END_SRC
** Mail
#+BEGIN_SRC emacs-lisp :tangle yes
(setq user-full-name "Lars Tveito"
user-mail-address "larstvei@ifi.uio.no"
smtpmail-smtp-server "smtp.uio.no"
smtpmail-smtp-service 587)
#+END_SRC
** Calendar ** Calendar
Define a function to display week numbers in =calender-mode=. The snippet Define a function to display week numbers in =calender-mode=. The snippet
@ -477,6 +476,12 @@
(global-set-key (kbd "C-c n") 'mc/mark-next-like-this) (global-set-key (kbd "C-c n") 'mc/mark-next-like-this)
#+END_SRC #+END_SRC
Bindings for [[http://magit.github.io][Magit]].
#+BEGIN_SRC emacs-lisp :tangle yes
(global-set-key (kbd "C-c m") 'magit-status)
#+END_SRC
Bindings for [[https://github.com/winterTTr/ace-jump-mode][ace-jump-mode]]. Bindings for [[https://github.com/winterTTr/ace-jump-mode][ace-jump-mode]].
#+BEGIN_SRC emacs-lisp :tangle yes #+BEGIN_SRC emacs-lisp :tangle yes

BIN
init.pdf

Binary file not shown.