lunes, 30 de abril de 2018

bootstrap your emacs lisp learning

So every now and then there's someone asking in /r/emacs about learning elisp. And I always answer with the same solution that I'm now posting here to avoid copypasting the whole thing every time.

In an attempt to give bootstrapped solution, t-shirt sized, and that is both a fish,  a fishing lesson and a fishing rod, this is what I came with.
 
  • Type c-h k c-h k and read.
  • Type c-h k c-h f and read.
  • With the previous tools, try to understand the following:
    (defun foo ()
      (interactive)
      (save-excursion
        (beginning-of-line)
        (insert ";")))
    
    (global-set-key (kbd "C-c ;") 'foo)
    
  • Select the whole snippet and type m-x eval-region.
  • Type c-c ; .
  • Try to understand what just happened.

jueves, 26 de abril de 2018

It's like copy-paste, but reversed

So browsing this reddit thread I felt again like when I discovered the "undo in selection".

So you can mark a point in an emacs buffer as the destination of all your future inserts, copys and pastes.  And of course, this comes by default, because why not :).


domingo, 1 de abril de 2018

Dnstuff

Cloudflare announcing their 1.1.1.1 dns, and me reading this text about what and why of dns.

EDIT: more stuff on dns appearing in hn