twitter


Emacs-users like to stay in their own little world, even when interacting with the Others - and they are right of course. Why leave the comforts of your well-configured emacs for the inconveniences of yet another app? For example, when using twitter, I prefer to do that from within emacs. There are different ways and packages to do so.

My favorite so far is twitter.el. Installation is easy: put twitter.el in your load-path (see installing packages if needed). After that, put something like

(autoload 'twitter-get-friends-timeline "twitter" nil t)
(autoload 'twitter-status-edit "twitter" nil t)
(add-hook 'twitter-status-edit-mode-hook 'longlines-mode)

and maybe make an easy keybinding (Shift-F1):
(global-set-key (kbd "<S-f1>")  'twitter-get-friends-timeline)

in your .emacs. Assuming that you already have a Twitter-account (which you'll need to get through its web-interface...), you can then get your friends' 'tweets' with M-x twitter-get-friends-timeline, and update your status with twitter-status-edit (when done, press C-c C-c). Can't be much easier, can it?

The first time in your emacs session you connect to twitter, twitter.el will ask for your username/password. You can in fact put those in your .emacs, but I would advise against that. The chance of inadvertently exposing plain-text username/passwords is a bit too big, esp. when you use your .emacs in many locations.

One small problem I faced with twitter.el is that it's default color are not very well-suited for my dark color theme. Therefore, I've added the following to my theme:

(twitter-user-name-face ((t (:bold t :foreground "white"  :background "blue"))))
(twitter-time-stamp-face ((t (:bold nil :foreground "white" :background "blue"))))

Et voilà! The screen shot shows one weakness in twitter.el: it does not understand HTML.

The great Socrates once taught us that the unexamined life is not worth living. Thankfully, these days we have twitter now, so we can spend all day examining each others lives... and now without leaving emacs.

(btw, on twitter you can find me as djcb).

No comments:

Post a Comment

Followers

Popular Posts