Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (add-hook 'twittering-new-tweets-hook
- #'(lambda ()
- (let ((n twittering-new-tweets-count)
- (statuses twittering-new-tweets-statuses))
- (start-process "twittering-notify" nil "notify-send"
- "-i" "/usr/share/pixmaps/gnome-emacs.png"
- (format "New %d tweet%s"
- n (if (> n 1) "s" ""))
- (let ((func (lambda (stat)
- (concat (cdr (assq 'user-screen-name stat))
- ": "
- (let ((text (cdr (assq 'text stat))))
- (if (> (length text) 20)
- (concat (substring text 0 20) "...")
- text))))))
- (if (< n 4)
- (mapconcat func statuses "\n")
- (concat (mapconcat func (butlast statuses (- n 3)) "\n") "\n...")))))))
Add Comment
Please, Sign In to add comment