web developer & system programmer

coder . cl

ramblings and thoughts on programming...

why I still use emacs?

published: 10-07-2012 / updated: 10-07-2012
posted in: development, emacs, programming, tips
by Daniel Molina Wegener

There are many Integrated Development Environments to work with, but still I am using Emacs as my main editor, some times as IDE due to its wide variety on working modes, like Emacs Code Browser and CEDET, where both are making Emacs my main C and C++ editor due to its flexibility and extensibility. Also, I am a Lisp programmer, so I usually code some small extensions to make easier my work, like directory specific hooks to ensure that the indentation style is strictly related to the project that I am working. Emacs is an editor that can work as IDE, also provides extensibility through its embedded Emacs Lisp interpreter, allowing very nice modes and extensions to be programmed in a well known functional language.

haskell and emacs

published: 20-02-2012 / updated: 20-02-2012
posted in: development, emacs, haskell, programming, tips
by Daniel Molina Wegener

I think that I have a very nice integration between Haskell and Emacs. The first stuff that you should do to work with Haskell under Emacs, is to integrate the haskell-mode in Emacs with the proper hook to get the haskell-mode fully functional and working fine with Haskell code, so you can use Emacs as most likely an IDE rather than a simple text editor. That can be done thanks to the powerful Emacs Lisp interpreter that has embedded the Emacs editor.

integrating pycheckers and emacs

published: 09-08-2011 / updated: 09-08-2011
posted in: development, emacs, programming, python, tips
by Daniel Molina Wegener

There are many versions of the pycheckers.py script. It is wrapper between various static analysis tools for Python code. I have my own modified version of the pycheckers script and it is running pep8, pychecker, pyflakes and pylint. I have that script integrated with Emacs, so I run the compile command to verify the code quality. My code should meet all Python standards to pass all checks that are made by those tools.

killing equally named buffers in emacs

published: 03-05-2011 / updated: 03-05-2011
posted in: development, emacs, programming, tips
by Daniel Molina Wegener

As you know I am an Emacs user. Also, I usually implement small commands on it to help me in my programming tasks. For example while I am working with Django — the Python framework — usually I must open various files with the same name, for example views.py and urls.py. Once you have modified various of those files and you want to close them, you need to visit each buffer and apply the kill-buffer command on each one. I have created — for my comfort — a pair of commands that can close various buffers at once.

directory based hooks in emacs

published: 08-10-2010 / updated: 08-10-2010
posted in: development, emacs, programming, tips
by Daniel Molina Wegener

Some time ago, I was using ecb-mode — Emacs Code Browser — hooks to specify which hook will run on certain directory, so I was configuring Emacs to run certain hook based on the directory of the file. The ecb-after-directory-change-hook was great to integrate Emacs and well defined project specific indentation modes for C, C++ and some other languages. Each project has its own indentation style, for example for Python extensions, you must use the python style: (setq c-default-style "python"); for the Linux Kernel you must use the “linux” style: (setq c-default-style "linux"); for GNU related tools, you must use the gnu style: (setq c-default-style "gnu") and for the FreeBSD operating system, you must the knf style: (setq c-default-style "knf").

emacs as python ide

published: 30-09-2010 / updated: 30-09-2010
posted in: development, emacs, programming, python, sysadmin, tips
by Daniel Molina Wegener

Emacs is a powerful text editor. It has an embedded List dialect interpreter, called Emacs-Lisp and it has many extensions — called Emacs Modes — to work in various tasks, from programming tasks, IRC clients, MUAs and time organizing tasks. Many people says that Emacs works likely an Operating System, since it has a lot of applications mounted on top of Emacs Lisp. Python Mode (python-mode) in emacs has been extended and it can be used with various tools, turning your Emacs editor in a powerful IDE to work with Python.

changes in my ecb hooks

published: 08-08-2010 / updated: 08-08-2010
posted in: emacs, programming, tips
by Daniel Molina Wegener

As you know I’m an emacs user. I use emacs due its flexibility and extensibility, I’m using some major modes like CEDET and ECB. I use some hooks to integrate emacs and my common programming tasks. For example, I can’t imagine programming large projects like the FreeBSD Kernel or Linux Kernel only by using grep(1), egrep(1) or find(1), so I need to index large amount of code files…