The new automatic insertion of the filename alias in links is bugging me, anybody else?

In https://forum.obsidian.md/t/obsidian-release-v1-2-7/59004/1 our lovely developers gave us this:

  • Links with folder paths will now automatically insert an alias to the base filename (e.g. [[folder/file]] will expand to [[folder/file|file]])

I have two questions on it:

  1. I intentionally use folders as part of the link names - I want to see if a linked note is a seed, or a definition, or a source and so on and I have folders and templates setup to manage all of that. The above change means I now have to manually delete the inserted alias ever time I link a file to get what I want, which is obviously a bit of a pain. Is anybody else hitting this, or is it just me that’s working in this way?
  2. Given the automatically inserted alias, any files that have the same name in different folders are now visually identical in the text - one might be to the definition note of a cats (in definition/cats), another link might be to my list of favorite cats (in collections/cat) but I’ll just see two links with the same text, and assume that they’re to the same place. Again, is this just me?

Ideally I feel like there should be a fourth option of Absolute path with alias in the vault settings here…


… or possibly an extra setting of Add filename as alias to links alongside it. Any thoughts on this, before I go off and create a FR?

6 Likes

I prefer the new behavior, but I understand your use case. I also avoid duplicate names whenever possible because (sadly) most apps don’t take full advantage of paths (for example: tabs in a text editor tend to show only the file name when 2 same-named files are open, instead of adding the parent folder to distinguish).

Understand your approach as well, was doing that prior but found the benefits of what I’m doing now outweighed the downsides :slight_smile: Now looking at supercharged links so I can dress a link with icons/emojis to reflect the source folder, which in some ways is better than what I was doing anyways.

One other thing has occurred to me though - I do use link text when I don’t want the text to change in that note ie. it’s part of the flow of the sentence but there’s a relevant link. This works well for when I rename notes (especially atomic idea seed notes, they will change quite a lot over their life as I refine the title to reflect the idea). But having all my links alias’d for me on when I insert them means that wont happen, correct?

You can still set your own link text, and I’d expect the link to update and the text to be preserved when you rename the linked note, even if there’s a path involved (but I haven’t tested it).

Agree with all that, but I thinking about it from the other side - now all my links are automatically getting an alias (because pretty much all my notes are in folders), so that means that as I update the note name the link name ISN’T changing, even when I want it to. We’ve silently gone from “note links are renamed to match note names unless you say otherwise” as the default behaviour for Obsidian, to “note references keep the name they have when you first link to them (but only if they’re in a folder)” as the default behaviour.

Maybe to help make that clear, here’s the first few notes in my Seedbox folder:
image

Each of the those file names is a concept/tagline that encapsulates the idea; this approach is from Andy Matuschak’s evergreen notes approach (here and here), and there’s similar things in Ahrens’ How to take Smart Notes and Tiago’s work. As I’m editing, growing and splitting those notes the title will naturally change and I want that title to be how that concept is known throughout the vault. With this change, every time I create a link I’m going to have to go back and delete the alias, as opposed to adding an alias on the odd occasion that I do want it fixed in that context.

Also, I’d add as well that if I do want an alias, it’s never just the filename at that point in time, it’ll be a word or words that fit the flow of the sentence I’m writing - so the fixed alias of the filename still isn’t of any use.

The more I think (write) about this, the more I feel this should be an optional setting - I can’t be the only person working like this :thinking:

1 Like

What steps you are taking to rename? Here I’m renaming “From plain-text note-taking” to “note-taking” by right clicking on the note in the files tab → Rename. Both the note name and display text are changing together.

When it won’t change is if you alter the display text* in any way yourself.

*Just to keep the terminology clear, the text after the | in a link is the display text. Some people call it link text, but it’s not an alias. It could one day grow up to become an alias if added to front matter/YAML, but for today it’s just display text. :laughing:

2 Likes

OK, I understood the original problem. I thought in the text I quoted you were trying to describe an additional problem.

I’d guess that relying on visible paths in notes is uncommon.

I forgot about this! :see_no_evil: (It hasn’t come up yet in my vault because I started avoiding duplicate names a while ago.)

Thank you, you’re (both) right - I wrote the second post before testing it, which is my bad :face_with_diagonal_mouth: I’ve just come back after testing it to say I had it wrong - the link text (not “alias”, terminology noted) updates in line with the filename as you explain above @ariehen. So that bit isn’t a real problem (phew), and I’ve got a reasonably good workaround for seeing the folder name with the Supercharged Links plugin. Thanks to you both for participating in my minor rant :smiley:

Wheu. Glad it’s working. Thought maybe I had misunderstood your workflow.

Also, didn’t mean to preach or steal Cawlin’s thunder about the display text wording, but like to set the record straight when I can. Lots and lots of people say alias for display text which is normally fine and doesn’t matter at the end of the day, but it can get confusing when trying to work out an issue.

1 Like

All good, I didn’t really have a term for it so I used the closest I had from elsewhere in Obsidian. More.than happy to be given the words to use - as you say, helps solve issues :+1:

I’d guess that relying on visible paths in notes is uncommon.

I can’t speak to how common it is, but speaking for myself, I rely on folders being part of the note’s display name.

For example, at work I’ve got folders for taking notes in my 1:1s with colleagues. The schema is something like meetings/<person>/<date>, so if I’m meeting with Bob and Sally on the same day, I’ll have:

  • meetings/bob/2023-05-10
  • meetings/sally/2023-05-10

I consider that full path to be the note’s “name”, and want it displayed as such.

Given that there’s already a configuration option for “New link format”, surely the original behavior can be added as an option there?

I’m now using Supercharged Links to dress up links in order to sort out this issue for myself, and it’s working reasonably well (a bit annoying that I have to set something up for every folder I create though, feels redundant given what we had before). But sad to say though, given you’ve got much more detailed paths than me with names and dates, my approach isn’t going to work for you. I suggest you create a feature request around an option in the “New Link” format setting? Hopefully it’s a simple thing to do and the dev’s can add it easily.

Otherwise I guess you’re stuck having to manually delete the link text every time you create a new link? :person_shrugging: :grimacing:

Looks like someone beat me to it, I’ll chime in there.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.