I am looking for an easy way to gather blocks of text that are scattered throughout an emacs or org-mode document and move (or copy, but move would be preferred) them to a single location.
(For example, reorganizing thoughts in an org-mode outline, where items that had been sub-entries of various different sub-outlines are to be gathered under a new heading as a new point.)
I had thought I could use the kill ring to cut the kill the various items, knowing they would be stored successively in the kill ring, move point to the new location and then yank them back. That would copy, rather than move, but I thought I could start with that.
I don't see, however, how to get yank to continue appending entries from the kill ring at point. (I see I could accumulate in another buffer, but isn't there a default key binding just to yank successively at point?)
Any thoughts either on accomplishing the specific kill ring objective, or my ultimate goal of moving scattered text will be appreciated.
C-y
followed by repeatedM-y
yanks previous kill-ring entries.M-y
replaces each yank with the previous one. In order to accumulate the yanks, you would need the growing sequence:C-y
,C-y M-y
,C-y M-y M-y
,C-y M-y M-y M-y
, etc. Alternatively, just repeatC-2 C-y
, as per my answer.C-y
. Or usebrowse-kill-ring
. Or use any number of other approaches.