obsidian-hotkeys-for-templates icon indicating copy to clipboard operation
obsidian-hotkeys-for-templates copied to clipboard

Creation of a new note via link doesn't trigger the template insertion

Open ShaneNZ opened this issue 3 years ago • 4 comments

Assume that a template _fruitTemplate has been defined for the folder Fruit:

Steps

  1. Create a note anywhere in the vault with a link of [[Fruit/Apple]]
  2. Click on the link in that note to create the new note.

Expected Behaviour: a new note called "Apple" is created in the folder "Fruit", with _fruitTemplate inserted Actual Behaviour: the new note is created, but _fruitTemplate is NOT inserted

Comments

  • Vault is set to use absolute paths, in case that has an impact
  • this behaviour may be as intended, but personally I'd expect the plugin to insert the template for a folder no matter how that note is created (link, new note hotkey/default folder, file folder right click and new, command palette, etc)

ShaneNZ avatar Aug 02 '21 22:08 ShaneNZ

Sorry, but I can't reproduce. Is your pane in edit mode after CTRL clicking the link?

Vinzent03 avatar Aug 04 '21 12:08 Vinzent03

Yes it is, and I think I've isolated the bug. See the attached video, note creation is case insensitive for the path, but triggering the template insertion is case sensitive - I think this is the issue. "Definition/Testing" was created correctly (right place, with the template inserted) whereas "definition/testing2" was created in the right place, but the template insertion didn't happen.

https://user-images.githubusercontent.com/2524502/128444951-6954a947-c661-439d-820a-572d9df2ccfe.mov

Also using MacOS 11.4 and Obsidian v0.12.13

ShaneNZ avatar Aug 06 '21 02:08 ShaneNZ

Sorry for the late reply. Honestly, I am not able to reproduce the behavior shown in the video. Are you sure the folder defintion does not exist?

Vinzent03 avatar Aug 14 '21 21:08 Vinzent03

Sorry for my late reply :) Yes, have checked that and also trialled with a filename called "asdfgh" just to avoid a possible collision. I haven't tried disabling other plugins, could there be something there?

On Sun, 15 Aug 2021, 9:07 am Vinzent, @.***> wrote:

Sorry for the late reply. Honestly, I am not able to reproduce the behavior shown in the video. Are you sure the folder defintion does not exist?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Vinzent03/obsidian-hotkeys-for-templates/issues/10#issuecomment-898958961, or unsubscribe https://github.com/notifications/unsubscribe-auth/AATIKVWQ7AETCHDVEPZG2BTT43LKTANCNFSM5BNUCXKA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .

ShaneNZ avatar Sep 06 '21 23:09 ShaneNZ