obsidian-linter: Bug: Date Modified Getting Updated when Not Expecting Change

Hello there,

I just spent the last few minutes going through and reading the contents of issues (FR’s and questions) about Date Modified, after I had been playing around in the vault.

I’ve recently started to use the Lint on File Change feature because I find it useful to delete with regex custom command my inline queries 1. before publishing the note 2. closing the note.
My peeve with the feature is that currently, if I just go into the file to peruse the contents or enter the file mistakenly, the Modfied Date change will be triggered on Lint on File Change, which consequently will cause that file to be picked up by a DataView query as 'file was changed, update pubilshed copy`, even though there was no changes at all in the file.

My question:
Can some measure be taken to not have this happen?

I’ve recently stopped using this plugin (for reasons to do with…eh, long story), which has a feature that makes the date modified field change only on having had keys pressed in the file.

Would you think it a good idea to include some similar code or feature?

Cheers, Z.

About this issue

  • Original URL
  • State: closed
  • Created 8 months ago
  • Comments: 39

Most upvoted comments

Well, on every file I tried:

date created key exists
plugin:obsidian-linter-test:2460 date creation updated?:false
plugin:obsidian-linter-test:2480 missing date modified key

Not only do I have date modified with a field value, I have linted all my files at least 3 times in the last 6 months in batch and all my files should have been changed for date modified as well had I had any issues with those fields. Obsidian Properties panel says on my file modified field that my property type is date. All settings are the same as give above (I am of course testing Lint on Change here). Data.json part:

    "yaml-timestamp": {
      "enabled": true,
      "date-created": true,
      "date-created-key": "date created",
      "force-retention-of-create-value": true,
      "date-modified": true,
      "date-modified-key": "date modified",
      "format": "YYYY-MM-DD"
    },

Undo the completed bit, please – I hit some key or icon wrong.

Could you provide all of the console logs provided for one file lint? I am not able to get a full picture of the problem with those 3 logs (there should be around a dozen of them).

Sure, I just didn’t want to copy here long .md file contents and such.