Programming Blog

Programming related articles.

Use python as a Simple HTTP Server

The other day, I needed to share files with a Windows based computer. I did not have any ftp nor samba server installed on my machine. For some reason ssh did not work either. As a quick solution, I decided to use a trick I saw some time ago. I started a python process which works as a simple HTTP server. Next, I opened a browser on remote machine and connected to my HTTP server and downloaded the files through HTTP.

Disable flymake for specific file types

Flymake uses external applications to validate buffers. But sometimes, You don't have those external apps installed. For instance, HTML validation with flymake on Ubuntu is really problematic for this reason. Flymake uses xmlstarlet for HTML validation. It does it by calling xmlstarlet by command 'xml val file name.html'. But when xmlstarlet is installed in Ubuntu, it is installed by name 'xmlstarlet' instead of 'xml'. That name change causes emacs to raise exception every time an HTML file if opened. Since I don't really need XML/HTML validation in emacs, I thought I could just disable flymake for those types of files.

Emacs setup for web development

This is the follow up for basic emacs setup post. In this post I will explain how to update your emacs setup for web development. I will cover

Emacs setup for python development

This is the follow up for basic emacs setup post. In this post I will explain how to update your emacs setup for python development. I will cover

  • pymacs (Python binding for emacs. This is a ropemacs dependency)
  • rope (Python refactoring library)
  • ropemacs (Rope bindings for emacs)
  • rope-mode (Minor mode for ropemacs)
  • pyflakes (passive checker of Python programs)
  • flymake (an on-the-fly syntax checker for GNU Emacs)
  • flymake-mode (Minor mode for flymake)
  • pyflakes error format script
  • autocomplete rope integration

Basic emacs setup

Emacs is a great editor. But it is really hard to set it up. So I decided to write a document for my current emacs setup. In this post, I will explain how to install emacs with a basic setup.

I will cover how to:

  • Install emacs
  • Enable IDO mode
  • Add autocomplete mode
  • Add yasnippet mode
  • Set window title to full file name
  • Install color themes