emacs: Move ERC config to org
This commit is contained in:
parent
791d7fd3a2
commit
50ab6deeab
3 changed files with 70 additions and 25 deletions
|
@ -96,13 +96,6 @@
|
||||||
(font . "Envy Code R:pixelsize=18")
|
(font . "Envy Code R:pixelsize=18")
|
||||||
(alpha 90 90)))
|
(alpha 90 90)))
|
||||||
(setq elnode-do-init nil)
|
(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 fci-rule-color "darkred")
|
||||||
(setq frame-title-format '(:eval (concat "emacs: " (buffer-name))))
|
(setq frame-title-format '(:eval (concat "emacs: " (buffer-name))))
|
||||||
(setq geiser-repl-history-filename "~/.emacs.d/geiser-history")
|
(setq geiser-repl-history-filename "~/.emacs.d/geiser-history")
|
||||||
|
@ -181,7 +174,6 @@
|
||||||
(add-hook 'diary-display-hook 'oni:diary-display-func)
|
(add-hook 'diary-display-hook 'oni:diary-display-func)
|
||||||
(add-hook 'emacs-startup-hook 'oni:emacs-startup-func)
|
(add-hook 'emacs-startup-hook 'oni:emacs-startup-func)
|
||||||
(add-hook 'emacs-lisp-mode-hook 'oni:emacs-lisp-mode-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 'go-mode-hook 'oni:go-mode-func)
|
||||||
(add-hook 'gtags-mode-hook 'oni:gtags-mode-func)
|
(add-hook 'gtags-mode-hook 'oni:gtags-mode-func)
|
||||||
(add-hook 'haskell-mode-hook 'oni:haskell-mode-func)
|
(add-hook 'haskell-mode-hook 'oni:haskell-mode-func)
|
||||||
|
|
|
@ -4,7 +4,18 @@
|
||||||
#+STARTUP: showall
|
#+STARTUP: showall
|
||||||
#+LINK: yoshi-theme http://ryuslash.org/projects/yoshi-theme.html
|
#+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
|
Before doing anything else I should make sure that both the
|
||||||
directories ~/usr/local/emacs/share/emacs/site-lisp~ and
|
directories ~/usr/local/emacs/share/emacs/site-lisp~ and
|
||||||
|
@ -33,15 +44,6 @@
|
||||||
(load-theme 'yoshi t)
|
(load-theme 'yoshi t)
|
||||||
#+END_SRC
|
#+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,
|
Add any other interesting paths to =load-path= and, if it exists,
|
||||||
load the ~loaddefs.el~ file from these directories.
|
load the ~loaddefs.el~ file from these directories.
|
||||||
|
|
||||||
|
@ -55,6 +57,8 @@
|
||||||
"~/projects/emacs/pony-mode/src" "~/projects/emacs/php-mode"))
|
"~/projects/emacs/pony-mode/src" "~/projects/emacs/php-mode"))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
|
* y-or-n-p
|
||||||
|
|
||||||
Don't ask ~yes~ or ~no~, ask ~y~ or ~n~, I've never had an accidental ~y~ so
|
Don't ask ~yes~ or ~no~, ask ~y~ or ~n~, I've never had an accidental ~y~ so
|
||||||
far.
|
far.
|
||||||
|
|
||||||
|
@ -62,6 +66,8 @@
|
||||||
(defalias 'yes-or-no-p 'y-or-n-p)
|
(defalias 'yes-or-no-p 'y-or-n-p)
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
|
* ibuffer
|
||||||
|
|
||||||
Use =ibuffer= instead of the default =list-buffers= because it has many
|
Use =ibuffer= instead of the default =list-buffers= because it has many
|
||||||
more features.
|
more features.
|
||||||
|
|
||||||
|
@ -69,12 +75,16 @@
|
||||||
(defalias 'list-buffers 'ibuffer)
|
(defalias 'list-buffers 'ibuffer)
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
|
* hippie-expand
|
||||||
|
|
||||||
Do the same with =hippie-expand= and =dabbrev-expand=.
|
Do the same with =hippie-expand= and =dabbrev-expand=.
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp :tangle init2.el
|
#+BEGIN_SRC emacs-lisp :tangle init2.el
|
||||||
(defalias 'dabbrev-expand 'hippie-expand)
|
(defalias 'dabbrev-expand 'hippie-expand)
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
|
* eldoc
|
||||||
|
|
||||||
Don't show it when ~eldoc~ is running, I almost assume that it is
|
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
|
whenever I'm working in a mode that supports it anyway. This should
|
||||||
only execute once ~eldoc~ has been loaded.
|
only execute once ~eldoc~ has been loaded.
|
||||||
|
@ -83,6 +93,8 @@
|
||||||
(eval-after-load "eldoc" '(diminish 'eldoc-mode))
|
(eval-after-load "eldoc" '(diminish 'eldoc-mode))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
|
* emms
|
||||||
|
|
||||||
Use the standard EMMS configuration and add some MPD settings.
|
Use the standard EMMS configuration and add some MPD settings.
|
||||||
|
|
||||||
#+BEGIN_SRC emacs-lisp :tangle init2.el
|
#+BEGIN_SRC emacs-lisp :tangle init2.el
|
||||||
|
@ -129,6 +141,8 @@
|
||||||
(global-set-key (kbd "<XF86Tools>") 'oni:start-emms)
|
(global-set-key (kbd "<XF86Tools>") 'oni:start-emms)
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
|
* flymake
|
||||||
|
|
||||||
Load ~flymake-cursor~ after loading ~flymake~, add Python and Go to
|
Load ~flymake-cursor~ after loading ~flymake~, add Python and Go to
|
||||||
"allowed" files and add go error output to error patterns.
|
"allowed" files and add go error output to error patterns.
|
||||||
|
|
||||||
|
@ -206,6 +220,8 @@
|
||||||
"Access to a protected member"))))
|
"Access to a protected member"))))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
|
* flycheck
|
||||||
|
|
||||||
After loading ~flycheck~ Remove the default python checkers and
|
After loading ~flycheck~ Remove the default python checkers and
|
||||||
replace them with my own, which tries both ~flake8~ and ~pylint~.
|
replace them with my own, which tries both ~flake8~ and ~pylint~.
|
||||||
|
|
||||||
|
@ -247,7 +263,50 @@
|
||||||
'(lambda (arg) (pretty-control-l-mode)))
|
'(lambda (arg) (pretty-control-l-mode)))
|
||||||
#+END_SRC
|
#+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
|
Add ~unison~ to the list of =eshell-visual-commands= because it
|
||||||
expects unbuffered input and eshell just doesn't give that.
|
expects unbuffered input and eshell just doesn't give that.
|
||||||
|
|
|
@ -109,12 +109,6 @@ DOT are intentionally being skipped."
|
||||||
(require 'auto-complete-config)
|
(require 'auto-complete-config)
|
||||||
(ac-config-default))
|
(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 ()
|
(defun oni:go-mode-func ()
|
||||||
"Function for `go-mode-hook'."
|
"Function for `go-mode-hook'."
|
||||||
(setq indent-tabs-mode nil)
|
(setq indent-tabs-mode nil)
|
||||||
|
|
Loading…
Reference in a new issue