From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.bugs Subject: bug#73723: 31.0.50; Add copy/kill/mark commands to isearch Date: Thu, 10 Oct 2024 09:37:37 +0300 Organization: LINKOV.NET Message-ID: <86a5fc5uq6.fsf@mail.linkov.net> References: <194a0202fd0c9b752d2f6e4f3ff642d8@webmail.orcon.net.nz> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3250"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu) Cc: 73723@debbugs.gnu.org To: Phil Sainty Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Oct 10 08:40:17 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1symqN-0000e2-2R for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 10 Oct 2024 08:40:15 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1symq6-0006Z5-Pq; Thu, 10 Oct 2024 02:39:58 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1symq1-0006Yl-N8 for bug-gnu-emacs@gnu.org; Thu, 10 Oct 2024 02:39:56 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1symq0-0002eQ-1t for bug-gnu-emacs@gnu.org; Thu, 10 Oct 2024 02:39:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=gyv4QUqiOsFk50xEfsxIuRCGiMZhPyLn+4pjDLkf9x8=; b=qQTahpmQ5HlMPmPv46NSwK2nfB02flgzS0aVyPgIqeT5zTbcz9AxULKh+oMCct+ZDoZLwemHHWoibnPSJScSFpyj0RS340tcZUzO92Iqh3wy8Pl2KX+/1sG+J+pr2Rp/1PSskstatW7AXboUPevsjaODPloRUnzcQPMGoW/ZITAqZcjC9NZT4SsjVhEqY+dggxTAJqbQDYRecNeevcwhnmR9TwJHt6XsbuetTKJAJg5LS1Dxq0IWvfYvMzP2+IReW/1tLEEvxpbix9Uwu21GELNaVLGAhLSE0pajy0on3EGXl8zifFO5Y/hrlaNTfhKjMAucuTLYIfYoIUBHV3fyKw==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1symqA-0005aF-DL for bug-gnu-emacs@gnu.org; Thu, 10 Oct 2024 02:40:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juri Linkov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 10 Oct 2024 06:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73723 X-GNU-PR-Package: emacs Original-Received: via spool by 73723-submit@debbugs.gnu.org id=B73723.172854239521442 (code B ref 73723); Thu, 10 Oct 2024 06:40:02 +0000 Original-Received: (at 73723) by debbugs.gnu.org; 10 Oct 2024 06:39:55 +0000 Original-Received: from localhost ([127.0.0.1]:58459 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1symq3-0005Zm-9Y for submit@debbugs.gnu.org; Thu, 10 Oct 2024 02:39:55 -0400 Original-Received: from relay3-d.mail.gandi.net ([217.70.183.195]:60763) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1symq0-0005ZT-QU for 73723@debbugs.gnu.org; Thu, 10 Oct 2024 02:39:53 -0400 Original-Received: by mail.gandi.net (Postfix) with ESMTPSA id 6329D60002; Thu, 10 Oct 2024 06:39:12 +0000 (UTC) In-Reply-To: <194a0202fd0c9b752d2f6e4f3ff642d8@webmail.orcon.net.nz> (Phil Sainty's message of "Thu, 10 Oct 2024 09:33:41 +1300") X-GND-Sasl: juri@linkov.net X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:293250 Archived-At: > 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) 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. This allows using the standard keys afterwards: 'M-w' to copy the match, 'C-w' to kill the match, etc. Does this eliminate the need to add more Isearch commands?