viernes, 27 de septiembre de 2013

Switching gmail accounts in Conkeror

Here I come with another hack for conkeror.

I've been using gnus on and off during the last year, but I keep comming to gmail web interface quite often.

The page mode for gmail is quite nice but there's one thing you can't do using the keyboard (AFAIK). That is changing accounts.

So I wrote a couple of functions to switch along N different gmail accounts you might be logged in.  In the end, I simplified the functions to a single one that just swaps between the zeroeth account and the first one. here we go.

miércoles, 18 de septiembre de 2013

Pretend you never pushed that file in git

Years ago, when I was starting to use git, I commited (and pushed) a file I didn't want. It was a huge TAGS file, which made the repo unusable.

 At that time I found a way to remove it, but today I stumbled upon a github page which explains it way better.

Enjoy

martes, 17 de septiembre de 2013

url-retrieve can't find localhost

Today I found a surprising bug in emacs url package. In fact, I'm not sure where the bug is.

The bug appears when trying to url-retrieve an url on localhost, like:
 
 
(url-retrieve "http://localhost:7070/api/services" 
  (lambda (s) (switch-to-buffer (current-buffer))))

The funny thing is that changing localhost to 127.0.0.1 works. Even adding a line "127.0.0.1 foobar" in my /etc/hosts also fixed it.

No clue why is that,but anyway,  it seems to be fixed in some development branch so I'm going to recompile my 24.3.50.1 to the latest one and see what happens.

jueves, 8 de agosto de 2013

conkeror go to buffer

In conkeror, you're trying continuously to think emacs, so many commands and shortcuts just make sense when you're browsing.

A nice way to move through buffers is obviously c-x b, but from time to time I was typing M-g M-g as if it was a 'goto-line' in emacs, but meaning goto-buffer. 

So let's go and use js to have this goto-buffer 

viernes, 2 de agosto de 2013

TIL: 2013-08-02

  • lua's require can't return multiple values. An easy way to overcome it is using unpack.
    local _ , resource     = unpack(require 'controller_helpers')

lunes, 29 de julio de 2013

TIL: 2013-07-29


  • There are many different ways to completely remove a file from a git repo. 
  • A CLOS user can change the method combination algorithm for a given function.