From: Amin Bandali Date: Thu, 9 May 2019 15:40:20 +0000 (-0400) Subject: emacs: add emacs-slack (temporary) and update swiper X-Git-Url: https://git.shemshak.org/~bandali/configs/commitdiff_plain/141014e58a3092220d99e210e533d24fc2b549c4?ds=inline emacs: add emacs-slack (temporary) and update swiper --- diff --git a/.emacs.d/etc/secrets.el b/.emacs.d/etc/secrets.el index e881fb0..edfa1a6 100644 --- a/.emacs.d/etc/secrets.el +++ b/.emacs.d/etc/secrets.el @@ -1,10 +1,5 @@ (eval-when-compile (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))) +(defvar nday-students-token (eval-when-compile (plist-get (car (auth-source-search :host "nday-students.slack.com" :max 1)) :token))) (defvar canlock-password (eval-when-compile (funcall (plist-get (car (auth-source-search :host "gnus-canlock-password" :max 1)) :secret)))) diff --git a/.emacs.d/init.org b/.emacs.d/init.org index cb8a540..899901c 100644 --- a/.emacs.d/init.org +++ b/.emacs.d/init.org @@ -2276,6 +2276,63 @@ Also see [[https://www.emacswiki.org/emacs/rebox2][rebox2]]. org-ref-pdf-directory "~/usr/org/bibtex-pdfs/")) #+end_src +** slack + +Not an "Emacs enhancement", but just so that I don't have to use the +proprietary web interface. Needed for interacting with the URA(s) +this summer. + +#+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 "nday-students" + :default t + :token nday-students-token + :subscribed-channels '(general) + :full-and-display-names t) + (add-to-list 'swiper-font-lock-exclude 'slack-message-buffer-mode t) + (setq lui-time-stamp-format "[%Y-%m-%d %H:%M:%S]" + lui-time-stamp-only-when-changed-p t + lui-time-stamp-position 'right) + :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 + ("M-p" . slack-buffer-goto-prev-message) + ("M-n" . slack-buffer-goto-next-message) + ("C-c e" . slack-message-edit) + ("C-c k" . slack-message-delete) + ("C-c C-k" . slack-channel-leave) + ("C-c r a" . slack-message-add-reaction) + ("C-c r r" . slack-message-remove-reaction) + ("C-c r s" . slack-message-show-reaction-users) + ("C-c p l" . slack-room-pins-list) + ("C-c p a" . slack-message-pins-add) + ("C-c p r" . slack-message-pins-remove) + ("@" . slack-message-embed-mention) + ("#" . slack-message-embed-channel))) + +(use-package alert + :commands (alert) + :init + (setq alert-default-style 'notifier)) +#+end_src + * Email :PROPERTIES: :CUSTOM_ID: email diff --git a/.emacs.d/straight/versions/default.el b/.emacs.d/straight/versions/default.el index f213135..96568ba 100644 --- a/.emacs.d/straight/versions/default.el +++ b/.emacs.d/straight/versions/default.el @@ -1,10 +1,12 @@ (("PG" . "946be87a944c9d8b850fdddb83d36e2ef9dad5c9") + ("alert" . "a53e39e2fcd14fd0c04db9b27776831f04593b7f") ("all-the-icons.el" . "f996fafa5b2ea072d0ad1df9cd98acc75820f530") ("alloy-mode" . "0d05bdd10c77ec04c3d61eccf67e68c08284951f") ("auto-compile" . "e6bbb1371324c8884af3b201e9adbc9296eb2ff4") ("biblio.el" . "d1b2286f4ffc9f77919d916763eb2469f532027a") ("boxquote.el" . "7e47e0e2853bc1215739b2e28f260e9eed93b2c5") ("bui.el" . "508577a7225b3d07eaefa9444064410af2518675") + ("circe" . "6ccd4b494cbae9d28091217654f052eaea321007") ("cl-lib" . "deb92588d9d83d46c4698936ea31c5f58d244f04") ("closql" . "012b94f8695e194455111fd54eff0b94dd0dd0db") ("company-ebdb" . "3b463fe1236ac6445657f3a1df20357a7a2fa8f6") @@ -19,8 +21,12 @@ ("elisp-refs" . "540daaf50a88ca0e7d7c8d5f09ca383362e67baf") ("emacs-async" . "bd68cc1ab1ac6af890e250bdaa12ffb1cb9649be") ("emacs-doom-themes" . "e771d566b138918c7c553a9a9e96ce1bd38bc903") + ("emacs-emojify" . "4954a4f2cffe5c459727bee30cd221c59eacd839") ("emacs-htmlize" . "8db0aa6aab77475a732b7363f0d57bd3933c18fd") ("emacs-memoize" . "9a561268ffb550b257a08710489a95cd087998b6") + ("emacs-request" . "db88fd21d25399ff9940c208173665b12493992b") + ("emacs-slack" . "10fbb81f567b44647ad125a48ecd72df106fb624") + ("emacs-websocket" . "d8ef1b764a7047b1163e8b9664bac5bd819058ed") ("emacs-which-key" . "187ac0eb8990b62d4bfd83aac10a0ae68cdd2ff5") ("emacsql" . "d5c37d905d133a3887bc582e4a0126671816beaa") ("emmet-mode" . "1acb821e0142136344ccf40c1e5fb664d7db2e70") @@ -35,6 +41,7 @@ ("forge" . "0375541d9ea3a18172d9829fb3083e8adf207874") ("geiser" . "156970ff1402512b4bbf53a5e1c22156cb0e2f9c") ("ghub" . "c7ca6780bcd4d00d22e668e74b25f865ba892a45") + ("gntp.el" . "767571135e2c0985944017dc59b0be79af222ef5") ("gnu-elpa-mirror" . "de32165c6c3cdb23bfa5adb7e84d328f0acc4aa0") ("graphql.el" . "e2b309689f4faf9225f290080f836e988c5a576d") ("guix.el" . "11e0dbf6491300d250efb3dc09d634b01e86b35b") @@ -44,11 +51,13 @@ ("helpful" . "53ae44bd2384de5e2513496ccf6ca2fce6767299") ("hl-todo" . "487d349b7b8d6738223d5dd10957dd10b45eb9f3") ("hlint-refactor-mode" . "c4307f86aad6d02e32e9b30cb6edc115584c791c") + ("ht.el" . "095fde55294bd20dc7f46d614e1b0504e3830cfa") ("hydra" . "acb69859f3dde8d6924587f39997320256bdd85d") ("key-chord" . "72443e9ff3c4f1c3ccaced3130236801efde3d83") ("lcr" . "c14f40692292d59156c7632dbdd2867c086aa75f") ("lean-mode" . "9d6b8471e2044310b4cd7cd3213b1fc8f78ec499") ("let-alist" . "33e71829e8814cf5f28b6e4291192aafef61b69e") + ("log4e" . "c69424e407be0d9d0e54b427d8b18b1ac5a607e2") ("loop.el" . "e22807f83a0890dc8a904c51ee0742c34efccc6c") ("magit" . "2d21705393262e3fcfdaa0bea018be5a7dc5f8d2") ("magit-popup" . "4250c3a606011e3ff2477e3b5bbde2b493f3c85c") @@ -59,6 +68,7 @@ ("multiple-cursors.el" . "5ffb19af48bf8a76ddc9f81745be052f050bddef") ("mwim.el" . "b4f3edb4c0fb8f8b71cecbf8095c2c25a8ffbf85") ("no-littering" . "99ae007ead688689b5b25a9482f98ec67663bb61") + ("oauth2" . "bf4903b5a4a2af0327832bdcb20f3149176e1c1d") ("org" . "c47c686d5f84ad447e853fd45bb40b104565683a") ("org-ref" . "d12a8bed162f160cb33fa66d572ce2587f4eb928") ("packed" . "c41c3dfda86ae33832ffc146923e2a4675cbacfa") @@ -77,7 +87,7 @@ ("smex" . "55aaebe3d793c2c990b39a302eb26c184281c42c") ("soap-client" . "7afb2f3e987edc8a7e77ac1a8c3871a9cfa8837e") ("straight.el" . "c42edf91249a3610a872402082e977c61cf65dc9") - ("swiper" . "c1ff0d6ff4176f5ebcf324561c7b5e416700cc79") + ("swiper" . "6f56049dc3b53e25d151f301b42c3b2e7f71d269") ("tablist" . "8079801527da1f596bc942162026328d7bdf6ad9") ("transient" . "c7ad1f01f4ff9e5125bcec99dfb9c3dedadfc369") ("treepy.el" . "b40e6b09eb9be45da67b8c9e4990a5a0d7a2a09d")