From d153d128694463d9b7d901a9b413d630886f5712 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Wed, 7 Sep 2016 14:31:14 +0200 Subject: Add jabber.el config --- emacs/.emacs.d/init.org | 111 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 111 insertions(+) (limited to 'emacs/.emacs.d/init.org') diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org index 7f252ca..a802bba 100644 --- a/emacs/.emacs.d/init.org +++ b/emacs/.emacs.d/init.org @@ -86,6 +86,18 @@ To start off, first I need to enable lexical binding. (require ,library-symbol))))))) #+END_SRC +* Site lisp + + Setup everything so that any autoloads in ~site-lisp/~ get loaded + and can be used. + + #+BEGIN_SRC emacs-lisp + (add-to-list 'load-path (locate-user-emacs-file "site-lisp/")) + (let ((loaddefs (locate-user-emacs-file "site-lisp/site-autoloads.el"))) + (when (file-exists-p loaddefs) + (load loaddefs))) + #+END_SRC + * Helper functions I have noticed that I refer to the combination of @@ -862,6 +874,105 @@ To start off, first I need to enable lexical binding. (add-hook 'org-mode-hook 'auto-fill-mode) #+END_SRC +** Jabber + + I like using XMPP to talk to people, jabber.el is very good at + this. + + #+BEGIN_SRC emacs-lisp + (ensure-library jabber) + (eval-when-compile (require 'jabber)) + #+END_SRC + + Add my account. + + #+BEGIN_SRC emacs-lisp + (setq jabber-account-list + `((,(concat "ryuslash@dukgo.com/" (system-name))) + (:connection-type . starttls))) + #+END_SRC + + Store any persistent data in the data directory. + + #+BEGIN_SRC emacs-lisp + (setq jabber-avatar-cache-directory (oni:data-location "jabber/avatars/") + jabber-history-dir (oni:data-location "jabber/hist/")) + #+END_SRC + + Change the default prompts. + + #+BEGIN_SRC emacs-lisp + (setq jabber-chat-buffer-format "+%n" + jabber-chat-foreign-prompt-format "%t %u" + jabber-chat-local-prompt-format "%t %u" + jabber-chat-delayed-time-format "%H:%M" + jabber-groupchat-buffer-format "++%n" + jabber-groupchat-prompt-format "%t %u") + #+END_SRC + + Don't show avatars, publish or retrieve avatars. + + #+BEGIN_SRC emacs-lisp + (setq jabber-chat-buffer-show-avatar nil + jabber-vcard-avatars-publish nil + jabber-vcard-avatars-retrieve nil) + #+END_SRC + + Don't fill long lines in jabber chat buffers, but use visual line + mode. + + #+BEGIN_SRC emacs-lisp + (setq jabber-chat-fill-long-lines nil) + + (add-hook 'jabber-chat-mode-hook 'visual-line-mode) + #+END_SRC + + Don't send notifications about chat states. + + #+BEGIN_SRC emacs-lisp + (setq jabber-chatstates-confirm nil) + #+END_SRC + + Colorize text in multi-user chats. + + #+BEGIN_SRC emacs-lisp + (setq jabber-muc-colorize-local t + jabber-muc-colorize-foreign t) + #+END_SRC + + Enable recording history. + + #+BEGIN_SRC emacs-lisp + (setq jabber-history-enabled t + jabber-use-global-history nil) + #+END_SRC + + Clean up the default view of the roster buffer. + + #+BEGIN_SRC emacs-lisp + (setq jabber-roster-show-bindings nil + jabber-show-offline-contacts nil) + + (add-hook 'jabber-roster-mode-hook 'oni-jabber-set-roster-mode-line) + #+END_SRC + + Use libnotify to send jabber notifications. + + #+BEGIN_SRC emacs-lisp + (add-hook 'jabber-alert-message-hooks 'jabber-message-libnotify) + (add-hook 'jabber-alert-muc-hooks 'jabber-muc-libnotify) + #+END_SRC + + Don't echo presence changes in the mode line, show them in the + relevant buffer instead. + + #+BEGIN_SRC emacs-lisp + (with-eval-after-load 'jabber-alert + (remove-hook 'jabber-alert-presence-hooks 'jabber-presence-echo)) + + (add-hook 'jabber-alert-presence-hooks 'oni-jabber-show-status-in-buffer) + #+END_SRC + * Custom Put the customize settings in a different file so that Emacs doesn't -- cgit v1.2.3-54-g00ecf