From 7856c942888afd7aafdbde09646c59d90cd5fe39 Mon Sep 17 00:00:00 2001 From: Tom Willemsen Date: Sun, 3 Mar 2013 14:47:01 +0100 Subject: [PATCH] emacs: Move (some) jabber config to org --- emacs/init.el | 2 -- emacs/init.org | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 2 deletions(-) diff --git a/emacs/init.el b/emacs/init.el index 2856abf..3104840 100644 --- a/emacs/init.el +++ b/emacs/init.el @@ -120,7 +120,6 @@ (setq jabber-chat-foreign-prompt-format "%t %u/%r <\n") (setq jabber-chat-local-prompt-format "%t %u/%r >\n") (setq jabber-chatstates-confirm nil) -(setq jabber-history-dir "~/.emacs.d/jabber") (setq jabber-muc-autojoin '("aethon@muc.ryuslash.org")) (setq jabber-roster-show-bindings nil) (setq jabber-vcard-avatars-publish nil) @@ -175,7 +174,6 @@ (add-hook 'gtags-mode-hook 'oni:gtags-mode-func) (add-hook 'haskell-mode-hook 'oni:haskell-mode-func) (add-hook 'html-mode-hook 'oni:html-mode-func) -(add-hook 'jabber-alert-message-hooks 'oni:jabber-alert-message-func) (add-hook 'jabber-chat-mode-hook 'oni:jabber-chat-mode-func) (add-hook 'jabber-roster-mode-hook 'oni:jabber-roster-mode-func) (add-hook 'java-mode-hook 'oni:java-mode-func) diff --git a/emacs/init.org b/emacs/init.org index d8eb2e7..aeb16ca 100644 --- a/emacs/init.org +++ b/emacs/init.org @@ -462,3 +462,35 @@ (put 'narrow-to-region 'disabled nil) (put 'scroll-left 'disabled nil) #+END_SRC + +* jabber + + Require ~jabber-libnotify~ so we can use its alert functions. + + #+BEGIN_SRC emacs-lisp + (require 'jabber-libnotify) + #+END_SRC + + Enable libnotify alerts for regular and mutli-user chats, this is + preferable to seeing them in the echo area. + + #+BEGIN_SRC emacs-lisp + (add-hook 'jabber-alert-message-hooks 'jabber-message-libnotify) + (add-hook 'jabber-alert-muc-hooks 'jabber-muc-libnotify) + #+END_SRC + + Keep track of what was said to and by my contacts, both for + "personal" chats and muc chats. + + #+BEGIN_SRC emacs-lisp + (setq jabber-history-enabled t + jabber-history-muc-enabled t) + #+END_SRC + + Store history on a per-contact basis and keep these files in + ~$HOME/.emacs.d/jabber-hist~. + + #+BEGIN_SRC emacs-lisp + (setq jabber-use-global-history nil + jabber-history-dir "~/.emacs.d/jabber-hist") + #+END_SRC