-
-
Notifications
You must be signed in to change notification settings - Fork 202
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect function name in pop-up help for tp.file.move() #1136
Comments
Hey. I tried both options (tp.file.functions.move and tp.file.move) and both don't work. But I'm also just starting out with this stuff and I might be … stupid. I have a folder named "_new" directly in my obsidian root. And I want newly created daily, weekly, monthly and yearly notes (by the periodic notes plugin) to be moved to "_new" after they got created. So I tried this: Btw I don't even understand what "TFile" stands for :D "This file" ? Maybe. Hm, perhaps I need to insert some other value? |
You don't need to get overly complex with this. You can include a path directly in the folder and format data for Periodic notes. I have a folder under root called Periodic-Notes and under that Daily-Notes, Weekly-Notes etc. In the Periodic Notes folder settings for Daily Notes I have I realise this isn't exactly what you're aiming to do, but you can use /_new in the Periodic Notes "Note Folder" setting(s) and then also specify sub-folders or specific naming formats in the Format setting(s). If you do want to use Templater, you can apply the move instruction at the top of a template applied to the note. If I tag a contact using
at the top, which moves the file to a new file in my /People folder with the same file name as the original. I think your issues were that you haven't quoted "/_new" which the function wants as a STRING, and you then need to tell the function what file to move, by passing a TFILE object which in simple terms is the title of a valid file. In my example I use tp.file.title to pass the current file, the one I'm applying this template to, to the function to say 'move this file in to "/this/" folder'. I hope that helps. |
First; thanks for the answer @SteveDockar You've just gone as deep as I'm able to understand.
Buuut, why does the syntax looks like this:
Quick note on that: if I add a General question I had to open my chrome history and search for this specific github link, because I didn't get a notification or something as I opened github.com. I'm an absolute rookie – therefore I haven't changed any auto subscriptions settings, meaning this "issue" got subscribed, but didn't left a notification in my inbox. Thats confusing, what do I do? Thanks for the help dude! :) |
Thanks for the feedback on the docs being confusing. I updated the docs for Link to tp.file.move docs: https://silentvoid13.github.io/Templater/internal-functions/internal-modules/file-module.html#tpfilemovenew_path-string-file_to_move-tfile |
Plugin information (please complete the following information):
Describe the bug
The pop-up help for tp.file.move() is incorrectly labelled (and so only appears) as tp.file.functions.move.
Expected behavior
Entering
tp.file.m
should suggest the tp.file.move() function.Screenshots
Additional context
The pop-up help text correctly identifies the function's actual name, but is only triggered by the incorrect function name, and appears in the list of file module functions sorted under 'f' instead of 'm'. Hitting enter while the help text is displayed enters the incorrect tp.file.functions.move() string.
Checking
/docs/documentation.toml
shows the incorrect 'name' parameter in line 208.The text was updated successfully, but these errors were encountered: