When in edit mode (new editor, not legacy) and you command-click on an empty link like the one below:
This is a test [something]()
^--command click anywhere here
…Obsidian will create and switch to an entirely new, empty file, named ().md in your vault. e.g.
After this happens, when I open the JS console to see if any warnings or errors were displayed, I find none. In my opinion, command-clicking an empty link should not create a file named () — it should just be a no-op.
First, your example is not a wikilink, but a markdown link…
Second, maybe I don’t completely understand your problem - but of course, if you change the link’s target (which, in markdown links, is the part between “()”, whereas the first part between “[]” is the link’s alias), obsidian will create a new file in case it doesn’t exist yet.
Ah, thanks, that’s true. I updated the OP. Actually your reply led me to the repro steps, so I updated the post to include that too. I still think it’s a bug, command-clicking an empty link should not create a file named () — it should just be a no-op.
But still, that’s expected behaviour. When you click a non-existing link, the link (means: the file) will be created - that’s what obsidian does (see here)
Update: Just tried myself - though in general the creation of a new file is expected behaviour, some different things happen depending on which editor you are using:
With the old legacy editor, a new empty file is created in edit mode, when you ctrl + click in between the parentheses; in reading mode, though, a popup appears which is asking you if you really want obsidian to open an external link.
If, however, you click on the link’s alias, nothing happens at all;
With the new live preview mode, clicking the alias will create a new empty file as you described in your example.
At least, obsidian’s behaviour should be consistent, regardless of editor and mode; ideally,
nothing happens when you click an empty link
file will be created if you click a non-empty, non-existing link.
I can’t think of a single case where creating an empty file named () would be the desired behavior. The parentheses are never supposed to be part of the filename.
I have not yet found a consistent way to make this happen. Happened twice this week. One time I managed to get the note named with parentheses to be created, probably by additional keyboard input after that popup happened:
Given I do not know yet what causes it to happen, it also makes retrying in safe mode a bit of a hassle at the moment.
I searched the reports and got no hits on this, but I can also understand that parentheses are a special case for searches.
Steps to reproduce
Used Ctrl+K to wrap existing text to become a link.
Expected result
Editor creating the link markup around the wrapped text and waiting for a URI to be provided within the parentheses, no popup to create a page named after parentheses.
Actual result
Got this pop up once the cursor positioned itself in the parentheses.
Environment
Operating system:
Debug info:
SYSTEM INFO:
Obsidian version: v0.14.6
Installer version: v0.14.2
Operating system: Windows 10 Home 10.0.19043
Login status: not logged in
Insider build toggle: off
Live preview: on
Legacy editor: off
Base theme: dark
Community theme: Obsidian gruvbox
Snippets enabled: 0
Safe mode: off
Plugins installed: 2
Plugins enabled: 2
1: Advanced Tables
2: Sort & Permute lines
Obsidian should show some kind of indicator that there is no link at all.
The link should not navigate anywhere.
Actual result
Obsidian opens a page called ()
Environment
Operating system: macOS
Debug info:
SYSTEM INFO:
Obsidian version: v1.1.15
Installer version: v1.1.9
Operating system: Darwin Kernel Version 22.4.0: Fri Feb 10 08:10:52 PST 2023; root:xnu-8796.100.721.505.3~4/DEVELOPMENT_ARM64_T6000 22.4.0
Login status: logged in
Catalyst license: none
Insider build toggle: off
Live preview: on
Legacy editor: off
Base theme: light
Community theme: Typora-Vue v1.0.1
Snippets enabled: 0
Restricted mode: off
Plugins installed: 43
Plugins enabled: 20
1: Advanced Tables v0.18.1
2: Folder Note v0.7.3
3: Breadcrumbs v3.6.4
4: Auto Link Title v1.4.1
5: Auto Hide v0.4.4
6: Checklist v2.2.12
7: Templater v1.16.0
8: Recent Files v1.3.5
9: Zoom v1.1.1
10: Dataview v0.5.55
11: Obsidian Git v2.16.0
12: Execute Code v1.6.2
13: Copy button for code blocks v0.1.0
14: Highlightr v1.2.2
15: MAKE.md v0.6.12
16: Copy Block Link v1.0.4
17: Omnisearch v1.11.1
18: Dynamic Table of Contents v0.0.27
19: Quick Switcher++ v2.3.7
20: Admonition v9.2.1
RECOMMENDATIONS:
Custom theme and snippets: for cosmetic issues, please first try updating your theme and disabling your snippets. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community theme and snippets.
Community plugins: for bugs, please first try updating all your plugins to latest. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community plugins.
For me, Obsidian regularly creates a file ().md without me clicking any links. I have exactly two occurrences of an (allegedly) empty link in all my markdown files. Both locations are within code blocks. E.g. defining an empty list in a bash script.
From time to time Obsidian creates this file for whatever reason. I obviously don’t click it, because it’s not even an actual link. Sadly, I can’t reproduce it reliably.
Update: I can’t say for sure but I think the issue I was having came from a point where I wanted to write down a link via the markdown link syntax but pasted the link into the parentheses a bit later, so obsidian created a file called ().md. That file then got synced to other devices via onedrive and after I deleted it, the file got synced again and again. So I am not sure if the issue on my end was caused by Obsidian or Onedrive. If I ever find out for sure, I’ll report back.