I'd like to mark regex isearch results so that they can be copied or cut (killed) via
C-w. Is there a ready-made function for this?
The solution below provided by @danielpoe over here copies but does not cut. Changing
kill-region doesn't seem to work.
(defun hack-isearch-kill () "Push current matching string into kill ring." (interactive) (kill-new (buffer-substring (point) isearch-other-end)) (isearch-done)) (define-key isearch-mode-map (kbd "M-w") 'hack-isearch-kill)
If we can somehow mark the isearch results, then there would be no need for separate codes to do each job. Atom has one such package that can be used as a reference.