Emacs Identica-mode microblogging client v1.0 release

Status.net logo GNU logo

I’m very happy to announce the release 1.0 of the Emacs identica-mode microblogging client. Its been a while since the last release, and its been for a good reason! The main improvements are:

  • HTTP backend rewrite

    The backend that makes the HTTP connections has been completely rewritten to use url.el mode instead of the previous networking calls. This has made a big improvement on speed and reliability. Emacs no longer hangs for a while on crappy or slow connections.

  • Free network service URL shortening

    Support for the FNS URL shortening services Ur1.ca and TightURL have been added, with Ur1.ca as the default option. Previous services are also available through M-x customize-group identica-mode. Also added support for Google’s goo.gl url shortening service.

  • Support for group and tag timelines

    Now you can follow group and tag timelines, pressing C-c C-g for group timeline and C-c C-t for tag timeline. Also, pressing while the cursor is on a tag, username or group it will switch to that element’s timeline.

  • Added support for unicode named tags and groups

Basically you’ll notice a speed and stability improvement overall.

I also want to welcome Jason F. McBrayer and Shyam Karanatt as regular contributors and members of the Emacs Identica-mode project at Savannah. Hope we can get more contributors to get this project further.

Download Emacs Identica-mode v1.0

Contribute

As always, if you have any ideas for features, patches or bug fixes, please add them to the identica-mode bug tracking list.

You can also help out if you’ve liked Emacs identica-mode and have some spare change. It would be great to support this project by making any kind of donation on the “tip jar” in appreciation of the hours invested on its development and improvement.

Share:
  • Digg
  • del.icio.us
  • Technorati
  • Reddit
  • StumbleUpon
  • Facebook
  • Meneame
  • FriendFeed
  • Identi.ca
  • Twitter
  • Google Bookmarks

Search and replace recursively in multiple files

Lately I’ve been working with a lot of static HTML files with lots of repeating text structures. In the past I’ve talked about editing multiple files with Emacs. This approach works very well when the number of multiple files and text matches in each file is manageable, since you need to confirm pressing “y” on every text match in each file.

On other cases, like the one I had to solve, you can have 84,000 text files where each file can have more than 5 matches. This case, doing it with emacs wouldn’t reduce much time. For these kind of cases, an “old” tool is very handy.

GNU Sed

Quoting from the GNU Sed project page, sed is:

Sed (streams editor) isn’t really a true text editor or text processor. Instead, it is used to filter text, i.e., it takes text input and performs some operation (or set of operations) on it and outputs the modified text. Sed is typically used for extracting part of a file using pattern matching or substituting multiple occurrences of a string within a file.

The way to tell sed to do a search and replace on some given text, the syntax is the following: sed -n -e 's/regex/text/g' filename

The -n switch makes Sed not to output its results to the standard output and overwrite the file with the results. The -e switch specifies that the following string is a command to perform on the file. The regex part is the regular expression to use for searching in your text. The text part is the text you want to replace your search with.

So Sed recieves streams of text as input, makes some operations on it and outputs the results. This way of seeing it, makes it very obvious to understand that the natural way to use it is through bash calls using pipes.

The find tool will help us get a list of all the files that we need to pipe into sed. In the same way we used find from within Emacs, we can call it from bash: find path/to/folder -iname "filenamepattern"

So a combination of find with sed can be used in the following way: find myprojectfolder -iname "*.html" | sed -n -e 's/searchregex/replacementtext/g'

As easy as that, and you have edited 84,000 files with one single line of bash.

Hope its useful for anyone. It has been very useful to me. If you have other methods or other sed tips, I’d like to know in the comments.

Share:
  • Digg
  • del.icio.us
  • Technorati
  • Reddit
  • StumbleUpon
  • Facebook
  • Meneame
  • FriendFeed
  • Identi.ca
  • Twitter
  • Google Bookmarks

First day at DrupalCon San Francisco 2010

DrupalCon SF 2010 keynote

DrupalCon San Francisco has been great. Yes, its been only one day but I love the atmosphere.

There are several tracks going on at the same time during the day, so its impossible to see every talk. I hope that they publish videos of the ones I couldn’t attend. There’s about 3,000 attendees so the place is packed.

Drupalcon hallway

I’ve been a bit distant on Drupal development for a while, but its interesting to me to see that most if not all of the talks are about Drupal 7, the next stable release. I guess that the move to this new version is going to be a lot faster than the version 5 to 6 adoption. Yes, it was mainly because many of the cool modules were ported very slowly, but it appears that most of them are going to be ready for the version 7 release.

So for the ones who like me were disconnected from Drupal, here are some of the new features it will have:

  • CCK will be in core, called Fields
  • Improved usability and accesibilty
  • Database connector is now PHP PDO
  • Multiple database support
  • Testing framework
  • RDF support

Here’s a more detailed list of all Drupal 7 features.

There’s no official release yet, but there’s only 114 bugs left and for a big project like this its not so bad. So with enough help that can happen very soon. Get involved and contribute!

Share:
  • Digg
  • del.icio.us
  • Technorati
  • Reddit
  • StumbleUpon
  • Facebook
  • Meneame
  • FriendFeed
  • Identi.ca
  • Twitter
  • Google Bookmarks

As guest in podcasts

podcasting

In the past months I’ve been guest in two podcasts: appcast, a spanish language podcast discussing geek stuff, and animus me hosted by a KDE Developer. I’ve also been considered to co-host the animus me podcast, but we’re working our schedules out.

So I’d like to share those episodes here:

(English)

(Spanish)

I’ve been thinking and planning to start a music podcast for almost more than a year, but I’ve never had the guts to start it. This guest appearances have motivated me a little bit more into get that project started, but there’s one main thing holding me back: language. I still haven’t made up my mind as to in which language I’ll be talking on the podcast. I can certainly reach more audience if I do it in English, and although I’ve been speaking it since I’m a little kid, Spanish comes more natural to me.

So, if you listen to those episodes, let me know what you think.

Podcasting logo by DanielJohnsonJr on Flickr.
Share:
  • Digg
  • del.icio.us
  • Technorati
  • Reddit
  • StumbleUpon
  • Facebook
  • Meneame
  • FriendFeed
  • Identi.ca
  • Twitter
  • Google Bookmarks

Going to DrupalCon 2010

Drupalcon SF 2010

So thanks to Justia, I’ve spent the last week at Mountain View, or what is known as the Silicon Valley area. Next week I’ll be attending the Drupal Conference, Drupalcon 2010, in San Francisco, California.

Its been great working and hanging out in this area, specially when things in Mexico are not as easy these days. Its good to have peace and tranquility in a nice safe neighborhood for a while.

I’m really looking forward to all the Drupal sessions. I’ve been away from Drupal development for a little more than 6 months now, so its going to be interesting to get back into the mindset. I’ve been doing a lot of scripting lately and its been also good because I went back to the basics. I’ve also made things even more interesting or challenging by going back into using old tools like GNU Sed, GNU Awk and the like. I say they are old because nowadays I don’t see much people commenting about using them.

Sometimes developers forget about all these great tools, or new programmers never learn them. A task that nowadays someone would normally write a whole script to execute it, it has taken me one line of a bash command. This is a huge productivity boost, so I’ll be posting some of these old but often forgotten tools and tips I’ve picked up.

So if someone else is going to attend the DrupalCon in San Francisco, I’d be glad to say hi and maybe have a beer or two and hang around the town, I’ve heard its fascinating.

Share:
  • Digg
  • del.icio.us
  • Technorati
  • Reddit
  • StumbleUpon
  • Facebook
  • Meneame
  • FriendFeed
  • Identi.ca
  • Twitter
  • Google Bookmarks

3 methods on how to backup your Emacs file

Data dump by swanksalot on flickr The emacs personalization file (dotemacs) is a very important resource for every Emacs user. Typically found at ~/.emacs, this file contains elisp code all the personalization of Emacs to accommodate each user. Its so important that it basically represents your Emacs “personality”.

To loose your .emacs file can mean loosing a lot of hours of tweaking and personalizing GNU Emacs through a bunch of collected-through-time snippets. So, being a very valuable asset, having a good method to back it up is a must have.

Here are 3 common methods people use to keep their Emacs file safe:

Simple backup

The most simple thing to do is to manually make copies of the file on a different directory, another partition on the same hard drive, an external hard drive, or a USB key. Also works well when having multiple computers and copying the same .emacs file on each of them. Using rsync to back it up periodically is a good idea, and it can be used to backup all your other elisp code for common modes (typically at ~/.emacs.d/) you use too.

A good option would be to back it up to an online storage service like Drop.io or even Amazon S3.

Version control

The standard and most common way to store your emacs customizations is by saving them on a file named .emacs placed on your home folder. But this is difficult to setup on a version control system since version control systems check things under directories. So this would mean you would be version controlling your whole home folder, which wouldn’t be a bad idea on some cases but on others would be a mess to maintain.

Fortunately there’s another way: at startup, Emacs also looks for a file called init.el on a hidden folder named .emacs.d/ in your home folder when the typical ~/.emacs file is not found. This way, you can easily set your preferred version control system to track changes on that folder. This has the advantage that any other Emacs modes or code you have can be stored and tracked too. This way, whenever you have a clean install, your Emacs setup and modes are just a checkout away from getting done.

On some setups, tracking changes on the whole ~/.emacs.d/ directory may not be a good option. So, to track changes on only your .emacs file can be achieved by moving your init.el file to a folder inside the home elisp directory and will look like this: ~/.emacs.d/dotemacs/init.el and make a symbolic link to it in ~/.emacs.d/ This way I can version control the “dotemacs” directory very easily.

Distributed version control

Many people use SVN as their preferred version control system, which backs up your data into a central location. But using a distributed version control system like Git, Mercurial or Bazaar is a better option. DVCSs let you setup multiple locations where to backup your code repository, so you don’t have a single point of failure. So you can version control your dotemacs file and back up the changes history on many places like Github, Gitorious, Launchpad or any other code hosting service, plus several other remote locations like multiple machines, a NAS or external drives with complete history of your changes.

Do you know other methods? How do you keep from loosing your dotemacs file?

Data dump image by swanksalot on Flickr
Share:
  • Digg
  • del.icio.us
  • Technorati
  • Reddit
  • StumbleUpon
  • Facebook
  • Meneame
  • FriendFeed
  • Identi.ca
  • Twitter
  • Google Bookmarks
Subscribe to RSS Feed