farux / obsidian-auto-note-mover

This is a plugin for Obsidian (https://obsidian.md).
MIT License
255 stars 21 forks source link

Problem when using Auto Note Mover with Templater #73

Open swehba opened 5 months ago

swehba commented 5 months ago

I have a Note Mover rule to move daily notes based on their title matching a pattern to a my Daily Notes folder. Specifically, the rule looks like this.

My daily note template contains Templater commands.

Recently, when I create a new daily note, Obsidian reports an error that the note cannot be moved. Yes, I adjusted things for the new calendar year.

If I strip out all Templater commands from the daily note, everything works fine -- i.e., the note is moved properly, and no errors are reported. Also, if I remove the mover rule, everything is fine.

Bottom line: There seems to be an incompatibility between Note Mover and Templater, perhaps in cases where Templater refers to the file name or path, and the note is moved before the Templater scripts are run. It seems like a race condition. Has this behavior been observed before?