-
-
Notifications
You must be signed in to change notification settings - Fork 428
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
[I] Path to note in link does not change #3200
Comments
That doesn't look like a correct note link. |
Do you have the same issue without portable mode? |
I just tried and can't reproduce your issue. I get a dialog that tells me that linked notes need to change... You never shared your settings. |
My omission, I thought the issue was specifically with the logic of the code itself. Here are my settings that I used for testing (I only changed the settings related to language and translation. I don't remember touching anything more significant).
|
I get this dialog window when I move I also tested this on It seems a bit convoluted to describe, but I hope you understand me. 😄 I also tried other options: If I try to insert a link to the note as a regular file using If I try to create a link using |
Ah, I see now. Currently, the mechanism only supports looking for notes that are linking to the moved note, not the other way around. This use case was more important, because you may not know anymore what linked to your note (meanwhile, you can also show the backlinks to notes). Would be a nice addition tho... QOwnNotes/src/entities/note.cpp Line 3418 in f9f73a4
|
I did some additional testing with different usage scenarios related to links and notes. I decided not to create another issue, as I think these are all part of the same problem: "broken links due to various actions with paths and notes". To summarize, the link remains valid if:
Additionally, I wanted to mention that when |
Yes, of course. There is no connection anymore.
Currently, you can do that with the backlink panel. |
Limits of QNI tried hours of testing in QN, in which cases Markdown links will break and tried to memorize those cases. I use QN 97% of the time and I think QN is terrific and very userfriedly, I love it. Correctly Updating standard markdown links is rare among editorsUpdating standard markdown links is a very very tough puzzle. I've tried a view editors and currently only 2 editors are capable of it.
Community-Plugin: "Obsidian-consistent-attachments-and-links" Regex to correct links from VS CodiumDisadvantage: VS Codium transforms Alternatively I am thinking about writing a script in QN that updates the corrects the links, so QN and VS Codium work together (I only know a tiny bit of programming though). Community support neededVS Feature Request |
Is there any documentation about those links? I haven't seen them anywhere... |
VS Codium update April 2022:Before 2022-04 VS Codium didn't support those links at all (and neither did they support spaces in file names properly). From then on they went "all-in" and on every refactor md links have been changing to angle bracket links strangely. Maybe this was the way to solve the refactoring puzzle, no idea? See: Properly support commonmark angle bracket syntax in links #148818 and also Improper parsing of commonmark link-destination #136073. Official commonmark-specificationI thought those "angle bracket links" are wrong and asked VS Code developers to properly URL encode the links again. They told me it was an official commonmark specification: Obsidian Plugin implementing angle bracket linksFunnily enough there is even an Obsidian-Plugin which deliberatly changes all links to angle bracket links to make them more readable to the user and also manages link refactoring correctly: https://www.obsidianstats.com/plugins/better-markdown-links. (it's part of the same group of plugins from the same author I mentioned in my previous post). ConclusionI don't know if angle bracket links came to stay or if other note taking apps will focus on "URL-encoded" links more again. Nevertheless it seems to be an official commonmark specification. So displaying them I guess would not be a totally bad idea. Moreover the current logic of the file renaming and refactoring of QN would be affected as well. No idea how much this would break :-/. Like I said, I currently do a RegEx on all files as a workaround to avoid the topic. I need to have a look at the RegEx Specialtities of QN, as RegEx's of differnent programmes and languages in general often differ to what they support. |
So it's a commonmark "spec". It looks so awkward... |
QOwnNotes never supported commonmark (in most cases)... |
But this feature request is about supporting re-writing of outgoing note links too. |
Signed-off-by: Patrizio Bekerle <[email protected]>
Signed-off-by: Patrizio Bekerle <[email protected]>
Signed-off-by: Patrizio Bekerle <[email protected]>
Signed-off-by: Patrizio Bekerle <[email protected]>
Signed-off-by: Patrizio Bekerle <[email protected]>
Signed-off-by: Patrizio Bekerle <[email protected]>
Signed-off-by: Patrizio Bekerle <[email protected]>
Signed-off-by: Patrizio Bekerle <[email protected]>
Signed-off-by: Patrizio Bekerle <[email protected]>
Signed-off-by: Patrizio Bekerle <[email protected]>
Signed-off-by: Patrizio Bekerle <[email protected]>
This was a huge amount of work, much more than I expected... 😬 Fixed an issue along the way... 25.1.5
25.1.4
|
There now is a new release, could you please test it and report if it works for you? |
I understand well when a seemingly simple task becomes really huge... Indeed, now the links are saved whenever you move notes. And that's great, thanks!
There was only one moment left, which I also wrote about above, when the name of the subdirectory in which When a directory in the note's path is changed
|
There currently are no actions for sub directory renaming, can you please create a new feature request? |
What did you try to do with the brackets? You used a link in a link. |
These Links were provided by VSCODIUM and Obsidian (with the Plug-In: "Better Markdown Links"), whenever I moved files and update the links. |
I learned something new today. 😊 |
Expected behaviour
I create a link in the note
./folder_1/note_1
to another note./folder_2/note_2
:When moving the note
./folder_1/note_1
to a higher or lower directory, for example, to./folder_1/subfolder_1/note_1
, the link path to the note should update to../../folder_2/note_2
to remain valid.Actual behaviour
The link path remains unchanged:
../folder_2/note_2
. As a result, the link becomes invalid and does not work.Steps to reproduce
./folder_1/note_1
and./folder_2/note_2
.The text was updated successfully, but these errors were encountered: