obsidian-list-modified icon indicating copy to clipboard operation
obsidian-list-modified copied to clipboard

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

Open franciskafieh opened this issue 2 years ago • 9 comments

First Steps

  • [x] I've ensured that the issue does not already exist by using the search issues feature
  • [x] I've read the documentation (see the README)
  • [x] I'm on the latest release of obsidian-list-modified
  • [x] I've tried disabling any other plugins that may cause conflicts (recommended)

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 avatar Jul 14 '22 19:07 franciskafieh

fixed?

franciskafieh avatar Oct 03 '22 02:10 franciskafieh

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.

tophee avatar Feb 11 '23 11:02 tophee

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)?

franciskafieh avatar Feb 11 '23 15:02 franciskafieh

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

tophee avatar Feb 12 '23 09:02 tophee

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 avatar Feb 12 '23 21:02 franciskafieh

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?

franciskafieh avatar Feb 12 '23 21:02 franciskafieh

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.

tophee avatar Feb 12 '23 21:02 tophee

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 avatar Feb 12 '23 21:02 franciskafieh

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

franciskafieh avatar Feb 12 '23 21:02 franciskafieh