Merge Notes
Describe feature
Problem and Solution
I frequently end up with two notes that represent the same concept. Because notes can exist in multiple places through clones and can have incoming links, attributes, and relations, consolidating them currently requires manually transferring each of these pieces and then deleting one note. This becomes especially cumbersome when many notes link to the duplicate.
If there was a feature to merge notes it would be simpler to maintain this. Merging Notes by Hand takes significant amount of time.
How would it look like?
You could have the option to merge notes in different ways:
Starting from a note A: Inside note A you could have an option, merge note from..., then you select a note B. Then it will ask if you really want to merge them. On Pressing Okay note B will be merged into note A.
Merging by selecting Notes: In the tree you can select multiple notes. On selecting them. On right click you can merge them, with a title you provide via a prompt.
Edge Cases
Undo: Since merging deletes note B and modifies potentially many references, the operation should ideally be undoable as a single action.
Current state vs desired State
Current State: Merging two notes manually requires migrating content, clones, backlinks, attributes, and relations individually. The amount of work increases with the number of references. Desired state: One atomic merge operation transfers/redirects all relevant data, removes the duplicate, and can be undone as one action.
Additional Information
How to Merge
How to merge individual parts starting from note A merging B into it:
- Content: Append Content of B to A
- Clones: Clone and Replace A where B is cloned at
- Links: Replace all Links toward B with Links toward A.
- Attributes and Relations: Append all Relations and Attributes into A, if duplicated don't add them as duplicates but merge duplicates, or have that as an option that is on by default for merging.
- B Delete Note B
How to merge multiple notes without a note starting form
- Choose the first note selected, and Replace its title with what has been given in a prompt before
- Apply merging logic from above.
Precedence in other software and Comparison
Evernote: Merging multiple notes via selection. Pioneer of Merging in Note Taking. It allows Merging of Multiple notes at once by selecting them all at once. After Merge a new Title is selected. https://help.evernote.com/hc/en-us/articles/209004857-Merge-multiple-notes-into-a-single-note https://youtu.be/E36FE_dFf-4?t=7
UpNote: Merging similar to Evernote. https://help.getupnote.com/organize-and-manage-notes/multi-note-actions/merge-notes https://youtu.be/OdtiA9vAHHs?t=41
Obsidian: Similar to this Idea, Merging using Core Plugin Note Composer. https://obsidian.md/help/plugins/note-composer https://youtu.be/NTM7d0NgnvQ?t=15
User Complexity without the feature
I have 2 notes A and B that are about the same concept but with different content, that should be one. But now I cloned Notes A and B into $N^C_A$ & $N^C_B$ different places, have made $N^L_A$ & $N^L_B$ different Internal Links to note A and B from notes X1 X2 X3 and Y1 Y2 Y3, have added $N^A_A$ and $N^A_B$ different attributes and relations in A and B.
For each Merge the user does by hand they need to do the following clicks. Lets call the content of A $C_A$ and B $C_B$. A note A and B would be defined now by $(C_A, N^C_A, N^L_A, N^A_A)$ and $(C_B, N^C_B, N^L_B, N^A_B)$
Calculating the amount of $UI$ (User interactions, consisting of clicks, shortcuts [like ctrl+f] and searching) a user must do the following steps for each merge:
Copying over Content ($C_A \leftarrow C_B \Rightarrow C_{A+B}$)
- Steps: go to note B (1 search + 1 click), Copy content A (2 shorcuts), go to note A (1 search + 1 click), go to the bottom and paste (1 note and 1 shortcut).
- $8 UI$
Copying over Clones ($N^C_A \leftarrow N^C_B \Rightarrow N^C_{A+B}$) :
- Steps: Copy note A (1 click + 1 shortcut), then click the note B (1 click), then click Note Paths (1 click), then click to a place the note was cloned to (1 click), then insert this note there (1 shortcut), then remove this clone of the old note (1 click + 1 shortcut), Then go back to note A (1 search + 1 click). Do this $N^C_B$ times.
- $10 \times N^C_B UI$
Copying over Attributes and Relations ($N^A_A \leftarrow N^A_B \Rightarrow N^A_{A+B}$)
- Steps: go to note B (1 search + 1 click), Press Attributes (1 click), Select all and cut (2 Shortcuts), go to note A (1 search + 1 click), Press Attributes (1 click), Append (2 Shortcuts)
- $10 UI$
Copying over Internal Links ($N^L_A \leftarrow N^L_B \Rightarrow N^L_{A+B}$)
- For simplicity there are exactly 1 Links from each other note to this note
- Steps: copy note A (1 click + 1 shortcut), go to note B (1 search + 1 click), click Backlinks (1 click), click the first backlink, Select the faulty link and replace (1 click + 2 shortcuts). Repeat $N^L_B$ times.
- $8 \times N^L_B$
so to calculate $TIM$ (Total User Interactions per Merge) we can use formula $TIM = (18 + 10 N^C_B + 8 \times N^L_B) UI$
$\square$
18 UI per merge are way past acceptable levels. So there is real need for merge to exist as an internal feature. Assume 1 $UI$ takes 0.5 seconds, that would equate to 9 seconds per merge.
New Complexity
around 5 - 6 user interactions per merge.
Source: TriliumNext/Trilium