summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Tom Willemsen2013-02-17 22:53:36 +0100
committerGravatar Tom Willemsen2013-02-17 22:53:36 +0100
commit50ab6deeabf2769ed3c4ff67385fae768ff41ee2 (patch)
treeb9a00640fa4094948154e5090f8e2911d9613d42
parent791d7fd3a2fe6ae4407fe6fe9f2ea86e84dd315c (diff)
downloaddotfiles-50ab6deeabf2769ed3c4ff67385fae768ff41ee2.tar.gz
dotfiles-50ab6deeabf2769ed3c4ff67385fae768ff41ee2.zip
emacs: Move ERC config to org
-rw-r--r--.emacs.d/init.el8
-rw-r--r--.emacs.d/init.org81
-rw-r--r--.emacs.d/site-lisp/oni.el6
3 files changed, 70 insertions, 25 deletions
diff --git a/.emacs.d/init.el b/.emacs.d/init.el
index 217eb26..816c03d 100644
--- a/.emacs.d/init.el
+++ b/.emacs.d/init.el
@@ -96,13 +96,6 @@
(font . "Envy Code R:pixelsize=18")
(alpha 90 90)))
(setq elnode-do-init nil)
-(setq erc-autojoin-channels-alist
- '(("freenode.net" "#ninthfloor" "#emacs")))
-(setq erc-hide-list '("JOIN" "PART" "QUIT"))
-(setq erc-insert-timestamp-function 'erc-insert-timestamp-left)
-(setq erc-nick "ryuslash")
-(setq erc-timestamp-format "[%H:%M] ")
-(setq erc-timestamp-only-if-changed-flag nil)
(setq fci-rule-color "darkred")
(setq frame-title-format '(:eval (concat "emacs: " (buffer-name))))
(setq geiser-repl-history-filename "~/.emacs.d/geiser-history")
@@ -181,7 +174,6 @@
(add-hook 'diary-display-hook 'oni:diary-display-func)
(add-hook 'emacs-startup-hook 'oni:emacs-startup-func)
(add-hook 'emacs-lisp-mode-hook 'oni:emacs-lisp-mode-func)
-(add-hook 'erc-mode-hook 'oni:erc-mode-func)
(add-hook 'go-mode-hook 'oni:go-mode-func)
(add-hook 'gtags-mode-hook 'oni:gtags-mode-func)
(add-hook 'haskell-mode-hook 'oni:haskell-mode-func)
diff --git a/.emacs.d/init.org b/.emacs.d/init.org
index 95b935f..2687290 100644
--- a/.emacs.d/init.org
+++ b/.emacs.d/init.org
@@ -4,7 +4,18 @@
#+STARTUP: showall
#+LINK: yoshi-theme http://ryuslash.org/projects/yoshi-theme.html
-* Emacs init
+* gui
+
+ Remove the ~menu-bar~, ~tool-bar~ and ~scroll-bar~ from the UI since I
+ don't use them at all.
+
+ #+BEGIN_SRC emacs-lisp :tangle init2.el
+ (menu-bar-mode -1)
+ (scroll-bar-mode -1)
+ (tool-bar-mode -1)
+ #+END_SRC
+
+* load-path
Before doing anything else I should make sure that both the
directories ~/usr/local/emacs/share/emacs/site-lisp~ and
@@ -33,15 +44,6 @@
(load-theme 'yoshi t)
#+END_SRC
- Remove the ~menu-bar~, ~tool-bar~ and ~scroll-bar~ from the UI since I
- don't use them at all.
-
- #+BEGIN_SRC emacs-lisp :tangle init2.el
- (menu-bar-mode -1)
- (scroll-bar-mode -1)
- (tool-bar-mode -1)
- #+END_SRC
-
Add any other interesting paths to =load-path= and, if it exists,
load the ~loaddefs.el~ file from these directories.
@@ -55,6 +57,8 @@
"~/projects/emacs/pony-mode/src" "~/projects/emacs/php-mode"))
#+END_SRC
+* y-or-n-p
+
Don't ask ~yes~ or ~no~, ask ~y~ or ~n~, I've never had an accidental ~y~ so
far.
@@ -62,6 +66,8 @@
(defalias 'yes-or-no-p 'y-or-n-p)
#+END_SRC
+* ibuffer
+
Use =ibuffer= instead of the default =list-buffers= because it has many
more features.
@@ -69,12 +75,16 @@
(defalias 'list-buffers 'ibuffer)
#+END_SRC
+* hippie-expand
+
Do the same with =hippie-expand= and =dabbrev-expand=.
#+BEGIN_SRC emacs-lisp :tangle init2.el
(defalias 'dabbrev-expand 'hippie-expand)
#+END_SRC
+* eldoc
+
Don't show it when ~eldoc~ is running, I almost assume that it is
whenever I'm working in a mode that supports it anyway. This should
only execute once ~eldoc~ has been loaded.
@@ -83,6 +93,8 @@
(eval-after-load "eldoc" '(diminish 'eldoc-mode))
#+END_SRC
+* emms
+
Use the standard EMMS configuration and add some MPD settings.
#+BEGIN_SRC emacs-lisp :tangle init2.el
@@ -129,6 +141,8 @@
(global-set-key (kbd "<XF86Tools>") 'oni:start-emms)
#+END_SRC
+* flymake
+
Load ~flymake-cursor~ after loading ~flymake~, add Python and Go to
"allowed" files and add go error output to error patterns.
@@ -206,6 +220,8 @@
"Access to a protected member"))))
#+END_SRC
+* flycheck
+
After loading ~flycheck~ Remove the default python checkers and
replace them with my own, which tries both ~flake8~ and ~pylint~.
@@ -247,7 +263,50 @@
'(lambda (arg) (pretty-control-l-mode)))
#+END_SRC
-* Eshell
+* erc
+
+ Automatically join some channels when connecting to freenode.net.
+
+ #+BEGIN_SRC emacs-lisp :tangle init2.el
+ (setq erc-autojoin-channels-alist
+ '(("freenode.net" "#ninthfloor" "#emacs")))
+ #+END_SRC
+
+ Don't show ~PART~ messages.
+
+ #+BEGIN_SRC emacs-lisp :tangle init2.el
+ (setq erc-hide-list '("PART"))
+ #+END_SRC
+
+ Insert a timestamp every time a message comes in, print it on the
+ left and print the hour and minute parts of the time.
+
+ #+BEGIN_SRC emacs-lisp :tangle init2.el
+ (setq erc-insert-timestamp-function 'erc-insert-timestamp-left)
+ (setq erc-timestamp-format "[%H:%M] ")
+ (setq erc-timestamp-only-if-changed-flag nil)
+ #+END_SRC
+
+ Set my nickname.
+
+ #+BEGIN_SRC emacs-lisp :tangle init2.el
+ (setq erc-nick "ryuslash")
+ #+END_SRC
+
+ When starting ERC disable truncating lines, don't let ERC fill each
+ line and enable =visual-line-mode=.
+
+ #+BEGIN_SRC emacs-lisp :tangle init2.el
+ (defun oni:erc-mode-func ()
+ "Function for `erc-mode-hook'."
+ (erc-fill-mode -1)
+ (visual-line-mode)
+ (setq truncate-lines nil))
+
+ (add-hook 'erc-mode-hook 'oni:erc-mode-func)
+ #+END_SRC
+
+* eshell
Add ~unison~ to the list of =eshell-visual-commands= because it
expects unbuffered input and eshell just doesn't give that.
diff --git a/.emacs.d/site-lisp/oni.el b/.emacs.d/site-lisp/oni.el
index a5ee2eb..80d1b01 100644
--- a/.emacs.d/site-lisp/oni.el
+++ b/.emacs.d/site-lisp/oni.el
@@ -109,12 +109,6 @@ DOT are intentionally being skipped."
(require 'auto-complete-config)
(ac-config-default))
-(defun oni:erc-mode-func ()
- "Function for `erc-mode-hook'."
- (erc-fill-mode -1)
- (visual-line-mode)
- (setq truncate-lines nil))
-
(defun oni:go-mode-func ()
"Function for `go-mode-hook'."
(setq indent-tabs-mode nil)