Skip to content

CAN's add command should save the current scratchfile as a note.ΒΆ

CAN's add command is intended to add new notes to the notebook. When a new note has been detected and the add command is run, this new note should be created at the correct address. Each address in a CAN notebook is a directory. Each CAN address contains the AST of the note at this address and a metadata file containing names.

To get this done, a create-note handler should be created to listen for the COMMAND_ADD event, upon which it should store the note as described above.

If the add command is called when the note is not new, then an ADD-ERROR-NOTE-EXISTS event should be fired.