notesmd-cli icon indicating copy to clipboard operation
notesmd-cli copied to clipboard

Links do not update when moving files

Open Anaritus opened this issue 1 year ago • 5 comments

Describe the bug Moving notes does not update links To Reproduce

At first I though it was specific to nested notes Image

I was wrong

Image

Expected behaviour

Content of a should change like it does when I move/rename inside of app

Screenshots already done

Additional context

Btw really cool tool, use it all the time to open note in app from nvim

Anaritus avatar Apr 23 '25 22:04 Anaritus

Hey thank you for the feedback! I realised why this is happening, current implementation only supports wikilinks ([[note-name]]) but you are using markdown links ([note-name](note-path). I tend to only use markdown links for external links and use wikilinks for internal links so I hadn't considered this use case.

I can add it as a feature request but I won't able to make the changes soon. In the mean time please use wikilinks and it should work.

More info here: https://help.obsidian.md/links

Yakitrak avatar Apr 24 '25 09:04 Yakitrak

Thanks for claryifying! Does not work still... Am I doing it wrong?

Image

Anaritus avatar Apr 24 '25 09:04 Anaritus

Please can you retry but don't include the path in the note when you manually link it at the start. For example you can just do [[c]] to link to the note, Obsidian doesn't need the full path for internal links. Although I think it uses it when there are multiple notes of the same name in which case this might be a bug you've found where it fails to update links for notes that are linked are using the full path.

Yakitrak avatar Apr 24 '25 10:04 Yakitrak

Oh! Yeah, it does work like that, thank you!

Image

Funny thing: after obs m b/c_1 b/c a.md did not update path for a (which it should), so jumping to link opened the one in root. However, as you can see in screenshot, it did rename link back to c_1. Pretty minor bug, I think I should be fine with using unique names for notes

Anaritus avatar Apr 24 '25 11:04 Anaritus

Thanks you confirming. I'll make a note to add the following improvements:

  • Move command - Handle link updates for markdown links
  • Move command - Handle link updates for nested path links (for wikilinks and markdown).

Yakitrak avatar Apr 24 '25 12:04 Yakitrak