Archive for Web

Blogging with Emacs

This is my first blog entry with my brand new toy, the weblogging mode for Emacs. It uses the XML-RPC interface of your favorite blogging platform to manage your blog. In other words, it transformes Emacs into a thermonuclear blog editor.

Even better, the installation is simple and easy. Here’s the instructions how to get it working. First, check out the source code of weblogger into your .emacs.d directory:

cd ~/.emacs.d/
cvs -z3 \
  co -d weblogger weblogger/lisp

Then, make Emacs load this mode on startup by adding these two lines to your .emacs configuration:

(add-to-list 'load-path "~/.emacs.d/weblogger")
(require 'weblogger)

Now, you probably want to reload your configuration with M-x eval-buffer (assuming your .emacs is still open). Finally, setup weblogger for your blog with M-x weblogger-setup-weblog. This command will ask you a few simple questions, like your username and password for your blog. It will also ask you for the location of the XML-RPC interface of your blog. If you’re using WordPress, it will be somewhere like If you’re using another blog publishing platform like Blogger or MovableType, it will be somewhere else, so check your documentation.

And you’re done! You can now start new a new post with M-x weblogger-start-entry. Weblogger also includes a whole set of other commands for managing your blog. Look them up, with C-h a weblogger RET. Happy blogging!

View plain text emails in fixed font in Gmail

Quick hack: here a script for Greasemonkey that changes the default proportional font to fixed font on Gmail. I was tired reading distorted PEP, and code patches. And since Gmail doesn’t allow changing the font style, I had to write this simple script. Enjoy!

Web Design Tips

Today, I been impressed how high my comment has scored on Reddit. So, I taught it would be useful to repost it, here, on my blog for future references.

First, learn how to write proper HTML without any IDE, like Dreamweaver. Or if you do, only use the code view. After that, embrace the web standards, but without becoming a fanatic. Finally, learn how to separate the structure of your web pages from their design with CSS.

In summary, to improve your website you should:

  • Rewrite it or do a heavy clean up job, without Dreamweaver’s design view.
  • Make it pass this test.
  • Fix all the links.
  • Learn how to use the <title /> tag.
  • Remove any animated GIF image and Flash applet (unless it helps to the comprehension of the content).
  • Fix the fonts. Try to use (or at least fallback to) either “web core fonts” or serif/sans-serif.
  • Replace the <font /> tags with their CSS equivalents.
  • Use tags properly (ie. only use <table /> if you really want to make a data table).