Emacs Slack
GNU Emacs client for Slack.
You can see some gifs on the wiki.
- Alert
- circe (for the Linewise User Interface library).
- Emojify (optional)
- Oauth2
- do
package install
- do
- request
- websocket
;; I'm using use-package and el-get and evil
(el-get-bundle slack)
(use-package slack
:commands (slack-start)
:init
(setq slack-buffer-emojify t) ;; if you want to enable emoji, default nil
(setq slack-prefer-current-team t)
:config
(slack-register-team
:name "emacs-slack"
:default t
:token "xoxs-sssssssssss-88888888888-hhhhhhhhhhh-jjjjjjjjjj"
:subscribed-channels '(test-rename rrrrr)
:full-and-display-names t)
(slack-register-team
:name "test"
:token "xoxs-yyyyyyyyyy-zzzzzzzzzzz-hhhhhhhhhhh-llllllllll"
:subscribed-channels '(hoge fuga))
(evil-define-key 'normal slack-info-mode-map
",u" 'slack-room-update-messages)
(evil-define-key 'normal slack-mode-map
",c" 'slack-buffer-kill
",ra" 'slack-message-add-reaction
",rr" 'slack-message-remove-reaction
",rs" 'slack-message-show-reaction-users
",pl" 'slack-room-pins-list
",pa" 'slack-message-pins-add
",pr" 'slack-message-pins-remove
",mm" 'slack-message-write-another-buffer
",me" 'slack-message-edit
",md" 'slack-message-delete
",u" 'slack-room-update-messages
",2" 'slack-message-embed-mention
",3" 'slack-message-embed-channel
"\C-n" 'slack-buffer-goto-next-message
"\C-p" 'slack-buffer-goto-prev-message)
(evil-define-key 'normal slack-edit-message-mode-map
",k" 'slack-message-cancel-edit
",s" 'slack-message-send-from-buffer
",2" 'slack-message-embed-mention
",3" 'slack-message-embed-channel))
(use-package alert
:commands (alert)
:init
(setq alert-default-style 'notifier))
- Log into the Slack team you're interested in with a web browser
- Open DevTools
- Open Network tab
- Search for (Ctrl-F) "xoxs-" and copy token from Request Payload
https://github.com/jackellenberger/emojme#slack-for-web
I recommend to chat with slackbot for tutorial using slack-im-select
.
Some terminology in the slack-
functions:
-
im
: An IM (instant message) is a direct message between you and exactly one other Slack user. -
channel
: A channel is a Slack channel which you are a member of -
group
. Any chat (direct message or channel) which isn't an IM is a group. -
slack-register-team
- set team configuration and create team.
- :name and :token are required
-
slack-change-current-team
- change
slack-current-team
var
- change
-
slack-start
- do authorize and initialize
-
slack-ws-close
- turn off websocket connection
-
slack-group-select
- select group from list
-
slack-im-select
- select direct message from list
-
slack-channel-select
- select channel from list
-
slack-group-list-update
- update group list
-
slack-im-list-update
- update direct message list
-
slack-channel-list-update
- update channel list
-
slack-message-embed-mention
- use to mention to user
-
slack-message-embed-channel
- use to mention to channel
-
slack-file-upload
- uploads a file
- the command allows to choose many channels via select loop. In order to finish the loop input an empty string. For helm that's C+RET or M+TET. In case of Ivy it's C+M+j.
See alert.