franciskafieh / obsidian-list-modified

🪨 The advanced and adaptive changelog for Obsidian. Links all modified files meeting certain criteria to a timed (daily, weekly, monthly) note.
MIT License
85 stars 7 forks source link

[BUG WITH WORKAROUND] Templater Folder Templates do not work with auto-create #45

Closed franciskafieh closed 1 week ago

franciskafieh commented 1 year ago

First Steps

Describe the bug

When a note is automatically created, Templater's folder templates do not work

Expected behaviour

They should work...

Reproducing

N/A

Workarounds

Need to try "daily note" template

franciskafieh commented 1 year ago

fixed?

tophee commented 1 year ago

I was just going to submit this as a feature request, but I'm glad to see that this is already supposed to work.

fixed?

No, it is not fixed. I have the templater plugin set to use a specific template when creating a new note in the "Daily" folder, but the plugin nevertheless creates its own note, by-passing the intended template.

franciskafieh commented 1 year ago

I was just going to submit this as a feature request, but I'm glad to see that this is already supposed to work.

can you make sure the "Trigger Templater on new file creation" setting is on inside of your Templater plugin settings (as per https://github.com/SilentVoid13/Templater/issues/919#issuecomment-1317950701)?

tophee commented 1 year ago

Yes, that is turned on. The template is applied when I create a new Daily note manually.

franciskafieh commented 1 year ago

In my local copy of 2.1 (not released as a binary yet--still being developed in a separate branch), the folder template is applied so long as the file is not written to by OLM. i.e. I can have the auto-create file setting on but not the auto-create heading setting on. Not sure exactly how to fix this atm, but I'll do some research

franciskafieh commented 1 year ago

seems to be an upstream bug related to a race condition between templater and other plugins: https://github.com/SilentVoid13/Templater/issues/924

note to self: the new .vault.process function might fix this?

tophee commented 1 year ago

This may be complete nonsense, since I don't know how the plugin works, but why don't you just turn off "auto-create heading" when a template is active (or let the user do it)? When I'm using a template, I neither assumed nor want the plugin to create its own heading but I made sure the template includes a heading that matches the one I specified in the plugin settings.

franciskafieh commented 1 year ago

This may be complete nonsense, since I don't know how the plugin works, but why don't you just turn off "auto-create heading" when a template is active (or let the user do it)? When I'm using a template, I neither assumed nor want the plugin to create its own heading but I made sure the template includes a heading that matches the one I specified in the plugin settings.

That's a very reasonable idea. Maybe that will work for now until Templater finds a solution.

Edit: For anyone using Templater folder templates, please disable the auto-create heading Obsidian List Modified setting.

franciskafieh commented 1 year ago

Added a little description change here: https://github.com/franciskafieh/obsidian-list-modified/commit/60300c4f37eb05483035c5fb3833595dbcebf2fc