..

Are you bored yet?

bored?

What to do when bored? Learn hard things. Learn Emacs. Do stuff.

A start is Magit's source code. How does it call Git commands?

Research questions

Questions is a good place to start.

Approach: read source, try to get an overview.

Note - SPC s i makes it easy to browse a file's structure.

Emacs' rebase major mode is defined with define-derived-mode. It refers to another mode - a parent perhaps? - special-mode.

Looks like all modes should inherit from special-mode.

Found it!

(magit-run-git-async "push" "-v" args remote (concat branch ":" merge))

from magit-process.el.

It bottoms out in magit-start-process. 54 lines of compact Emacs Lisp! It hurts!

but .. really ... should this not be .. easy? or ...? Well, perhaps not. Not if I want to have a nice Emacs interface. It's not only about mapping commands around, it's about selection, installation, etc.

Approach: Find some meaningful problem, play with it.

Here's a possible process:

  1. Define what you want to achieve
  2. Learn fast by designing and implementing an interaction feedback loop
  3. Reflect on process, outcome and goals - by yourself (introspection), or in a setting with others (a retrospective)