Next: , Previous: , Up: Starting and quitting stand-off mode   [Contents]


2.4 Saving annotations

Saving the external markup depends on the back-end, that is used in standoff mode.

If the JSON file back-end is configured, the annotations are stored in a separate buffer which references a file. The default file name is the file name of the source document plus the suffix .json. Saving is done by switching to this buffer and saving the json-file. Before quitting Emacs, the editor asks if modified buffers should be saved to disk.

If the dummy back-end is configured, the annotations are kept in memory only, while annotating the source document. If Emacs quits, the annotations are lost. But they can be dumped to disk by calling a dump command and they can be loaded from the dump file in the next session.

Command: standoff-dump-elisp FILENAME

(u) (‘Stand-Off->Dump to file (SAVE)’) Save the annotations as s-expressions in a Emacs lisp file. You will be prompted for a FILENAME. It defaults to the file name of the source document, plus the suffix .dump.el, since that’s the name of the file that is automatically loaded on activation.

Note, that this command is always present. So, whatever back-end is used, you’re able to dump the annotations to local disk. Use standoff-tools to generate various other formats from it: http://github.com/lueck/standoff-tools.

Be aware to always dump your annotations, if the dummy back-end is configured. They can’t be recovered otherwise.

When working with a back-end, that stores the annotations on local disk, it is recommended to use the JSON file back-end. Reason: It always asks you if you want to save your the json file before quitting Emacs.


Next: , Previous: , Up: Starting and quitting stand-off mode   [Contents]