unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#73723: 31.0.50; Add copy/kill/mark commands to isearch
@ 2024-10-09 20:33 Phil Sainty
  2024-10-09 23:47 ` Stefan Kangas
                   ` (3 more replies)
  0 siblings, 4 replies; 15+ messages in thread
From: Phil Sainty @ 2024-10-09 20:33 UTC (permalink / raw)
  To: 73723

I find the following useful, and sometimes see others asking for
the same thing.  Shall we add these to Emacs?

  (defun isearch-copy-match ()
    "Copy the currently-matched text to the kill ring."
    (interactive)
    (kill-new (buffer-substring (min (point) isearch-other-end)
                                (max (point) isearch-other-end))))

  (defun isearch-kill-match ()
    "Kill the currently-matched text."
    (interactive)
    (kill-region (min (point) isearch-other-end)
                 (max (point) isearch-other-end)))

  (defun isearch-mark-match ()
    "Exit isearch, marking the last match."
    (interactive)
    (set-mark isearch-other-end)
    (isearch-exit)
    (activate-mark))

  (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)






^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2024-10-10 22:04 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-09 20:33 bug#73723: 31.0.50; Add copy/kill/mark commands to isearch Phil Sainty
2024-10-09 23:47 ` Stefan Kangas
2024-10-10  4:48 ` Eli Zaretskii
2024-10-10 12:10   ` Phil Sainty
2024-10-10  6:37 ` Juri Linkov
2024-10-10  7:38   ` Eli Zaretskii
2024-10-10 17:32     ` Juri Linkov
2024-10-10 16:58   ` Drew Adams via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-10-10 17:35     ` Juri Linkov
2024-10-10 18:20       ` Drew Adams via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-10-10 18:31         ` Drew Adams via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-10-10 18:41           ` Juri Linkov
2024-10-10 18:54             ` Drew Adams via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-10-10 18:40         ` Juri Linkov
2024-10-10 22:04 ` Drew Adams via Bug reports for GNU Emacs, the Swiss army knife of text editors

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).