EOS: Twitter Module

Table of Contents

(provide 'eos-twitter)

Twitter with twittering-mode

Load up twittering mode, but defer it since I'm probably not loading emacs to immediately use Twitter :P

(use-package twittering-mode
  :ensure t
  (setq twittering-icon-mode t
        twittering-use-master-password t
        twittering-username "thnetos"
        twittering-timer-interval 600
        ;; Start up with home and "emacs" search
  ;; Don't kill the twittering buffer, just bury it
  (define-key twittering-mode-map (kbd "q") 'bury-buffer))

And then a nice helper for starting that will be called from the main EOS hydra

(defun eos/turn-on-twittering-notifications ()
  (setq sauron-prio-twittering-mention 4))

(defun eos/start-or-jump-to-twitter ()
  "If twittering-mode is already active, jump to it, otherwise start it."
  (if (get-buffer "(:home+@)")
      (switch-to-buffer "(:home+@)")
    ;; disable twitter notifications for ~10 seconds
    (setq sauron-prio-twittering-mention 2)
    (run-at-time "10 sec" nil #'eos/turn-on-twittering-notifications)))

Author: Lee Hinman

Created: 2017-08-10 Thu 13:40