Archive Page 3

Awesome and xrandr

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!!

Gmail sentinel 0.3 released

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

gmail-sentinel 0.3 beta2

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 :)

Emacs daemon! (v.23)

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!

Site update

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 :)

New site up!

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!

Insert a path into the current buffer

Sometimes I need to insert into a buffer a path (e.g. /home/user/.emacs) and I want to use emacs’ excellent completion capabilities. It turns out to be pretty easy to implement this function in elisp. Here is the snippet:

(defun insert-path ()
  "Inserts a path into the buffer with completion"
  (interactive)
  (insert (expand-file-name (read-file-name "Path: "))))

As always, any comments on the code above are more than welcome :)

Another way of doing it suggested by Peter Mielke is:

(defun insert-path (file)
 "insert file"
 (interactive "FPath: ")
 (insert (expand-file-name file)))

I think this is a better option because uses interactive built-in support for file input rather than using the read-file-name function. Thank you for the tip Peter

How to type when using emacs?

On emacs.help a very interesting thread about you, your fingers and emacs is taking place. Is no secret that emacs extensive use of “key combos” is both a blessing and a curse. While they make almost every feature of emacs a few keystrokes away, they can also put your fingers and wrist under continus stress

Between the suggestions to improve the situation are: swap caps lock and control, swap alt and ctrl, change your keyboard layout to dvorak, etc.

Here is the link to the gmane archive of the thread with more links and more comments.

Don’t forget that emacs.help is a public mailing list where you can take part :) . Go ahead and subscribe.

keybinding doubts? no more

Just a short one… If you have doubts about emacs keybindings, read here. Is awesome!.

Just as a site note, I found it while looking how to set WindowsKey(Super)-tab as a keybinding for lisp-complete-symbol


(define-key lisp-mode-map [s-tab] 'lisp-complete-symbol)

Really easy :)

Do you use google to find definitions?

UPDATE:For this code to work you need to include the mm-url library. The code is now fixed

If so, here’s a little snippet I wrote for emacs to have all this power just one keystroke away

(require 'mm-url)
(defun google-define-word-or-phrase (query)
  (interactive "sInsert word or phrase to search: ")
  (let* ((url (concat "http://www.google.com.pe/search?hl=en&q=define%3A"
              (replace-regexp-in-string " " "+" query)))
     (definition
       (save-excursion
         (with-temp-buffer
           (mm-url-insert url)
           (goto-char (point-min))
           (if (search-forward "No definitions found of " nil t)
           "No definitions found"
         (buffer-substring (search-forward "<li>") (- (search-forward "<") 1)))))))
    (message "%s: %s" query definition)))

(global-set-key [f5] 'google-define-word-or-phrase)

This uses google’s define: operator to look up for a word or phrase. Copy & Paste this code into your .emacs and with pressinf F5 you will be prompted for your query. Have fun

If you have any comments on the code they will be more than welcome :)