miércoles, 25 de mayo de 2011

Undo layouts in emacs

Once you're used to being able to undo and redo window layouts in your windowmanager (hello ratpoison!), You feel the need to have this same feature everywhere.

;;; winner-mode
(winner-mode 1)
(global-set-key (kbd "C-x 4 u") 'winner-undo)
(global-set-key (kbd "C-x 4 r") 'winner-redo)

martes, 24 de mayo de 2011

Slime configuration for common lisp

I recently bought a dead tree copy of Norvig's Book PAIP, and plan to dig harder on common lisp environment.

To set up a correct environment, there's emacs,slime and an implementation of common lisp. sbcl is my choice, for no big reason. It's just one of the free implementations.

Slime configurations are endless, but here's a decent one that mostly works for me.

Ah, there's a surprise in the book. I'll show you in a future post :)

lunes, 23 de mayo de 2011

Smalltalk tutorial on IRC

Last week at #emacs-es on Freenode I did a very-short-and-introductory-hands-on-workshop on smalltalk. Just in case you know spanish, here's the log, with names removed to protect the guilty.

martes, 17 de mayo de 2011

Ratpoison bindings without prefix key

My window manager of choice is ratpoison. It's a really minimalist tiling wm heavily inspired by gnu screen. As such, it has a prefix key (c-t by default) and most of the bindings mimic screen ones.

At work, I recently discovered that my boss uses ratpoison too (my project manager uses xmonad, great team, isn't it). He uses ratpoison with a different configuration scheme, banishing prefix key, and using definekey at toplevel for every command.

I'm not sure whether I like this configuration or not, but I'm going to try this for a few days, and see if it works ok or what. I've written some lines to enable toplevel bindings using the super key.

Avoiding c-t as a prefix key has its advantages, but now, 'super' key chords are all clobbered by ratpoison. We'll see how it works out.

Smoke Driven Development

He pensado que podríamos usar git
Con un poco de scrum y si aprendo TDD lo tenemos hecho en dos semanas
Un par de branches, un par de slots
Dos cartas porahi, un coaching porallá
Y despues, fiesta de final de proyecto, cardhú, putas y farlopa. Pago yo.

-- Alguno que yo me sé --

martes, 10 de mayo de 2011

latex code listings in org-mode

I already talked about inserting code listings in latex some time ago. At @work
(in a ruby meaning, not a perl one), I try to write as much as I can
in org, and then export it to html, or pdf.

org-mode is fully capable of assisting you when writing code listings,
and it will export them with fancy syntax highlighting. When exporting
to html, it uses htmlize (emacs-goodies if you're in ubuntu). But when
exporting to LaTeX, things are not so straightforward. Of course,
there's extensive documentation, but sometimes, you just don't want to
read through hundreds of details. You just want something that
'WorksForMe (c)'.

(setq org-export-latex-listings t)
(add-to-list 'org-export-latex-packages-alist '("" "listings"))
(add-to-list 'org-export-latex-packages-alist '("" "color"))

I don't know if it's enough or there's another configuration related
to this sunken in my .emacs (now 609 lines long), but you know... It

viernes, 6 de mayo de 2011

Technologically impaired office

Ok, I've already spent too much time trying to write a doc in openoffice to acknowledge that most of general user-friendly apps are for total technologically impaired ducks. It's not that there are no shortcuts for everything, its much more simple than that.

Every single function has a button for it. You want to indent a paragraph, ok, there's a button for it, outdent, another button... The fscking problem is I'm not in the mood of looking through all the buttons of all toolbars until I find it. And guess what? Selecting a paragraph and pressing tab, just blows you paragaph away and adds a tab.

My Technologically impaired solution.
foreach @line {press(tab,↓,←)}

Popups are the root of all evil. Well, openoffice will nag you when the cursor is on a table, a numeration, or god knows what.

Nested enumerations with styles, another shitstorm.... Copypastable formatting, font, background highlight and all the unwanted persistency of a place-and-format. You will get signs from the past red bold letters that lived in the place you're editing 3 centuries ago.

For this and much more, I declare myself technologically impaired.