TiddlyTools SaveChanges get_changes() uses the TWCore haschanged[]
filter operator which returns a list of all tiddlers that have been changed since the start of the current session. When saving the file, the TWCore doesn’t automatically reset this list. As a result, unless you actually reload the wiki after saving the SaveChanges [+] button will produce the results you noted.
The ideal solution would be to have the TWCore internal handling for the this.changeCount[]
hashmap reset whenever the wiki is saved (or tiddlers are synced to the server if using nodeJS). Unfortunately, this handling is integrated deep within the TWCore handling of the $tw.wiki
object (see $:/core/modules/wiki.js: exports.enqueueTiddlerEvent
), so it’s probably best to raise this issue for Jeremy to consider, rather than trying to hack the code myself.
As an alternative, perhaps I can try to make the SaveChanges [+] button “smarter” by excluding any tiddlers whose modification timestamp is earlier than the modification timestamp of the $:/state/ChangeLog tiddler. However, I need to think very carefully about this to ensure that such an approach would work reliably for all use-cases and won’t omit the titles of any tiddlers that actually have been changed.
For example, if you have turned OFF updates to modification timestamps by using the “clock” button in the sidebar Tools tab, or if you’ve saved changes but didn’t add any notes (in which case the modification timestamp for $:/state/ChangeLog isn’t updated). In this case, comparing the tiddler timestamps would not report the desired list of changes that you might expect.
As it stands right now, I feel that its better to report “false positives” rather than running the risk of “false negatives” by omitting changed tiddlers. The workaround response is simply to clear those false positive items from the “notes” input before saving.
-e