Skip to content
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

link to .md in another folder #888

Open
LePenseur13 opened this issue Apr 7, 2018 · 6 comments
Open

link to .md in another folder #888

LePenseur13 opened this issue Apr 7, 2018 · 6 comments
Labels
Type: Feature adds functionality

Comments

@LePenseur13
Copy link

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).

@pbek pbek added the Type: Feature adds functionality label Apr 7, 2018
@pbek
Copy link
Owner

pbek commented Apr 7, 2018

Thank you for your suggestion, currently it's only possible to link to a note in the same sub-folder.

@clawoflight
Copy link

What would be required to make this work?

@pbek
Copy link
Owner

pbek commented Jun 12, 2018

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.

@clawoflight
Copy link

clawoflight commented Jun 12, 2018

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? :)

@pbek
Copy link
Owner

pbek commented Jun 12, 2018

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 ;)

@pbek
Copy link
Owner

pbek commented Sep 4, 2019

Could you please head over to #266 to test and comment on the new features.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature adds functionality
Projects
None yet
Development

No branches or pull requests

3 participants