summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmin Bandali <bandali@gnu.org>2018-11-01 18:20:51 -0400
committerAmin Bandali <bandali@gnu.org>2018-11-01 18:20:51 -0400
commit313f587783feb1c4b497451a2f3af370c0018ff9 (patch)
tree2c62897cc7c5e6771456ddaf819ea101b6357aeb
parent0c158cafca2f97bc07de692ff4b81f300f292e8f (diff)
downloadconfigs-313f587783feb1c4b497451a2f3af370c0018ff9.tar.gz
configs-313f587783feb1c4b497451a2f3af370c0018ff9.tar.xz
configs-313f587783feb1c4b497451a2f3af370c0018ff9.zip
[emacs] assimilate slack and deps, clear up .gitignore, add secrets
hopefully the slack thing is temporary, as i don’t like using proprietary platforms. however, if i must, i’d *much* prefer using free software to access it, rather than executing proprietary JS. note: since i’ve decided to commit etc/secrets.el, it shall not contain any sensitive information itself, but rather how to obtain them. therefore, it must be byte-compiled; and the byte-compiled etc/secrets.elc must *never* be committed.
Diffstat (limited to '')
-rw-r--r--.gitignore7
-rw-r--r--.gitmodules27
-rw-r--r--etc/secrets.el7
-rw-r--r--init.org61
m---------lib/alert0
m---------lib/circe0
m---------lib/deferred0
m---------lib/emojify0
m---------lib/ht0
m---------lib/oauth20
m---------lib/request0
m---------lib/slack0
m---------lib/websocket0
13 files changed, 95 insertions, 7 deletions
diff --git a/.gitignore b/.gitignore
index 9c17b6d..6a2dcca 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,10 +1,5 @@
-# getmail oldmail file
-oldmail-*
+*.elc
/early-init.el
/init.el
/var
-/recentf
-/smex-items
-/auto-save-list
-/network-security.data
diff --git a/.gitmodules b/.gitmodules
index 002346a..f20e6fc 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,6 +1,9 @@
[borg]
pushDefault = aminb
collective = emacsg
+[submodule "alert"]
+ path = lib/alert
+ url = git@github.com:jwiegley/alert.git
[submodule "all-the-icons"]
path = lib/all-the-icons
url = git@github.com:domtronn/all-the-icons.el.git
@@ -22,6 +25,9 @@
[submodule "boxquote"]
path = lib/boxquote
url = git@github.com:davep/boxquote.el.git
+[submodule "circe"]
+ path = lib/circe
+ url = git@github.com:jorgenschaefer/circe.git
[submodule "closql"]
path = lib/closql
url = git@github.com:emacscollective/closql.git
@@ -45,6 +51,9 @@
# that the submodule is dirty. so, let's ignore the untracked
# files of dash's submodule
ignore = untracked
+[submodule "deferred"]
+ path = lib/deferred
+ url = git@github.com:kiwanami/emacs-deferred.git
[submodule "diff-hl"]
path = lib/diff-hl
url = git@github.com:dgutov/diff-hl.git
@@ -71,6 +80,9 @@
[submodule "emmet-mode"]
path = lib/emmet-mode
url = git@github.com:smihica/emmet-mode.git
+[submodule "emojify"]
+ path = lib/emojify
+ url = git@github.com:iqbalansari/emacs-emojify.git
[submodule "epkg"]
path = lib/epkg
url = git@github.com:emacscollective/epkg.git
@@ -113,6 +125,9 @@
[submodule "hlint-refactor"]
path = lib/hlint-refactor
url = git@github.com:mpickering/hlint-refactor-mode.git
+[submodule "ht"]
+ path = lib/ht
+ url = git@github.com:Wilfred/ht.el.git
[submodule "hydra"]
path = lib/hydra
url = git@github.com:abo-abo/hydra.git
@@ -181,6 +196,9 @@
# build-step = make
# build-step = make sphinx-texinfo
# build-step = borg-makeinfo
+[submodule "oauth2"]
+ path = lib/oauth2
+ url = git@github.com:emacsmirror/oauth2.git
[submodule "org"]
path = lib/org
url = git@code.orgmode.org:bzg/org-mode.git
@@ -231,6 +249,9 @@
[submodule "proof-site"] # Proof General
path = lib/proof-site
url = git@github.com:ProofGeneral/PG.git
+[submodule "request"]
+ path = lib/request
+ url = git@github.com:tkf/emacs-request.git
[submodule "s"]
path = lib/s
url = git@github.com:magnars/s.el.git
@@ -243,6 +264,9 @@
[submodule "shut-up"]
path = lib/shut-up
url = git@github.com:cask/shut-up.git
+[submodule "slack"]
+ path = lib/slack
+ url = git@github.com:yuya373/emacs-slack.git
[submodule "smex"] # used by counsel-M-x
path = lib/smex
url = git@github.com:nonsequitur/smex.git
@@ -267,6 +291,9 @@
[submodule "web-mode"]
path = lib/web-mode
url = git@github.com:fxbois/web-mode.git
+[submodule "websocket"]
+ path = lib/websocket
+ url = git@github.com:ahyatt/emacs-websocket.git
[submodule "which-key"]
path = lib/which-key
url = git@github.com:justbur/emacs-which-key.git
diff --git a/etc/secrets.el b/etc/secrets.el
new file mode 100644
index 0000000..9feeceb
--- /dev/null
+++ b/etc/secrets.el
@@ -0,0 +1,7 @@
+(require 'auth-source)
+(defvar uw-apv-client-id (eval-when-compile (plist-get (car (auth-source-search :host "uw-apv.slack.com" :max 1)) :client-id)))
+(defvar uw-apv-client-secret (eval-when-compile (plist-get (car (auth-source-search :host "uw-apv.slack.com" :max 1)) :client-secret)))
+(defvar uw-apv-token (eval-when-compile (plist-get (car (auth-source-search :host "uw-apv.slack.com" :max 1)) :token)))
+(defvar watform-client-id (eval-when-compile (plist-get (car (auth-source-search :host "watform.slack.com" :max 1)) :client-id)))
+(defvar watform-client-secret (eval-when-compile (plist-get (car (auth-source-search :host "watform.slack.com" :max 1)) :client-secret)))
+(defvar watform-token (eval-when-compile (plist-get (car (auth-source-search :host "watform.slack.com" :max 1)) :token)))
diff --git a/init.org b/init.org
index 9a0e1dd..d64925d 100644
--- a/init.org
+++ b/init.org
@@ -324,6 +324,12 @@ it it's own file. While at it, treat themes as safe.
(setf custom-safe-themes t))
#+end_src
+** Secrets file
+
+#+begin_src emacs-lisp
+(load (no-littering-expand-etc-file-name "secrets"))
+#+end_src
+
** Better =$PATH= handling
Let's use [[https://github.com/purcell/exec-path-from-shell][exec-path-from-shell]] to make Emacs use the =$PATH= as set up
@@ -642,7 +648,7 @@ Enable =winner-mode=.
#+begin_src emacs-lisp
(bind-keys
("C-c b k" . kill-this-buffer)
- ("C-c s s" . save-buffer)
+ ;; ("C-c s s" . save-buffer)
("C-c b s" . save-buffer)
("C-c S" . save-buffer)
("C-c o" . other-window)
@@ -1642,6 +1648,59 @@ Also see [[https://www.emacswiki.org/emacs/rebox2][rebox2]].
:hook (text-mode . typo-mode))
#+end_src
+** slack
+
+Hopefully temporary.
+
+#+begin_src emacs-lisp
+(use-package slack
+ :commands (slack-start)
+ :init
+ (eval-when-compile ; silence the byte-compiler
+ (defvar url-http-data nil)
+ (defvar url-http-extra-headers nil)
+ (defvar url-http-method nil)
+ (defvar url-callback-function nil)
+ (defvar url-callback-arguments nil)
+ (defvar oauth--token-data nil))
+ (setq slack-buffer-emojify t
+ slack-prefer-current-team t)
+ :config
+ (slack-register-team
+ :name "uw-apv"
+ :default t
+ :client-id uw-apv-client-id
+ :client-secret uw-apv-client-secret
+ :token uw-apv-token
+ :subscribed-channels '(general)
+ :full-and-display-names t)
+ (slack-register-team
+ :name "watform"
+ :default nil
+ :client-id watform-client-id
+ :client-secret watform-client-secret
+ :token watform-token
+ :subscribed-channels '(general)
+ :full-and-display-names t);
+ :bind
+ (("C-c s s" . slack-start)
+ ("C-c s u" . slack-select-unread-rooms)
+ ("C-c s b" . slack-select-rooms)
+ ("C-c s t" . slack-change-current-team)
+ ("C-c s c" . slack-ws-close)
+ :map slack-mode-map
+ ("C-c e" . slack-message-edit)
+ ("C-c k" . slack-message-delete)
+ ("C-c C-k" . slack-channel-leave)
+ ("@" . slack-message-embed-mention)
+ ("#" . slack-message-embed-channel)));
+
+(use-package alert
+ :commands (alert)
+ :init
+ (setq alert-default-style 'notifier))
+#+end_src
+
* Email
#+begin_src emacs-lisp
diff --git a/lib/alert b/lib/alert
new file mode 160000
+Subproject 9f329be87820474925f29b52a1131084c8ea95b
diff --git a/lib/circe b/lib/circe
new file mode 160000
+Subproject fedfa7eb8516a53fa70b6a1f4fce4b5ab66ea91
diff --git a/lib/deferred b/lib/deferred
new file mode 160000
+Subproject 2239671d94b38d92e9b28d4e12fd79814cfb9c1
diff --git a/lib/emojify b/lib/emojify
new file mode 160000
+Subproject 38ae28d95b58e9fb86a3495a2dda3e5de254c4f
diff --git a/lib/ht b/lib/ht
new file mode 160000
+Subproject 5a665d00dc8fda77bad2a43277d8809c23e46ab
diff --git a/lib/oauth2 b/lib/oauth2
new file mode 160000
+Subproject 1d352b3dcd186d93bce7baf26818967c022187e
diff --git a/lib/request b/lib/request
new file mode 160000
+Subproject a3d080e57eb8be606fbf39d1baff94e1b16e1fb
diff --git a/lib/slack b/lib/slack
new file mode 160000
+Subproject 792604db287de2a986177d90f086f5d51aa5b40
diff --git a/lib/websocket b/lib/websocket
new file mode 160000
+Subproject 0d96ba2ff5a25c6cd6c66f417cc9b5f38a4308b