Understanding Embark in GNU Emacs (a bit) and some 'stupid' Embark tricks

19 points by PuercoPop


chiply

Nice article! Embark is misunderstood by a lot of people. In increasing orders of complexity, here's how I think about it:

  1. The pattern is quite simple, you pick a thing and act on it.
  2. The thing you pick is detected because Embark recognizes 'types'. The type of a thing could be a word, sentence, paragraph, defun, and the power comes from the fact that you can define arbitrary types. The actions you associate with these types are also arbitrary. Embark comes with built in types and actions, but there is no upper bound on the types you can define and the actions you can associate with them.
  3. Embark helps you compose actions together on the fly, in a similar way that Unix pipes do. Because Embark actions accept an argument (the thing that is recognized), you can chain together many complex commands that you otherwise couldn't.

I think about Embark's pattern as 'recognize-dispatch'. It can recognize any arbitrary thing via an extensible type system, and can dispatch any arbitrary command through an extensible action system.

omidmash

Can't access the article using qutebrowser. And the same issue as every time this domain is posted, where the author mentions:

If this is in error and you're using a current version of your browser of choice, you can contact me at my current place at the university (you should be able to work out the email address from that).

I am not going to go on a wild goose chase. I went to the linked website and there were no contact information. The linked link also does not reliably work on my browser.