Subject: bug#73723: 31.0.50; Add copy/kill/mark commands to isearch

From: Phil Sainty <[email-masked]>
Date: Fri, 11 Oct 2024 01:10:28 +1300

On 2024-10-10 17:48, Eli Zaretskii wrote:
>> Date: Thu, 10 Oct 2024 09:33:41 +1300
>> From: Phil Sainty <[email-masked]>
>>   (define-key isearch-mode-map (kbd "M-s M-w") #'isearch-copy-match)
>>   (define-key isearch-mode-map (kbd "M-s C-w") #'isearch-kill-match)
>>   (define-key isearch-mode-map (kbd "M-s C-SPC") #'isearch-mark-match)
>>   (define-key isearch-mode-map (kbd "M-s C-@") #'isearch-mark-match)
> 
> Sounds useful, but "M-x M-w" is already taken, unfortunately.

"M-s M-w" does have a binding to `eww-search-words' in the global 
keymap,
but I'm not sure that needs to prevent us using it here?

Certainly `eww-search-words' doesn't react to the current isearch match,
so I think there's not currently a particular reason why one would 
invoke
the global binding whilst isearching.  (You *could* set the mark and 
then
search to extend the region before calling `eww-search-words' for that
region; but you could trivially still do that simply by exiting the
isearch explicitly.)

> For isearch-kill-match, should there also be a command to kill _all_
> the matches?

Potentially, although there's a library iedit.el which provides that
kind of functionality.  It has an `iedit-mode-from-isearch' command
to invoke iedit on the matched text.  (Although to specifically kill
all matches, it looks like you'd need to follow that command by
restarting the isearch and *then* call `isearch-kill-match'.

-Phil