yuya373 / emacs-slack

slack client for emacs
1.11k stars 117 forks source link

Only one chance to get password correct #513

Open ghost opened 4 years ago

ghost commented 4 years ago

Here's my configuration:

(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 "dummy-name"
   :default t
   :token (password-store-get "dummy-token-name")
   :subscribed-channels '(dummy-channel)
   :full-and-display-names t))

It seems reasonable to use password-store to lookup the token, rather than leaving it in plaintext. However, this only works if I type the password correctly on the first try. If I fail to do that, a second call to slack-register-team or slack-start presents the following error:

cl-generic-ensure-function: slack-team-connect is already defined as something else than a generic function
pcrama commented 4 years ago

Just in case this helps someone with the same problem: as a work around, I M-: (fmakunbound 'slack-team-connect) before M-x slack-starting a second time, and try not to mess up my password the second time.