lunes, 29 de octubre de 2018

so this is where the slack notification sound could come from

Nearly 1 year after finding out where old msn notification sound came from, I just was listening to this St Germain song that has something similar for slack notifications. Not sure it's the exact same sound, but it could very well be. At least, It took me half of the song to realize noone was pinging me in slack....

sábado, 27 de octubre de 2018

Some Lua articles

So at my job we're heavy Lua(jit) users. I've always liked Lua since I discovered it a few years ago.

It has a scheme-y feeling to it (with paredit unfriendly syntax, unfortunately). So here's a new article that has been recently published in the ACM. And some other paper from 2011. And another very nice paper that shows how lua can be used in different programming styles. Like the old "Implementation of Lua 5.0" or the lpeg one (you search that link yourself), Lua maintainers have a very concise style of designing and writing. Both code and papers. I always enjoy them.

viernes, 26 de octubre de 2018

jueves, 11 de octubre de 2018

staging hunks without magit

So there's magit that allows you to stage hunks as if you were doing "git add -p".  And I love it, but sometimes magit feels like too much, and it's slower than using vc.

I've been using git-gutter for some time, and I think there's a nice potential for staging hunks with it.


(use-package git-gutter
  :ensure t
  :config (global-git-gutter-mode t)
  :bind ("C-x v s" .  git-gutter:stage-hunk)
  ("C-x v n" .  git-gutter:next-hunk)
  ("C-x v p" .  git-gutter:previous-hunk))


With these configs (I'm using use-package), you can navigate through hunks with c-x v n/p (I'm basing the keybinds on vc "c-x v" ones) and stage them with "c-x v s". 

I'm pretty happy with those, only missing the ability of staging several hunks at once within a region.

viernes, 5 de octubre de 2018

kill-ring-max is a thing

So I recently discovered the variable `kill-ring-max', that dictates the size of the kill-ring, meaning when items on the kill-ring will be discarded.  Its original value is 60, and for some reason I still had it set to the default.

It's strange that I hadn't seen it mentioned before (at least, enough times to pay attention to it,) so let's try to increase the awareness of this very useful variable.

If you use helm-show-kill-ring, or something that allows you to search through kill-ring, having a bigger kill-ring might allow you to recover s"lost" work.