Deleting @done items


#1

Hi there!

Loving 2.0 so far, thanks for all the hard work!

It looks like this script is no longer working in 2.0:
http://oldsupport.foldingtext.com/discussions/questions/21-can-i-delete-all-marked-off-to-do-items-through-one-command

Would someone mind giving me a hand getting this up and running again?
Thank you!


#2

Hi, this should do it I think:

tell application "FoldingText"
	tell front document
		evaluate script "function(editor, options) {
			var tree = editor.tree();
			tree.ensureClassified();
			tree.removeNodes(tree.evaluateNodePath('//@done///*'));
		}" with options {}
	end tell
end tell

#3

Perfect, thanks @jessegrosjean!