Ebonsignori / obsidian-at-symbol-linking

Adds ability to link with @ in Obsidian. Can limit @ linking to specific folders e.g. People/
MIT License
60 stars 9 forks source link

@-mentioning stops working in tasks as soon as it includes #todo #3

Closed barryvan closed 1 year ago

barryvan commented 1 year ago

It seems as though there's a conflict between this plugin and the Tasks plugin. I have my Tasks plugin setup with a global filter of #todo. It seems that as soon as this tag is included in a regular task, @-linking completely stops working on that line.

Attached is a brief video: https://github.com/Ebonsignori/obsidian-at-symbol-linking/assets/124363/6c5dc0ca-2a91-49e5-a16d-e259ba5ac031

It works fine with other tags -- it just seems to be the specific global filter tag that causes issues.

Steps to reproduce:

  1. Install this plugin.
  2. Install Tasks.
  3. Configure Tasks to use a global filter -- for example, of #todo.
  4. Create a task list item. Note that @-linking works beautifully.
  5. Add the #todo tag to the item. Note that now you cannot @-link anywhere on that line until the tag is removed.
Ebonsignori commented 1 year ago

Hi @barryvan first off, thank you SO much for pulling this down and using it. Even more so for reporting bugs

Was able to fix the other issue you opened, but having trouble with this.

I've tried following the steps you listed but am able to keep @-linking after typing the global filter, #todo which I added in the Tasks plugin options.

If you try updating the tasks plugin to the latest version does it still happen?

If so, mind sharing the following so I can try other ways to reproduce?

barryvan commented 1 year ago

I think I've worked out what's causing this: the Task plugin's auto-suggest capabilities. Specifically if it's set to "on" and the "length" option is greater than 0. I've worked around this for now by dropping it back to 0. I'm not quite sure how we could go about getting the two working together, so perhaps this is more just something to be aware of if other people run into the issue. :) For now I've just set my own settings such that it's not an issue any more. 😃

judisohn commented 1 year ago

@barryvan I can't seem to get this working. If I set the length to 0, it's showing the suggestion constantly and "@" never works. I can only seem to get the @-linking to work if disable auto suggest on Tasks completely, which I'd rather not do. Did I set it incorrectly?

CleanShot 2023-08-29 at 18 52 01@2x
barryvan commented 1 year ago

Hmm, that's strange! Your settings look like they match mine exactly, so I don't know why it would be working for me and not for you, @judisohn. I think @Ebonsignori is investigating in #7, and I'll also try and have a poke around if I get a chance.

In the meantime, it may be worthwhile trying to force the plugins to load in a different order... I think you can do this by (for example) disabling A then B, then enabling B then A -- but you may need to experiment, and I have about 5% confidence that this will help. 😕

FWIW, I've also started a discussion over on the Tasks plugin's repo to see if anyone has insights: https://github.com/obsidian-tasks-group/obsidian-tasks/discussions/2239

claremacrae commented 1 year ago

There is a workaround for this given in:

Ebonsignori commented 1 year ago

@judisohn @barryvan I've added "Compatibility Mode" in 1.4.0 which should allow the @ to trigger a link in a task. Please try it out and let me know if you run into any bugs!

judisohn commented 1 year ago

@Ebonsignori It works well now! Thank you so much for implementing this quickly. :-)