pvojtechovsky / obsidian-link-with-alias

Obsidian plugin for handy creation of links and alias in front matter of target document
MIT License
33 stars 1 forks source link

Question: When you delete an alias from a link does it also delete it at the metadata? #21

Open AndreiSager opened 1 month ago

AndreiSager commented 1 month ago

If you can add an alias to the metadata using this plugin, can it do the opposite? If it does, then I'm sold.

pvojtechovsky commented 1 month ago

@AndreiSager, thanks for question. This plugin never removes any aliases from metadata, it just creates aliases when they are missing.

If you need it different then please describe your use case so I can understand your needs and think abut solution.

AndreiSager commented 4 weeks ago

I have actually been using your plugin for a while now. While I do enjoy that this plugin helps me create aliases for metadata when I create an alias inline. I encountered a problem when I updated my metadata aliases but the inline aliases did not change.

I was expecting that the inline aliases would change when I change the aliases from the metadata. If I edit the alias from the metadata, the inline aliases should also change. Similar to how Obsidian title and links works.

image

pvojtechovsky commented 3 weeks ago

Hi @AndreiSager I like your idea to update link display text following the change in appropriate alias. I would like to have it in this plugin.

I guess it should also keep origin letter case

[[Target note|Target]] at the beginning of sentence.
This [[Target note|target]] is in the middle of sentence.

WDYT?

And how should it handle deletion of alias?

pvojtechovsky commented 3 weeks ago

@AndreiSager I am also interested in details of your use case / story. Why do you update alias in metadata? In my way of usage I never did it. So I am really interested why do you need that.

AndreiSager commented 2 weeks ago

First Reply

Hi @AndreiSager I like your idea to update link display text following the change in appropriate alias. I would like to have it in this plugin.

I guess it should also keep origin letter case

[[Target note|Target]] at the beginning of sentence.
This [[Target note|target]] is in the middle of sentence.

WDYT?

And how should it handle deletion of alias?

I think you should let the users decide which alias they will be using, instead of having it based on the position of a word in the sentence. Having that feature would not be good for proper nouns, as proper nouns are always capitalized regardless of position.

[[Arthur Pendragon|Arthur]] at the beginning of sentence.
This [[Arthur Pendragon|Arthur]] is in the middle of sentence.

When an alias is deleted only the title should remain.

[[Arthur Pendragon]] at the beginning of sentence.
This [[Arthur Pendragon]] is in the middle of sentence.

Or make it possible for an alias to be merged with another alias. This is a modal from tag wrangler.

image

Second Reply

@AndreiSager I am also interested in details of your use case / story. Why do you update alias in metadata? In my way of usage I never did it. So I am really interested why do you need that.

I'm actually also a writer. I like making stories and sharing it with my close family and friends. Whenever I want to change the title of a note, I also change the aliases, that also means that I need to change the aliases for the other notes.

For example, if I want to change the name of my character from "Arthur Pendragon" to "Merlin Ambrosius". The external link name would be updated but the alias remains the same.

[[Merlin Ambrosius|Arthur]] at the beginning of sentence.
This [[Merlin Ambrosius|Arthur]] is in the middle of sentence.

This would really make a great feature as it saves a lot of hassle and time when changing the aliases of links in different files, especially, a vault with a large amount of internal link connections. 😉 image 😉 I assume this would be useful for writers like me, students, or anyone for whatever purposes they use obsidian.

pvojtechovsky commented 1 week ago

Thanks for explanation, it makes sense.

I think you should let the users decide which alias they will be using, instead of having it based on the position of a word in the sentence. Having that feature would not be good for proper nouns, as proper nouns are always capitalized regardless of position.

How would you do it if there is a lot of alias usages in links?