One of the coolest things about the Canon Cat and Project Oberon is how instead of discrete application you just input your data into the system and operate on it “inline” by selecting areas of text and run them.
For example, while typing on the Cat (it was sold as a word processor) you could type
2 + 2 =
If you select that text and use the key combination to indicate “execute”, the Cat software would perform the calculation and insert “4”.
Oberon has a similar feature where selecting the name of a command will run it, allowing “applications” (for lack of a better word) to be “composed” by typing a list of commands that are useful together to form a menu.
The closest thing I’ve seen to this in contemporary software is Jupyter, which allows you to embed blocks of code into a notebook page, but it is very limited compared to the Cat and Oberon approaches.
Anyway, this morning I thought of a very simple way to bring some of this functionality to Markdown and before it leaves my head I thought I should write it down.
The basic idea is a markdown editor that interprets verbs. I think you’d have to indicate that the interpreter should activate by starting a line with a specific character (I’ll use “>” but that’s already used in some markdowns, so I’ll probably change it before I implement this), but with some thought I might come up with a more integrated way to signal the interpreter to engage…
Here’s the simplest example that comes to mind:
> save this
This refers to the entire markdown document. If this is the first time it’s been saved, the save verb with prompt for a filename, otherwise it will just save the contents to the same file named originally.
> email that to bob
In this case the verb is obvious but what is “that”? that is the last Markdown structure entered, which could be a list, a table or even just a paragraph of text.
As you type, the editor maintains an internal list of markdown objects in the document and “that” always points to the last object added before “that” appears. Other ways to reference objects can be used, but I’d have to do something homework to see if markdown has an existing way to name or tag these that we could reuse or if we’d have to create something new.
Additional verbs can be created by either composing them out of existing verbs or by pointing to facilities of the underlying operating system or computer. I’m not sure yet the exact best way to go about the latter, there’s a lot of options but I want to pick something that is in the spirit of this whole idea.
These verb lines become part of the document, recording not only the data but the actions that have applied to it. In a way it becomes a fourth-dimensional object akin to a journal, or a program.