esm7 / obsidian-map-view

Interactive map view for Obsidian.md

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

linkedto doesn't work with PATH

Coursitout opened this issue · comments

Hi,

linkedto seems to only work with the title of a note, but not with the path. Ex. in my Query format with (linkedto:"$PATH$" OR linkedfrom:"$PATH$") it doesn't work but if I manually replace it with

linkedto:"Napoleon Bonaparte" it works.

And it doesn't work with linkedto:"Notes/Napoleon Bonaparte.md", which works with linkfrom.

commented
  1. Can you make sure you are using Map View 3.0.2 (released last week) which fixes this issue that might be related: #158
  2. If that's not the same issue, can you paste the full query that doesn't work for you after the expansion of $PATH$? i.e. click "focus ... on Map View" so the filter would be updated to linkedto:"your note path" OR linkedfrom:"your note path" and copy that filter (which should not include the $PATH$ string)?

Thanks for your answer. I'm using 3.0.2, but I don't think it's the same issue, last week it didn't work at all when putting the two PATH with OR, now it works but it only shows one of them.

This is the query I get for my note on Philo :

linkedto:"Notes/Philo.md" OR linkedfrom:"Notes/Philo.md"

On the map, it shows notes from linkedfrom:"Notes/Philo.md" but doesn't show the linkedto:"Notes/Philo.md" part.

commented

I believe this is fixed in the just-released version 4.0.0. The linkedto mechanism used string matches while linkedfrom used the Obsidian link resolving mechanism. I changed the linkedto to use link resolving as well, although being a bit concerned that it will break some users' queries who have been counting on partial matches to work. But I believe this is the better way to implement this feature.