I’ve been fooling around trying to have a patch made in Javascript Init plugin leveraging vault rename and modify even listeners, but there has always been something that made a mess. AI help goes only so far…
Use case:
Many people have date modified time stamps in their properties, possibly using @AlanG’s Frontmatter Modified Date plugin or otherwise.
Then people would probably use DataView queries to use these last modified dates. People will also publish their material maybe based on these queries.
The problem comes, when you rename a file or a heading (you will be less likely to rename a block, but it also can happen), then the linked files’ content changed, but the content change will not be reflected on your custom date modified timestamp.
Workaround:
Using mtime for Dataview queries. Obsidian does the renames, updates the links and when saving the files, mtime values will be updated.
Problem with this:
But then if you go to a different platform, mtime will be different for each file, based on file created on that operating system (syncing your files will create a unique stamp for your files).
@mnaoumov I see you have a couple utilities leveraging these listeners; I wonder how difficult it would be to twist some of the existing code to meet these requirements…?
I guess updating the source file’s date modified stamp would be just as welcome.
The plugin would of course need the setting to allow people to specify what frontmatter key they are using for date modified.