Make cut & paste preserve node id so that internal links are not broken

Right now I am using the following methods to “Move” a node:

  1. Drag&Drop with mouse from source to target
  2. using “Move to…” action (from context menu or shortcut)
  3. Cut a node (CTRL+X) from source and Paste (CTRL+V) at target location

All of them have their up- and downsides:

  1. Drag&Drop
    upside: does not break [[links]]
    upside: works well when source and target location are close to each other
    downside: can not use it if source and target are far apart (too inconvenient)

  2. “Move to…”
    upside: does not break [[links]]
    upside: good if source and target are far apart
    downside: hard to define the exact target location (ex. to end? start? somewhere in the middle?)

  3. Cut&Paste
    upside: works well regardless if source and target location are close or far away
    upside: can define exact target location (position of pasting)
    downside: breaks [[links]]

The last one (Cut&Paste) is the most convenient to use. I always use it if I know nothing links to the source node. If I know the source node is being linked to, I try to use the other 2 options.

My feature request
Could you make Cut&Paste also not breaking [[links]] like the move actions do?

Potential solution

  • You could add metadata to the clipboard, which is used to make pasting a node as if it has been moved (aka not breaking [[links]]), ex. having the node id in the clipboard metadata
  • Since it’s possible to paste a content multiple times, I would suggest to always “link to last pasted node” (this works for simple Cut&Paste and would also work if the user for some reason does Cut&Paste&Paste&Paste…)
  • If there are links to “child” nodes, those should also not break

Thanks for the detailed feature request, and especially for going over your use case, that was super helpful!

The difficulty with your proposed solution is, as you can probably tell, how to make sure the id is unique. Otherwise, data inconsistency might even lead to sync problems.

I’ve renamed the feature request (I hope you don’t mind!) to state the benefit, and we’ll see if other users are interested in this as well! If so, that gives us more reason to go ahead with it.

Thanks again!