From c9dae43d21ebf7ed8cef3abc5f04c444e06dd3e8 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Thu, 3 Nov 2016 15:25:10 +0100 Subject: Add slack config --- emacs/.emacs.d/GNUmakefile | 3 +++ emacs/.emacs.d/init.org | 6 ++++++ emacs/.emacs.d/init/oni-slack-init.org | 30 ++++++++++++++++++++++++++++++ 3 files changed, 39 insertions(+) create mode 100644 emacs/.emacs.d/init/oni-slack-init.org (limited to 'emacs') diff --git a/emacs/.emacs.d/GNUmakefile b/emacs/.emacs.d/GNUmakefile index c05e971..7bcee4f 100644 --- a/emacs/.emacs.d/GNUmakefile +++ b/emacs/.emacs.d/GNUmakefile @@ -4,6 +4,7 @@ AUTOLOADS_FILE = site-lisp/site-autoloads.el UNWANTED = $(AUTOLOADS_FILE) site-lisp/flycheck_% site-lisp/flycheck-% SITE_LISPS = $(addsuffix c,$(filter-out $(UNWANTED),$(wildcard site-lisp/*.el))) INIT_LISPS = $(addsuffix .elc,$(basename $(wildcard init/*.org))) +VENDOR_DIRS = $(wildcard vendor-lisp/*) all: $(SITE_LISPS) init.elc $(INIT_LISPS) $(AUTOLOADS_FILE) @@ -14,6 +15,8 @@ all: $(SITE_LISPS) init.elc $(INIT_LISPS) $(AUTOLOADS_FILE) @echo -e "\e[31mELC\e[0m $<" @$(EMACS) -batch \ -directory "$(HOME)/.emacs.d/site-lisp" \ + -directory "$(HOME)/.emacs.d/vendor-lisp/emacs-slack" \ + -directory "$(HOME)/.emacs.d/vendor-lisp/circe" \ -eval "(package-initialize)" \ -eval "(byte-compile-file \"$<\")" diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org index 32caaf7..f222718 100644 --- a/emacs/.emacs.d/init.org +++ b/emacs/.emacs.d/init.org @@ -953,6 +953,12 @@ To start off, first I need to enable lexical binding. (with-eval-after-load 'eshell (load "oni-eshell-init")) #+END_SRC + - [[file:init/oni-slack-init.org][Slack]] :: A slack client for Emacs. + + #+BEGIN_SRC emacs-lisp + (with-eval-after-load 'slack (load "oni-slack-init")) + #+END_SRC + ** Linewise user-interface This is the library used by Circe and Slack to display messages. diff --git a/emacs/.emacs.d/init/oni-slack-init.org b/emacs/.emacs.d/init/oni-slack-init.org new file mode 100644 index 0000000..097a388 --- /dev/null +++ b/emacs/.emacs.d/init/oni-slack-init.org @@ -0,0 +1,30 @@ +#+TITLE: Slack configuration + +#+BEGIN_SRC emacs-lisp + (require 'slack) +#+END_SRC + +Use the current team for most interactive commands. + +#+BEGIN_SRC emacs-lisp + (setq slack-prefer-current-team t) +#+END_SRC + +Use the regular =switch-to-buffer= so slack doesn't create a new +window every time I open a channel. + +#+BEGIN_SRC emacs-lisp + (setq slack-buffer-function 'switch-to-buffer) +#+END_SRC + +Register my work team. + +#+BEGIN_SRC emacs-lisp + (slack-register-team :name "Picturefix" + :default t + :client-id oni:slack-client-id + :client-secret oni:slack-client-secret + :token oni:slack-token + :subscribed-channels + '(general picturefix random shirtlobby)) +#+END_SRC -- cgit v1.2.3-54-g00ecf