viernes, 22 de marzo de 2013

Keyboardless programming

Emacs + Dragon + Duct Tape.
My impression after seeing this amazing talk from PyCon 2013 by Tavis Rudd was a big "WOW"!
Actually, when you see it, you'll shit bricks.
Can your editor do this?
Sublime, really(?). (pun intended)



miércoles, 20 de marzo de 2013

occur: Poor man's taglist

From time to time I see some vim screencast and think: "oh, taglist, that was nice...", and yeah, in emacsland we have lots of alternatives, like full blown ecb, or imenu, or idomenu, I guess there might even exist something with speedbar...

But none of them really cuts it for me, I'd need the ecb one without all other ecb features. Or something like that

So here's the plain dead simple elisp I'm using lately. Just occur-mode and a keybinding to update the search. For ruby, it can't find all the dinamic shit in there, but you get a nice overview of what's in your file, and if it's properly indented (which should be) you also get the notion of what's public, private, etc...

Surprisingly, I'm using it more and more, and I can have different regexes for different filetypes. (even tune it to look for 'get\\|post' if I'm editing sinatra things.)

Dead simple, but it kind of works.
(defun rgc-show-ruby-tags ()
  (interactive)
  (occur "^\\s-*\\\(class \\\|module \\\|def \\\|[^:]include \\\|private\\b\\\|protected\\b\\\)"))

(define-key ruby-mode-map (kbd "C-c t") 'rgc-show-ruby-tags)

domingo, 17 de marzo de 2013

Ratpoison and trays

Ratpoison doesn't come with any system tray by default (unlike stumpwm, which has mode-line).

Why you need a f*cking systray? you ask...  Well, in my laptop I need nm-applet to connect to my wifi.

Lately, I found that using stalonetray and nm-applet is the best combination. No need for gnome, or fancy configurations.


That's all it takes to have it working and not bothering you. It's amazing how easy it is, and how long I postponed this migration falling back to gnome.
  unmanage stalonetray
  exec Downloads/stalonetray-0.8.1/src/stalonetray
  exec nm-applet

I just discovered this other systray app. I never tried it, but I think it's worth a try.

viernes, 1 de marzo de 2013

Melpa, erc-tweet and erc-image

This week Sacha published  a post on her blog related to emacs (welcome back to emacs blogsphere!) and Just before a couple of very nice tricks, she says:
"A kid in a candy store – that’s me with M-x list-packages".

Well, I feel exactly the same.  It feels like when I browsed cpan looking for recent updates in packages. Daily.

Yesterday, a couple of packages I developed came to life in melpa.



erc-image

Shows image linked from erc buffers either inlined in the same erc buffer or in a dedicated buffer (and resizes it to a decent size).

erc-tweet

Shows tweets linked from erc buffers either inlined in the same erc buffer.


Both are quite simple packages, but if you find any issues (which I'm sure there are, because they are my first packages that will reach more than 10 machines), please file a bug either in https://github.com/kidd/erc-image.el  or https://github.com/kidd/erc-tweet.el . Or catch me in #emacs as rgrau or rgc.

W00t!


As a funny related addendum, here's a new package that appeared today in melpa:




So, after some months of doing things like '$ vim ~/.emacs' and overcome that, I'll now be able to 'emacsclient ~/.vimrc' .

Great.