Date modified field not updated when editing note in external editor

When I edit a note using ‘Text Edit Note’ (Command + T), the Date Modified field doesn’t change. I thought perhaps I needed to ‘Reload Note’ in Notenik, but that doesn’t modify the date either.

Can you try again? I just tried a quick test, and it seems to be working for me.

Just to be clear, the sequence needs to be:

  1. Text Edit Note (Command + T) within Notenik
  2. Make changes in text editor
  3. Save note in text editor (normally Command + S)
  4. Return to Notenik
  5. Reload Note (Command + J)

I just tested using BBEdit as my text editor, and the Date Modified field seemed to be updating each time.

It’s got even weirder… now when I edit the note, the new content itself doesn’t show in Notenik at all after reloading. It does in the Finder though:


Which makes me think it is some esoteric permissions issue in the Finder. I’m using Vim via my terminal (Kitty).

However, I also tried it with Sublime Text and Text Edit with the same result.

Okay, I fixed the content not showing up at all. I had to check Include explicit Body field label for Note?.

But the modified date is still not updating, so I’ll try a few more things.

Can you try again? I just tried a quick test, and it seems to be working for me.

Was the date in the text file updated? I’ve created a brand new collection with defaults, and Date Modified is correct in the note display within Notenik, but not in the actual file’s text metadata:

You’ve come across a conundrum. The Date Modified field is one for which there are two sources of truth: the macOS metadata that is stored outside of the text file, and the Notenik field stored within the text file. If Notenik updates a Note, then it can keep the two in sync. But if the note file is edited outside of Notenik, what can Notenik do? It can try to show you the latest date, if the macOS date is later but, in order to update the text file, it would need to modify the text file on disk, which would update the macOS date to a new, even later, date/time. Would this be a good thing? It would then obscure the actual date/time at which the file was modified outside of Notenik. Not sure this would be an entirely good thing.

I have still not been able to replicate this issue of the new data not showing up in Notenik. Tried turning the explicit Body label off, and it is still working fine for me. So not sure what’s going on. I’m not a Vim user, but I imagine that’s working at the Unix layer, below the macOS trappings, so I could understand if there was some sort of issue there, I suppose. What version of macOS are you using? And do you have an SSD, or are you using a magnetic drive? (Wondering if there could be some sort of buffering/caching issue.)

I have still not been able to replicate this issue of the new data not showing up in Notenik. Tried turning the explicit Body label off, and it is still working fine for me. So not sure what’s going on.

I think I figured this out. The Body Field within the file had disappeared, which is required by the Notenik file format. E.g:

Title:  Release Plan

Seq:    1.3

Level:  3

Date Modified: 2024-02-12 00:05:55 +0800

Body:

Lorem ipsum dolor sit amet, consetetur sadipscing elitr.

I had:

Title:  Release Plan

Seq:    1.3

Level:  3

Date Modified: 2024-02-12 00:05:55 +0800

Lorem ipsum dolor sit amet, consetetur sadipscing elitr. 

I’m not sure how I ended up doing that. Either I deleted it myself, or I created the note in Notenik and immediately opened in my text editor without entering any text in the body field in Notenik beforehand.

With the latter, the Body: label has to be entered manually.

1 Like

That is a conundrum. Personally, I wouldn’t mind the ‘Date modified’ field being updated on reload, as I generally reload almost immediately after I finish editing.

But that also sounds like a vicious loop where things can go wrong after your quite logical explanation.

(Also, I didn’t initially notice the ‘Date modified’ field within Notenik because I had streamlined reading turned on, which probably influenced my thoughts).