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

From: Juri Linkov <[email-masked]>
Date: Thu, 10 Oct 2024 20:32:41 +0300

>> >  (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)
>>
>> I have a patch that I'm using for a long time every day.
>> It allows exiting Isearch with 'S-RET' that activates
>> the region on the current match.
>
> S-RET will not work on text terminals.

I see that S-left and S-right arrows work on text terminals
via 'this-command-keys-shift-translated', but S-RET
doesn't set 'this-command-keys-shift-translated'.

Then isearch-exit could support a prefix argument to
activate the region on exit like Gregory proposed in
https://debbugs.gnu.org/47599#34
with three values of prefix arguments to isearch-exit:
C-u  RET moves point to the other end,
C-u C-u RET activates region around match,
C-u C-u C-u RET moves point to the other end
                and activate region around match.
But then Ergus proposed M-RET or M-s RET.