Open Gr-Nobel opened 1 year ago
Hi @Gr-Nobel - that sounds serious, and I would like to investigate it.
I have not seen any previous reports of it, which suggests to me the it may possibly be something specific to your vault.
So please could you disable all other plugins, restart Obsidian and then add here a detailed set of steps on how to reproduce the problem.
Make sure you tell me every single character to type, and record things like which Obsidian mode you are in (source, Live preview...)
Thanks in advance for this info.
I have been able to reproduce it if my cursor is in the frontmatter when I open Task modal.
Is that your situation?
The Task modal basically puts the new line where the cursor is.
The workaround would be to put the cursor on the line where you want the new task to go.
Hey There ! thanks for replying I'm trying to use auto hot key app to quickly add task to obsidian.
if you have the advanced uri plugin you can paste this :- obsidian://advanced-uri?vault=Nobel Notes&commandname=Tasks: Create or edit task
into your file explorer it will open the task modal you add the task and it breaks the frontmatter.
I do the same thing with qickadd plugin it adds the task after frontmatter.But quick add doesn't have this feature.
completely broke the frontmatter of that page.
Oh wow, that is absolutely brilliant. I had no idea that this was possible. Thank you for telling me about that capability!
So, the command specifies a vault to open, but it says nothing about which file should be open.
What if you have no notes open, what happens then?
I think before fixing the code, I would need to understand more about the range of scenarios (no note open, note open but in Reading mode, so note cannot be edited, and so on)
Oh, I'm also confused because the original message referenced QuickAdd, and the above references Advanced URI.
So I still don't have a list of unambiguous steps to follow, to reproduce the problem.
Here is the kind of information and level of detail I am after, in terms of steps to enable me to reproduce the problem and be confident that any fix does solve it, please:
https://github.com/obsidian-tasks-group/obsidian-tasks/issues/1300#issuecomment-1306829403
completely broke the frontmatter of that page.
I understand that it is broken, but unfortunately a screenshot does not tell me what happened to break it.
If writing a list of steps is hard, you could always record a video of what you did (if there is no private information that would be shown).
thanks again for your reply. I shall make a video and send it to you soon.
A quick question can task plugin add task after a certain heading or to the end of a file just like QuickAdd.
Thanks!
A quick question can task plugin add task after a certain heading or to the end of a file just like QuickAdd.
No, unfortunately it can only add a task where the cursor is, and if it is Source or Live Preview mode.
Also, the docs explain how the cursor position is used: https://obsidian-tasks-group.github.io/obsidian-tasks/getting-started/create-or-edit-task/
So I think in your situation you would also need to make sure the cursor is on a blank line.
If there is no cursor position, then currently it puts the new task on line 1, which is the behaviour you are seeing.
What if you have no notes open, what happens then?
By this question I understood the problem fully. If you close all your notes before closing obsidian the task modal doesn't appear. but when a note is open and I close amd open obsidian with the uri. the cursor is always at the first line. may be because of the obsidian behaves that way. the task plugin adds the task there.
it would be great to be able to select the option at the task modal to append the task at the end of the file and also the file name like the due dates can be selected through the task modal.
then I can fully implement Ctrl+Space and boom you add a task to your inbox or the daily note. Which I currently do with todoist.
it would be great to be able to select the option at the task modal to append the task at the end of the file and also the file name like the due dates can be selected through the task modal.
I will have a think about what to do, but I have to say that this is not something that is going to implemented soon.
I think the following would be a more robust thing for you to try:
There are also going to be other existing plugins that each provide commands to do a piece of what you want:
The Commander Plugin then has a Macro builder, to allow you to create a new command that executes the list of steps above.
So I think the most realistic thing to do for now is to build a set of steps that gives you the behaviour you want.
So once it is all set up, your keyboard set up would do something like the following:
obsidian://advanced-uri?vault=Nobel Notes&commandname=Append new task to Inbox
Append new task to Inbox
command is the name of a Commander Macro, which does the steps to open the file and position the cursor, and finally run Tasks: Create or edit task
open a specific file
See: Hotkeys for specific files https://publish.obsidian.md/hub/02+-+Community+Expansions/02.05+All+Community+Expansions/Plugins/obsidian-hotkeys-for-specific-files
position the cursor in a particular place
See: Scroll to Top Plugin https://publish.obsidian.md/hub/02+-+Community+Expansions/02.05+All+Community+Expansions/Plugins/obsidian-scroll-to-top-plugin
It also has an option to scroll to the end of the file.
I fixed it with advanced URI Run "obsidian://advanced-uri?daily=true&commandname=Tasks: Create or edit task&mode=append" it appends the task to my daily note.
Please check that this issue hasn't been reported before.
Expected Behavior
Task plugin should always add task after frontmatter.
May be in the future : ability to add task after any heading just like Quick Add plugin
Current behaviour
When I add a task trough the task moder it dismisses the yaml frontmatter.
Steps to reproduce
Just add a task triggering Obsidian directly through task modal.
Which Operating Systems are you using?
Obsidian Version
latest
Tasks Plugin Version
latest
Checks
Possible solution
No response