From 50ab6deeabf2769ed3c4ff67385fae768ff41ee2 Mon Sep 17 00:00:00 2001 From: Tom Willemsen Date: Sun, 17 Feb 2013 22:53:36 +0100 Subject: emacs: Move ERC config to org --- .emacs.d/init.org | 81 +++++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 70 insertions(+), 11 deletions(-) (limited to '.emacs.d/init.org') 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 "") '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. -- cgit v1.2.3-54-g00ecf