I'm not sure whether anyone has ever implemented what I'm looking for, but maybe I'm just using the wrong terms to search for it.
What I want to achieve is essentially a reverse copy and paste:
- I'm in Buffer A, Position X
- Hit "paste" (to mark where I want to paste stuff without actually pasting stuff)
- Go to Buffer B, Position Y
- Hit "copy"
- Emacs jumps back to Buffer A, Position X and pastes whatever I copied before
I feel like this would a much quicker workflow than traditional copy-and-paste (where I have to manually jump back to where I was, especially if I have to look through a hand full of files before finding what I want to paste).
Is there a package for that? If not, whats a good starting point for my own macro?
Bonus points if it integrates nicely with the system clipboard or if there's a generic solution for Linux.
prepend-to-buffer
andappend-to-buffer
suit your needs? See(emacs) Accumulating Text
.