Data safety
jOtter is built not to lose your work, and not to damage notebooks written by other tools.
Saving
Section titled “Saving”| Key | Does |
|---|---|
| w | Save |
| W | Save even if the file changed on disk |
| S | Save as: type a path, Enter |
Saves are atomic: jOtter writes a temporary file, flushes it to disk, and renames it over the notebook. A crash or power cut during a save leaves the old file intact, never a half-written one.
Save as asks before overwriting an existing file: press Enter a second time to confirm. After saving under a new name you keep working on the new file. The kernel keeps running in the original notebook’s directory.
jOtter preserves everything it doesn’t use itself: cell ids, metadata, attachments and fields written by other tools, so notebooks round-trip unchanged. See Notebook compatibility.
Quitting
Section titled “Quitting”q quits. With unsaved changes, jOtter asks: s saves and quits, q quits without saving, any other key stays. If you discard, the autosave stays behind, just in case.
If the terminal is closed or jOtter is killed with SIGTERM, SIGHUP or SIGINT, it writes an autosave before exiting. SIGKILL and SIGABRT end jOtter at once: changes since the last autosave are lost, and the terminal is left in jOtter’s modes (see Known limitations). The kernel exits by itself within a second either way.
Autosave and recovery
Section titled “Autosave and recovery”Every 30 seconds (autosave_secs), if anything changed, jOtter writes a copy of the notebook to its state directory, ~/.local/state/jotter/autosave/. Never next to the notebook, so it doesn’t clutter your git status. A normal save removes the autosave.
When you open a notebook that has an autosave different from the file, for example after a crash, jOtter says how many cells differ and asks:
- r restores the autosave. It is loaded as unsaved changes; the file itself is only overwritten when you press w.
- d deletes the autosave.
- Any other key keeps it for now. The next autosave, after any change, replaces it.
When the file changes on disk
Section titled “When the file changes on disk”If another program changes the notebook while it’s open in jOtter (a git checkout, JupyterLab, a script), jOtter notices when its window regains focus, or within the autosave interval:
- If you have no unsaved changes, it reloads the file silently.
- If you do, it asks: l loads the file from disk and drops your changes; any other key keeps yours.
A plain w never silently overwrites a file that changed since you opened or last saved it. jOtter warns instead, and W overwrites deliberately.