Naked aliases aren't links?

I haven’t noticed this before but apparently using a naked alias inside wiki brackets (like this: [[nelson2011zzStructure]]) does not point that link to the note with the alias in question!

Maybe this is not a bug but rather an under-documented way the aliases/links work now, but I cannot imagine this behaviour having a meaningful reason: if I have a note titled “Ted Nelson’s zzStructure paper” and it has an alias nelson2011zzStructure, it it highly unlikely that I also create a note called nelson2011zzStructure! Right now this is perfectly possible and leads to confusion.

For context, my use case is pretty straightforward: I want to use citekeys as aliases while naming the notes using the full source title and author. If aliases worked as proper links that would make my references way tidier: [[nelson2011zzStructure]] looks much better than [[Theodor Nelson − A Cosmology for a Different Computer Universe_ Data Model, Mechanisms, Virtual Machine and Visualization Infrastructure]].

Steps to reproduce

  • Create a note titled Alias Test Note
  • Add frontmatter alias to it:
---
aliases: [alias-test]
---
  • go to any other note and create a link to the first note by typing [[alias-test]], DON’T use autocompletion when you do that.

Expected result

The link points to the note titled “Alias Test Note”

Actual result

The links points to a non-existing note titled “alias-test”. This note will be created when the the link is clicked.

After that there will be two notes shown by autocomplete in the quick switcher dialog and during new link creation

Environment

  • Operating system: Windows 10
  • Obsidian version: 0.11.9

Here’s a screenshot showing the original note (top left), incorrectly created noted titled same as aliast (bottom left), and another note with links to both of these notes, in edit mode (top right) and in preview mode (bottom right). Plus the autocompletion dropdown during link creation is also shown.

Marked in yellow is the proper note title. Marked in green is it’s alias. Marked in red is another note that gets created when I click on the red link in the bottom right pane.

Hope this makes sense. Feel free to move this to another category if “Bug reports” doesn’t apply.

1 Like

naked aliases aren’t links.

I understand that this is what you do but I don’t think that’s what most people do. I believe it’s more common [[uniquename|Alias]] or [[ID|Alias]] or [[citekey|alias]]. Aliases are used also as conversational text, hence why they can be not unique.

Hey, thank you for the quick update!

Fair enough, I understand that this is the status-quo right now, maybe aliases were even planned to behave like this from the start, for all I know.

But your argument does not sit well with me:

Well, this might be more common but only because the other way (the one I wanted) doesn’t work =).

Here’s my take on this. Again, feel free to ignore my rant entirely: I will definitely find some workaround for my issue, I just wanted to verify my understanding of aliasing functionality. But maybe my reasoning will convince you not to dismiss the possibility of making aliases even more useful, so here goes.


I, for one, prefer to name my notes with titles that are descriptive: this convention makes all Obsidian features that display note titles − file explorer, backlinks pane, search and so on − practically useful. This observation also extends to other plugins as well (Dataview, OQL), but this is irrelevant for my argument.

In fact I am ready to bet that most people prefer this naming convention as well, even though there might be some hardcore ZK fans who insist on using pure numeric note ID, I’m sure.

This shows that using only the citekey as a note title is not quite practical, and also makes two latter examples you provided sub-optimal.

That leaves us with the canonical form of [[descriptive-note-name|alias-name]]. To complicate the matter, you can also make links as ``[[descriptive-note-name|alternative-link-text]]`, which looks the same but has nothing to do with note aliases.

In any case, such a link already renders in preview mode as alias-name or alternative-link-text, and the note title is not displayed. Half the battle!

Moreover, in both the autocompletion dropdown and the quick switcher dialog the aliases are properly displayed, which suggests that they are already considered as link targets, even though you can’t link to them directly and have to use the [[note|alias]] syntax.

IMO, all that’s left to enable pure naked-alias type linking is to make note aliases first-class citizens, really equal to note titles, by making them link targets proper. This breaks zero use cases AFAICT (unless you depend on aliases not being unique, but why???), and allows a couple of previously impossible ones. Mine, for example =)

This might be so, but doesn’t this non-uniqueness make them confusing?

Honestly I can’t think of any use case that depends on this non-uniqueness (it’s just me though, I’m sure there are other opinions). Why would anyone want to use the same alias to link to two different notes? Doesn’t just the alternative link text (which is not an alias!) suffice? Also, tags might or might not serve as a substitute here: tags aren’t notes, so you can’t link to them directly, but tagging two or more notes with the same tag allows them to be found together.

Anyway, that’s all I’ve got to say about that ©.

This is not a bug report, this is not how the feature works.

This works like this because it future proofs the system and helps with data portability. You can change your aliases AND note names and no links will be broken anywhere. Any other system won’t provide this. It was heavily discussed on Discord when the feature was coming and that’s what the community landed on, with blessing from the developers of course.

Remember Obsidian tries to work as much as possible with what is in the files and not with a central database hidden from the user.

I respect your POV but I don’t thinkg that’s a general POV as you claim.

For example, let’s say you have a vault in which you talk about Apple Computer and Apple Fruit. You keep an alias for both “Apple”. The autosuggestion helps you diambiguate which of the two you are reffering to [[Apple Computer|Apple]] or [[Apple Fruit|Apple]] while keeping things legible.

What you are proposing is a more stringent enforcement of alieases to satisfy your mental model that unfortunately implies a loss for other peoples’ workflows like the one mentioned above.

I think somenody can write a plugin to force\check uniqueness alieases.

The piped link with the alias and the page name is more in line with standard Markdown, so the file is more portable and less dependent on the Obsidian software. This is core to Obsidian’s core promise of keeping your files as “yours” and as “not locked in” as possible.

4 Likes

Thank you all for your feedback!

I do appreciate Obsidian sticking to the core promise of not locking the users in and sticking to plain text, in fact these were two main reasons I started using it.

And with plugin API being available I am sure it’s possible to implement the functionality I wanted.

For now I will probably work around my problem using footnotes.

@approximate I had the same request, and @NothingIsLost created a plugin called “Auto Linker” that works for me. Just to be clear about what the plugin does and how I use it (in case it isn’t exactly what you are looking for).

In my film vault, my files are named Die Hard - 1988 - bluray shelf.
This file’s alias is “Die Hard”.

My vault also includes articles and books about Film.
When I’m reading an article, I will put dbl brackets around films being mentioned, whether the film is in my database or not. But all those brackets were useless in the sense that they were not tying into the films I had, because [[Die Hard]] doesn’t exist (other than as an alias), so I would have to click on each one in order to get it link (thereby changing [[Die Hard]] to [[Die Hard - 1988 - blu-ray shelf|Die Hard]].

The plugin avoids this. If it sees [[Die Hard]] and I have that exact alias, the link is made. It isn’t transformed, it is just made. It also displays in the graph and backlinks I believe.

The one caveat, of course, is that you have to careful to use the one alias just the once. I also collect screenplays, and I have to remember to not use “Die Hard” as an alias, but something else, like maybe “Die Hard Screenplay”.

This works perfectly for my needs in this particular vault. Sounds like it would work for your needs too. It would probably not work in other types of vaults (like for Recipes where you might have 8 different files with the same “Chicken Soup” alias!).

The plugin is here: https://github.com/nothingislost/obsidian-auto-linker and can be installed via Obsidan42-BRAT (which allows you to download experimental plugins).

2 Likes