Archive Page 5
December 12th, 2008 by Rodrigo
Are you using yasnippet right?
No? Well, in a nutshell is an awesome template system for Emacs, I
really recommend it. The template language is very easy to learn and
there are templates for a lot of programming languages.
Yasnippet stores your snippets in the filesystem, a single snippet per
file and inside a directory structure that mirrors the major mode
hierarchy. For example, the snippet for the using namespace std C++
idiom is stored in a file named using, and it’s located in the
directory snippets/text-mode/cc-mode/c++-mode. The file name (in
this example using) is used as the key for the expansion. You know,
convention over configuration .
Because yasnippets uses filenames as keys, you face filesystem’s
naming restrictions, and this is a problem if you want to define a
snippet for C comments, you can’t name a file /* for obvious
reasons. What do you do then? Well, yasnippet allows you to define
your snippets in elisp code directly, so if you want to create your C
sytle comments template, you can do something like this
;; $0 defines where the cursor will be left after the expansion
(yas/define 'cc-mode "/*" "/* $0 */")
(yas/define 'cc-mode "/**" "/**\n * $0\n **/")
The first argument is the major mode where this snippet will be available, the second is the key you will use to expand the template, and the last argument is the template itself.
For more about writting snippets for this system, go here
November 3rd, 2008 by Rodrigo
Another post about a new feature in emacs 23. This new feature is proced, and from the NEWS entry:
** proced.el provides a Dired-like interface for operating on processes.
Proced makes an Emacs buffer containing a listing of the current
processes (using ps(1)). You can use the normal Emacs commands to
move around in this buffer, and special Proced commands to operate on
the processes listed.
I found this great!, another reason to stay inside your emacs
Here is a screenshot from my machine:

October 24th, 2008 by Rodrigo
Sphinx is a documentation tool written for python (but could be used
on other circumstances). I’ve learning how to used and I wanted to
document a django project I’ve been working on, but when you try to
import your modules you get an exception
autodoc can't import/find module '<yourmodule>', it reported error:
"Settings cannot be imported, because environment variable
DJANGO_SETTINGS_MODULE is undefined.",please check your spelling
and sys.path
This happens because django do some enviroment settings before using
your app, so I wanted to do the same with. It was easier than I
tought, just put the following snippet in your sphinx conf.py
from MYPROJECT import settings
from django.core.management import setup_environ
setup_environ(settings)
of course, for it to work you need to modify your path, in my case was:
sys.path.append(os.path.abspath(os.path.dirname(__file__) + '/../../'))
October 10th, 2008 by Rodrigo
A tiling WM maximizes the use of your screen real state by handling
the space as a grid where each window (or frame) gets a piece of it in
a non-overlapping way. An additional, but not exclusive, feature found
on most of this wm is that you can do almost everything using keyboard
only.
I have a widescreen monitor and with the extra horizontal space I can
arrange two windows side-to-side without losing too much info, and if
you have some of those massive 20+ inches lcd monitors, you have a lot
of space. I still consider a 17 inches monitor to be big… I’ve
been using 14′ monitor for almost my entire life
They are a lot of tiling WM, check the Wikipedia article for a
list of the most common. I decided to try awesome 3 a couple of
months ago and I don’t regret a bit.
First step: don’t forget about that Windows(r) key
When you open awesome for the first time, all you get is a dark theme,
with a gray wallpaper. You will have a statusbar on the top with a
clock on the right, a weird icon next to it and some numbers on the
left (1..9).
First thing first, the magic key here is the “Windows Key” that
almost all the PC keyboards have, and the behavior is based on Vi, the text editor. From now on the “Windows key” will be just
modkey.
Open your apps
To create a new terminal window all you need to do is press
modkey+Enter. To open a different app you could create your own
shortcut (but we are not there yet) or press modkey+F1. That will
create a prompt on the statusbar where you can insert your command
(e.g. “firefox”).
Moving
Now, if you have several windows open you can circle them using
modkey+j and modkey+k. If you want to move between “tags” use
modkey+left or modkey+right (arrow keys).
Changing window sizes
Using the default layout, there will be a “main window” on the left
that will take half of the screen and all the other windows will be
confined to the right. With modkey+h and modkey+l you can change
how much space is dedicated for each of this “groups”.
What if you want a single window to take the whole screen temporarily?
Use modkey+m
That’s it!
I have some trouble getting starting with awesome (specially because
googling for awesome doesn’t help much), so I hope this would help
somebody else trying to use awesome for the first time.
Here is a screenshot of my desktop, click for a full size version.

October 8th, 2008 by Rodrigo
I use (the) awesome window manager. If you haven’t heard of it, you are missing a great window manager. It can deal with tiling and floating windows, is very customizable and is the best wm I’ve tried (over openbox, fluxbox, xfce, gnome’s, enlightenment, etc.) Go to it’s website to learn more.
This post is because I’ve been trying it’s support for multiple displays and is great!, Right now I have my laptop and monitor working together in a down-up configuration, and awesome have keybindings for handling the different displays. Absolutely great.
If you are a keyboard freak like me you will enjoy it!!
October 6th, 2008 by Rodrigo
Finally, after several months, we have a new release. Here are some of the changes from the freshmeat announce:
“This version is a lot better than 0.1. Gmail-sentinel has been reworked and now uses a plugin system for notifications, real logging system has been added, new command line options, you can enter your credentials by command line if putting them in the configuration file makes you uncomfortable, and code clean up. ”
Go to the project website to download it
October 3rd, 2008 by Rodrigo
After too much time of negligence, I finally fixed some issues with the software, that’s why the beta2. What happen to beta1? Well, it’s here, but don’t try it, it’s buggy. This new version fixed some thread problems and also brings a new command line interface, with more options and all that.
Where do I get it?
Want to try this beta? Download it here.
What about version 0.3?
If everything goes well, Monday will be release version 3 final.
Plans for version 0.4
Use feedparser instead of my hand made parser, why? because feedparser is much more tested and you know what they said, less code means less bugs 
September 28th, 2008 by Rodrigo
I use emacs 23 (alpha version). It’s still under heavy development and considered not for general consumption but you know, emacs “alpha” is like “service pack 2″ for others; it haven’t misbehave once.
One of the greatest features of this version of emacs is the multi-tty support, and it means that you can have with a single emacs server both an emacs client running in text-mode and another client running in graphic-mode.
One of the pitfalls of my emacs installation is that I load several libraries so it takes a while to start-up (not like eclipse, I mean a while like 5 seconds). It would be wonderful if emacs could somehow be ran as a daemon and then you could run your emacsclient and have instant access…
Well, it can!. Emacs has a new option –daemon that runs emacs on the background as a server, so you only need to call emacsclient. Emacs rules!
September 27th, 2008 by Rodrigo
I’ve received some feedback about this site and I had made a few modifications
-
Feeds now work properly (no longer example.com domain).
-
The code font is now smaller.
-
Gravatar support for comments.
-
Comments links on the main page are now clickable.
-
Better sitemaps.xml.
-
Deleted testing images from the photoblog.
A warning has been added for all IE 6 users, because the page will render completely wrong, and fixing the CSS to work with that browser is something I will not do.
This is getting better 
September 25th, 2008 by Rodrigo
Finally, several months after the announcement this site is finally up!. This new site is build on top of Django, and while some parts are written from scratch, others are just resusable apps. To find more about this site check the about page.
What is new?
What is missing?
-
Code and projects link is broken
-
No pingback
-
Few esoteric features
-
Comments RSS
Now… time to post!