I have two notes that I realize are actually covering the same idea and I want to merge them into one note. Call them green and verde. Both have linked and unlinked mentions.
Merging the content is easy. I can just move text from one to the other. But how do I merge these notes without breaking links?
I can’t think of any way to merge notes while retaining meaningful mentions to the originals. If I were you, I’d probably create the note green and verde (or something to that effect) and include the links to green and verde in it. I’d only actually merge them if their contents were very very similar.
Of possible relevance to future readers of this thread, I found another post in this forum about doing global find & replace on your Obsidian vault — which could help in the task of unifying links (until a ‘merge notes’ feature comes along).
To paraphrase @akaalias’s technique for the present use case:
I find the notion of types and tokens useful in these cases.
A type is a class and a token is an instance of the class. (If that is unintuitive, try this: A type is a set, and a token is a member of that set.) A type can itself be a token of another, higher-order type. (So green and verde are tokens of green (type), which is itself a token of colors (type).) We can put these ideas to work in Obsidian with links, embeds, and the backlinks panel.
You could do a whole type/token hierarchical thing in Obsidian and link your notes to that, or your could add Such-and-Such (Type) records as needed with a list of links or embeds to the records with notes and have them serve as the “tokens” in this relationship. In your case, I might do something like this:
Green (Type)
Maybe a definition or color swatches.
New notes go here
Embed green here
Embed verde here
Now you can read everything in one place without messing with links on other notes. Still, after following a link to one of those embedded notes I might forget to check its backlinks panel for type/token relationships. I want to make sure that I follow links all the way to the merged note. So, let’s add some links to green and verde.
Green
Instance of (or token of, or member of): Green (Type) (Takes me to the merged note.)
Existing notes here, as well as any new notes about green that aren’t really about verde. Or you can just notes to green and verde respectively however you do today.
Verde
Token of Green (Type) etc.
The relationships between your notes and these ideas will still be pretty apparent from the Graph View.
When merging, I’d like to have an option for the note to be deleted to be added as an alias to the note merged into, and have original references still refer to the alias rather than refer to the now combined single page. Is that possible? Whether built in or via a plugin?
The workaround posted here is probably the best available option.
The problem with using a search-and-replace for [[verde]] and [[green]] is that it won’t catch any instances where the link used a custom display text. (e.g. [[verde|all things green]]
But given the software already has the ability to update links, I would think it shouldn’t be too difficult to add the ability to tell it to “make all links to (this note) point to (that note).”
Good point. I updated my search & replace instructions above to include custom display text case. I agree that the renaming workaround is a more fool-proof solution.