Templater icon indicating copy to clipboard operation
Templater copied to clipboard

Auto Jump To Cursor Issues with daily notes

Open SpencerTackett opened this issue 1 year ago • 6 comments

Hi there,

I have a daily note template that looks like this:

`--- Aliases: <% tp.date.now("YYYY-MM-DD") %>

[[ <% tp.date.now("YYYY-MM-DD - ddd MMM D", -1, tp.file.title, "YYYY-MM-DD - ddd MMM D") %>|Yesterday]] | [[<% tp.date.now("YYYY-MM-DD - ddd MMM D", 1, tp.file.title, "YYYY-MM-DD - ddd MMM D") %>|Tomorrow]]

<% tp.file.cursor() %>`

I have "automatic jump to cursor" enabled as well as "trigger templater on new file creation."

When I trigger this template manually everything works as expected. However, when the note is created automatically via calendar plugin or "open today's daily note" in the command palette, the note is created, the cursor jumps to the correct place, but then the text "<% tp.file.cursor() %>" is re-inserted to the file. Does anyone know what would be causing this?

SpencerTackett avatar May 22 '23 03:05 SpencerTackett

I am seeing this occur intermittently with version 1.16.0 (current as of my writing this). It didn't occur until I modified my template and dug into settings recently, although since it is intermittent, I can not say what edit or setting change triggered the bug.

EvanEdwards avatar Jun 22 '23 07:06 EvanEdwards

I use tp.file.cursor() in my daily notes and I haven't experience this issue. I would appreciate if someone can narrow down what is causing this issue or confirm that this has been fixed.

Zachatoo avatar Nov 14 '23 03:11 Zachatoo

As a bit of information: I have not seen the issue recently. It is plausible it has been resolved, or was due to a conflict with some other Plugin that I no longer use (I wish there was an option to clear all but one plugin for testing purposes for this reason).

EvanEdwards avatar Nov 20 '23 06:11 EvanEdwards

I still have this issue, as described here: https://github.com/SilentVoid13/Templater/issues/1232#issuecomment-1822347301

davidolrik avatar Nov 22 '23 08:11 davidolrik

As a bit of information: I have not seen the issue recently. It is plausible it has been resolved, or was due to a conflict with some other Plugin that I no longer use (I wish there was an option to clear all but one plugin for testing purposes for this reason).

I disable all my extensions but templater, the issue still exists.

joyous-coder avatar Nov 27 '23 13:11 joyous-coder

@joyous-coder Is it the same issue as described in #1232 where you're in reading mode, and therefore there is nowhere to put your cursor?

Zachatoo avatar May 08 '24 03:05 Zachatoo