QOwnNotes
QOwnNotes copied to clipboard
link to .md in another folder
Expected behaviour
From my main.md I want to link a note in another (sub/parent) folder. In the example I want to link from main.md to inner.md and outer.md.
├── main
│ ├── another.md
│ ├── inner
│ │ └── inner.md
│ └── main.md
└── outer.md
Content of main.md:
[link to inner note](inner/inner.md)
[link to inner note](./inner/inner.md)
[linkt to outer note](../outer.md)
[link to inner note](inner\inner.md)
[link to inner note](.\inner\inner.md)
[linkt to outer note](..\outer.md)
I try / and \ in file path, because it differs from windows to linux, .... I am using this notation and not the one with note://, because of compatibility with another application, but I tried both.
Actual behaviour
The link to another.md is working without any problem.
But when I click on the link to inner.md or outer.md I get the message
Note was not found, create new note inner?
Output from the debug log file
[Apr 07 13:50:19] [debug]: on_noteTextView_anchorClicked - 'url': QUrl("inner/inner.md") [Apr 07 13:50:19] [debug]: QOwnNotesMarkdownTextEdit openUrl - 'urlString': "inner/inner.md" [Apr 07 13:50:19] [debug]: QMarkdownTextEdit openUrl - 'urlString': "inner/inner.md" [Apr 07 13:50:19] [warning]: ShellExecute 'inner/inner.md' failed (error 2). [Apr 07 13:50:20] [debug]: on_noteTextView_anchorClicked - 'url': QUrl("./inner/inner.md") [Apr 07 13:50:20] [debug]: QOwnNotesMarkdownTextEdit openUrl - 'urlString': "./inner/inner.md" [Apr 07 13:50:20] [debug]: QMarkdownTextEdit openUrl - 'urlString': "./inner/inner.md" [Apr 07 13:50:20] [warning]: ShellExecute './inner/inner.md' failed (error 2). [Apr 07 13:50:21] [debug]: on_noteTextView_anchorClicked - 'url': QUrl("../outer.md") [Apr 07 13:50:21] [debug]: QOwnNotesMarkdownTextEdit openUrl - 'urlString': "../outer.md" [Apr 07 13:50:21] [debug]: QMarkdownTextEdit openUrl - 'urlString': "../outer.md" [Apr 07 13:50:21] [warning]: ShellExecute '../outer.md' failed (error 2). [Apr 07 13:50:23] [debug]: on_noteTextView_anchorClicked - 'url': QUrl("innerinner.md") [Apr 07 13:50:23] [debug]: QOwnNotesMarkdownTextEdit openUrl - 'urlString': "innerinner.md" [Apr 07 13:50:23] [debug]: QMarkdownTextEdit openUrl - 'urlString': "innerinner.md" [Apr 07 13:50:23] [warning]: ShellExecute 'innerinner.md' failed (error 2). [Apr 07 13:50:24] [debug]: on_noteTextView_anchorClicked - 'url': QUrl(".innerinner.md") [Apr 07 13:50:24] [debug]: QOwnNotesMarkdownTextEdit openUrl - 'urlString': ".innerinner.md" [Apr 07 13:50:24] [debug]: QMarkdownTextEdit openUrl - 'urlString': ".innerinner.md" [Apr 07 13:50:24] [warning]: ShellExecute '.innerinner.md' failed (error 2). [Apr 07 13:50:25] [debug]: on_noteTextView_anchorClicked - 'url': QUrl("..outer.md") [Apr 07 13:50:25] [debug]: QOwnNotesMarkdownTextEdit openUrl - 'urlString': "..outer.md" [Apr 07 13:50:25] [debug]: QMarkdownTextEdit openUrl - 'urlString': "..outer.md" [Apr 07 13:50:25] [warning]: ShellExecute '..outer.md' failed (error 2).
Thank you for your suggestion, currently it's only possible to link to a note in the same sub-folder.
What would be required to make this work?
Hm, I guess quite some things. Changing how linking to notes works in general. This might also break existing links. Also of course the Link dialog has to be adapted.
mmmh... and will also interact with #266.
I suppose the most resilient way to add this would be to make all paths relative to the root notes folder, similar to e.g. vim's find files works. That should then also work when using e.g. pandoc, as long as that is started from the notes root.
Is there a road map or some other kind of mid-term planning for this project so I can get an idea of how planned features will interact? I have exams coming up in a few weeks, but would like to sit down afterwards and start working on some things. I guess I'll talk that over with you in IRC then if that's okay? :)
Is there a road map or some other kind of mid-term planning for this project
not really, there are too many things that come up constantly (by user request most of the time)
I guess I'll talk that over with you in IRC then if that's okay? :)
sure, but this smells like major regressions (that every pull request I got so far had) :) I wonder how you will deal with that ;)
Could you please head over to #266 to test and comment on the new features.