Emacs GNU/Linux Free Software & Open Source

Identica-mode 1.2 with OAuth support released

The time has come to set up a new stable release for Emacs Identica-mode microblogging client.

It’s been almost a year since last release, but many people have been following the project’s progress through the git repository updates.

identica-mode 1.2


Download the identica-mode 1.2

The two most relevant features of this release is first, support for OAuth (requires using oauth.el). This enables users who log in via OpenID accounts to be able to use Identica-mode as their client. The other big feature is the support for conversation timelines. Now you can press C-c C-c while cursor is on a notice to display that notice’s conversation timeline. Conversation timelines are not available on statusnet servers prior to 1.0 version, since the API didn’t include conversation ids until then. I’d like to give special thanks Kevin Granade for his time and effort on these two very requested features.

To use OAuth authentication instead of the default plain auth, add this to your .emacs file:

(setq identica-auth-mode "oauth")

Another very requested feature for those who won’t switch to OAuth, is to store the login credentials in a safer way than storing it in plain text in your elisp configuration files. Emacs can read authinfo and netrc files for authentication information. You can even encrypt the authinfo using EasyPG.

All you need to do is create a file ~/.authinfo (~/.authinfo.gpg if using encryption) and add the following:

machine servername login yourusername password yourpassword

Replace servername with your server (if connecting to Identica service, use as server name), yourusername and yourpassword with your information. If you setup your authinfo file, you don’t need to set identica-password variable anywhere.

What’s new

  • OAuth support
  • Added support for authentication credentials stored in ~./authinfo (plain or encrypted) and ~/.netrc files instead of plain text elisp
  • Expand short urls by pressing ‘e’ while cursor is on a short url
  • Added to url shortening services
  • Added countdown minibuffer-prompt style
  • Retrieve server config page to set text limit of notices
  • Added conversation timeline support (only for APIs in 1.0+), when pressing C-c C-c over a notice it will display its conversation timeline
  • Added zebra stripes styling to timeline

Bug fixes

  • Fix highlighting of notices that are a reply to you but don’t have your nick in the text (as 1.0 change)
  • Always crop avatars to 48×48 pixels
  • Improved vertical spacing between notices
  • Fixed icon placement when displaying dents in reverse order
  • Identica-mode buffer will no longer get killed on network error
  • Fixed support for gravatar images
  • Lots of code cleanup
  • Many other minor bugfixes

There is also a mailing list for the project to discuss any new features, ideas or bugs.

Hope you like the new release and thanks to everyone who during this cycle has spent time reporting bugs or sending patches. Your contributions are very valuable and keep improving this project.

Emacs GNU/Linux Free Software & Open Source Tutorials & Tips

Change your default browser to Chromium in Debian and Emacs

Chromium Logo

The web browser is nowadays the most important and frequently used tool in a computer. Recently I’ve been using more the Chromium browser than Firefox, on in Debian’s case, Iceweasel. This is for several reasons:

– Better memory management (doesn’t eat up all my RAM)
– Extensions are also available for Chromium
– Faster browser startup
– Faster page loads
– Full HTML5 support, which is lacking in Debian Wheezy’s Firefox (err… Iceweasel) which is still on version 3.5.19 at the time of this writing.

So I decided to change my default browser to open in Chromium for all applications. To do the change, at the terminal, type:

sudo update-alternatives --set x-www-browser /usr/bin/chromium


sudo update-alternatives --set www-browser /usr/bin/chromium

If you’re using KDE 4 you also need to open the System Settings, click on Default Applications, Select Web Browser and choose the second radio button option so it reads: “Open http and https URLs in the following browser” and type “chromium” in the text box. Click the Apply button and close the window.

Since I do almost everything with Emacs, I also needed to configure it to use Chromium as its default browser. To set that, you just need to add the following to your .emacs file:

(setq browse-url-browser-function 'browse-url-generic
      browse-url-generic-program "chromium-browser")

I still love Firefox, but it has staled away from the cool minimalistic and fast browser it was when it started. Chromium is now filling that gap, so I hope that in future versions (maybe the new Firefox 5?) memory handling gets better as well as loading times.

Emacs GNU/Linux Free Software & Open Source

Prepare your tea with Emacs

Jazmin and Dragon Well Tea

I love tea. I’m not a coffee drinker, so I get my morning boost from severl kind of teas. I use black teas from Teavana and green teas from a little shop in chinatown San Francisco called Ten Ren Tea. And I recently discovered that mate and black teas are a great energy booster combination!

Anyways, the point is that I make several teas at the office, and I always have to be watching carefully the stopwatch on my phone or set an alarm on it to know when my tea is ready.

A few months ago I found out about Emacs tea-time mode. It sets a timer then plays a sound and show a message to let you know when your tea is ready. So now you can make my teas with the help of Emacs!

At work I use a Macbook Pro, and the original code was very GNU/Linux specific. So I modified Konstantin Antipin’s tea-time mode to make it more platform independent and configurable.

You can grab my fork of tea-time mode (at least until my patches are accepted) from save it on your elisp load-path (typically at the ~/.emacs.d/ folder) and add this to your .emacs initialization file:

(require 'tea-time) (setq tea-time-sound "path-to-sound-file")

Now you can configure which program to use as player for the alarm sound.

If you’re using a Mac and Emacs for Mac OS X, sound support is not available by default; You’ll need to run a shell command. In Mac, the default player can be set as:

(setq tea-time-sound-command "afplay %s")

On GNU/Linux, you don’t need to configure this as it will fall back to default sound engine configured (alsa, pulseaudio, etc).

Emacs GNU/Linux Free Software & Open Source Tutorials & Tips

Post to WordPress blogs with Emacs & Org-mode

Recently I’ve discovered Org2blog, an Emacs mode to write your blog posts locally using org-mode post them to your WordPress blog in a very fast and easy way.

I’ve written before on how to write your blog posts and publish them using Emacs. Previously, my method of choice was using Weblogger mode. I even wrote some enhancements to it.

The problem I found with this method is that it uses message-mode as its base mode. So you’re basically writing an email. The shortcomings of it were that whenever I wanted to write links, bold text, or any custom formatting generally done through HTML tags, I had to either type out the HTML or temporarily switch to html-mode. That sometimes gave me some problems converting the HTML code into entities, and ended up with a mess to fix at the WordPress editing textarea.

Org-mode (included in Emacs since about version 22.1), if you haven’t heard about it already, is a very good way to take notes, organize your tasks, among other day to day useful things. You also get some basic formatting like bold text and italics, as well as links among many other useful things. Nowadays, I find myself typing things in org files constantly throughout my day, and with all its long list of qualities, it became a more suitable way for me to write blog posts.

Org2blog provides a way to post your Org files or post a subsection of your file with a few keystrokes. All you need to do is clone the repository on your load path directory

git clone

Then, add this to your .emacs file

  (setq load-path (cons "~/.emacs.d/org2blog/" load-path))
  (require 'org2blog-autoloads)

Finally set up you blog(s) settings in you .emacs file

     (setq org2blog/wp-blog-alist
              :url ""
              :username "username"   
              :default-title "Hello World"
              :default-categories ("org2blog" "emacs")
              :tags-as-categories nil)
              :url ""
              :username "admin")))

To start wrigint a new post, you can now use
M-x org2blog/wp-new-entry

Or, as I more frequently use, post a subtree of an existing org file using:
M-x org2blog/wp-post-subtree

I hope you enjoy writing and posting your blog posts within Emacs and Org-mode. I certainly do and has turned out to be a very fast way to quickly draft and later on (even offline) elaborate on the blog post details in a comfortable editing environment. Also you get the added benefit of having a local copy (backup) of your blog posts as Org files.


Emacs Identica-mode release v1.1

Since the last official release, there’s been a lot of work on the Identica-mode for Emacs. Its been a while since the last release and probably most users have been using the development version directly from the Git repository. Even though I try to make the development branch as stable as possible, official releases give some users more confidence and ditributions (like Arch, so far I know of) can name their packages with some versioning reference.

Download Emacs Identica-mode 1.1

What’s new on v1.1

  • Added “natural” repeating, mapped to the “r” key
  • Added icons to indicate if automatic timeline updates are on or off
  • Can now delete notices
  • Added option to show timeline in reverse order (newest at the bottom)
  • Added support to recognize urls without the “http://” part (some clients like Choqok use this syntax)
  • Added support to recognize unicode urls
  • Added option to limit number of dents in timeline
  • Removed dependency on cURL to shorten URLs with
  • and many bug fixes

I hope you enjoy using identica-mode as much as I do. I’d also like to share my joy of developing and improving it as well, so if you have any ideas or code contributions, please use the project’s Savannah page.

Any donations to support the development of this project are very much appreciated. Thank you for using, contributing or supporting Emacs Identica-mode.


Emacs Identica-mode notifications

There’s a feature on Emacs identica-mode that I haven’t documented or written about before and its been there for quite some time.

Its very nice to have notifications when you get new updates on your timeline. I’ve seen it on other clients like TweetDeck. So I made a hook for Emacs to execute some code after it has fetched new dents. With this you can call any notification system to show a message of the new dents.

Here’s the code I’ve been using to show new notice count on KDE4 notification system (similar code can be used for Gnome’s notification system):

;; KDE 4 Notification of new dents
(add-hook 'identica-new-dents-hook (lambda ()
   (let ((n identica-new-dents-count))
     (start-process "identica-notify" nil "kdialog"
		    "Emacs Identica-mode New dents"
                    (format "You have %d new dent%s"
                            n (if (> n 1) "s" ""))

Emacs Identica-mode notifications

I haven’t tried to do the same in Mac OS with Growl but I guess its also possible. If someone has the code for that, please share it in the comments. You can also use ToDoChiKu as a universal notification system.

**Update** Jason McBrayer has posted the elisp code to use identica-mode with ToDoChiKu on his blog.

I hope you like this hook feature and please let me know other ways to use the hook, or if any other hook is usefull to have.