Will you consider adding a format conversion feature that converts all the links in the vault to either absolute or relative path links? This will make all the links in the vault consistent in format and also make the feature requested here in this thread possible.
You can open another FR for the conversion.
It will not solve this FR because we don’t want that [[file]] points to a file under one rule and to another file under a different rule. What will solve this FR is forcing relative users to have links that begin with either ./ or ../.
I think it doesn’t matter that " [[file]] points to a file under one rule and to another file under a different rule", because every time you switch to another mode, the [[file]] will be converted to, say, [[…/file]], and it still points to the same file.
In a subfolder within a vault, insert an explicit relative link [[./x/y]]. Hover-preview the link and click to open it, or use the open link under cursor command.
Expected result
A note x/y.md is created in a subdirectory of the folder the note is in, and the note is opened
Actual result
The operation silently fails after creating x/y.md under the vault root.
Environment
Operating system: Windows
Obsidian version: 0.12.19
Additional information
It doesn’t matter what the link creation setting is set to.
In 11.1 a new feature was added that would create new files as well as new folders based on a link. I am not sure if this is a bug, or I am using it wrong.
Steps to reproduce
In a random folder create a note with an embedded link.
[[NewFolder/NewNote]]
Expected result
I would expect it to create a new folder in the current directory and a new file in the newly created directory.
Actual result
The new folder is created in the Root folder.
Environment
Operating system: W10
Obsidian version: 0.11.3
Additional information
I am using these new links in templates. To me, that is where this feature really shines. If you were creating the link by hand you could use absolute path, but wouldn’t the ability to make it relative also make sense. Thanks.
The folders are created according to your settings in Files & Links and Default location for new notes for new link format. I am not sure how those two interact when you specify the folder as part of the links. As far as I know if you have Shortest path when possible this means at the root of your vault.
Yes Sir, I understand what you are saying and I would expect it to behave the same. My Default location for new notes is set to “Same folder as current file”. I think the issue is a new folder is created before a new note is created, so the new note option is probably not used. To me it would make sense for the new folder to follow the same option selected for new notes. I know that may be a bit confusing, but if we look at notes and folders as entities then it falls in line. Thanks for responding, and thanks for a great application.
I am not sure why this got moved to Help. I assume you are saying it’s not a bug. That links that create folders as well as files will always default to root folder.
Like I said in my original post, I believe the issue is the the newly created folder is not adhering to the New Note setting. I completely understand why that would be the case; folder vs note. It seems like a bit of overkill to have a new setting for just this use case. Thus my mention of just using the New note setting to apply to folders created in this manner. I would create a new setting, but also freely admit that I have OCD issues; LOLOL. I am sure if I include the full path it would work as expected. If I were to type it by hand, being able to use relative path makes sense. I am not typing the link, I am using it in templates, and once again being able to use relative path makes sense.
Alright, I can confirm that right now it’s not possible to specify relative paths in the inline links. Moving this to #feature-requests and editing the title to specify the use case
I am using Templater, so I used {{tp_folder:vault_path=true}} as part of my New link to get around the issue. I still think this would be a great feature to add for those not using Templater, or a plugin which will give you the full path to current folder. Thanks again for a great application.
I read your request. I agree that (while I do not use relative paths for new notes) the behavior of the “Click on non-existent note to Create” should be similar to that of a Cmd+o
If I were having to manually move all of my new bracket-link created notes to their respective folders, I would also be making this request. Perhaps a future vault of mine will need this.
There is a plugin called Consistent Attachments and Links that may solve this.
For some INEXPLICABLE reason the Obsidian team refuses to deal with folders as selectable and as context. I should be able to open a folder and have it the “current folder” and new nites should be there by default. That is pretty much a universal standard of behavior, but for some reason Obsidian team doesn’t support this.