CAN scratch command¶
Backlinks¶
- When a scratchfile is created CAN should start to watch it
- The scratch command will trigger the former event, which will have a handler ready to set up a file watcher. When the file watcher detects a change, it will trigger the
SCRATCHFILE_UPDATED
event.
- The scratch command will trigger the former event, which will have a handler ready to set up a file watcher. When the file watcher detects a change, it will trigger the
- CAN's scratch command should fire the COMMAND_SCRATCH event
- When a CAN user sends a scratch command, the COMMAND_SCRATCH event should be fired to allow handlers to respond. This should include whether the scratchfile exists as a boolean argument.
- CAN's scratch command should create a scratchfile if none exists
- The scratch command within CAN is intended to prepare the scratchfile for writing a fresh note. If a scratchfile doesn't exist, it should create it and inform the user (CAN should inform the user of changes after a scratchfile is run).
- CAN's scratch command should push existing scratchfile content below the fold
- Running CAN's scratch command while a scratchfile exists should push all existing content beneath a new fold. This is done by adding
---
to the top of the scratchfile.
- Running CAN's scratch command while a scratchfile exists should push all existing content beneath a new fold. This is done by adding