I'd like to mark the current isearch result so that it 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 result, then there would be no need for separate commands to do each job. Atom has one such package that can be used as a reference.