FWIW if you wanted to test the persistance of TaskPaper item IDs across the closing and reopening of files, you could try running (in Script Editor or similar) this snippet, which just displays and copies the ids in the front document.
(Copy – in full – the source below, behind the JS Source disclosure triangle, all the way down to the final two lines, which are:
return main()
})();
JS Source
(() => {
'use strict';
ObjC.import('AppKit');
// Display and copy a list of the IDs in the
// front document in TaskPaper 3.
// main :: IO ()
const main = () => {
const
docs = Application('TaskPaper')
.documents;
return 0 < docs.length ? (
copyText(
alert('IDs in front document')(
docs[0].evaluate({
script: `${
editor => editor.outline.toString()
}`
})
)
)
) : 'No documents open in TaskPaper 3';
};
// ------------------- JXA CONTEXT -------------------
// alert :: String => String -> IO String
const alert = title =>
s => {
const sa = Object.assign(
Application('System Events'), {
includeStandardAdditions: true
});
return (
sa.activate(),
sa.displayDialog(s, {
withTitle: title,
buttons: ['Cancel', 'Copy'],
defaultButton: 'Copy',
withIcon: sa.pathToResource(
'TaskPaper.icns', {
inBundle: 'Applications/TaskPaper.app'
})
}),
s
);
};
// copyText :: String -> IO String
const copyText = s => {
const pb = $.NSPasteboard.generalPasteboard;
return (
pb.clearContents,
pb.setStringForType(
$(s),
$.NSPasteboardTypeString
),
s
);
};
return main()
})();