From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.bugs Subject: bug#73723: 31.0.50; Add copy/kill/mark commands to isearch Date: Wed, 9 Oct 2024 23:47:58 +0000 Message-ID: References: <194a0202fd0c9b752d2f6e4f3ff642d8@webmail.orcon.net.nz> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37297"; mail-complaints-to="usenet@ciao.gmane.io" To: Phil Sainty , 73723@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Oct 10 01:51:07 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 1sygSQ-0009XJ-NP for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 10 Oct 2024 01:51:06 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sygRN-0005Ye-JJ; Wed, 09 Oct 2024 19:50:02 -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 1sygRE-00056s-TT for bug-gnu-emacs@gnu.org; Wed, 09 Oct 2024 19:49:54 -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 1sygRE-0006qd-7D for bug-gnu-emacs@gnu.org; Wed, 09 Oct 2024 19:49:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=Date:MIME-Version:References:In-Reply-To:From:To:Subject; bh=4gA7wkXoCWYj0LIMs4ASY5v9Hkva6tIcmeIniwDWznw=; b=vhcmhSfN9qqbiod6Ayl9pEcXlpAJc73k6uNAuchrdvBJtMwKVo25BGHSRR4hxbiwUM8CaXG2zjIaVqQbyjxv8AXdzxEy4NcLqNX1YPFkIoUmkT8bwzkp0tiiLHIhK9dKeJThQqSa80I2DeXkfp83iXzp4tvURoDvyxYwmCGwHAHhevT54zhyyRdOqFQWWRorRrZTbtCo0ndK+pieJKLDUJ8Cwn6v2vH8Dtaezvj3z196L8Qk4H6wmnwkes7H2m7CS4qbrzySo52OdH2N5MGWlpeIeYOsGh45rCRoXPOZOQ+crczYi6IE9lVEexGx0EsdjqfSZJ5prGY1TCOu4sYoRA==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sygRO-0000Hx-Ei for bug-gnu-emacs@gnu.org; Wed, 09 Oct 2024 19:50:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 09 Oct 2024 23:50: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.1728517755965 (code B ref 73723); Wed, 09 Oct 2024 23:50:02 +0000 Original-Received: (at 73723) by debbugs.gnu.org; 9 Oct 2024 23:49:15 +0000 Original-Received: from localhost ([127.0.0.1]:57974 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sygQc-0000FV-RM for submit@debbugs.gnu.org; Wed, 09 Oct 2024 19:49:15 -0400 Original-Received: from mail-ed1-f48.google.com ([209.85.208.48]:45058) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sygQZ-0000FE-SQ for 73723@debbugs.gnu.org; Wed, 09 Oct 2024 19:49:13 -0400 Original-Received: by mail-ed1-f48.google.com with SMTP id 4fb4d7f45d1cf-5c42f406e29so288967a12.2 for <73723@debbugs.gnu.org>; Wed, 09 Oct 2024 16:49:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1728517680; x=1729122480; darn=debbugs.gnu.org; h=to:subject:message-id:date:mime-version:references:in-reply-to:from :from:to:cc:subject:date:message-id:reply-to; bh=4gA7wkXoCWYj0LIMs4ASY5v9Hkva6tIcmeIniwDWznw=; b=ecPDHRIcAHofTvDrM+8YdVWbEuQk3rEnN1ydhdLf9AmShuCiZleSTKilibnUuK6gbJ XOLs0g4EaQU4f2LpW6vlgy53Fp5HxD54Syrcnw2SmAGl9sqWQPlGbGsiLIYxFB9PQKnm wHEDUhiTh0v8nnZcxjYiedwc7qb0hTXlZHckYStP9ufWpdJYLFk6gAZE5p6p/l0dq71G zsTMRUCcRPHZFn9YsMIDehCYbnyxO8/Bla9ch5BifwC2J8/Q/sWAXVR2j64kvhIf6WL+ h74cGrjKUv622EX4XxGlhamUVBwG2nq/QzA2dJltUbybGRLik2qoABMd7JGW3iyIkK3+ aOyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728517680; x=1729122480; h=to:subject:message-id:date:mime-version:references:in-reply-to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=4gA7wkXoCWYj0LIMs4ASY5v9Hkva6tIcmeIniwDWznw=; b=vVKA+4sgbaR9cu/mi/8KzMeGGmmt3vlZFBBX/XjM32zCLWNBy2xq0kUzfbjqj8jxrr 1+Is7mvIOvsnzOf8RzbLPZG9x+22mHbcBJkGsyZmfIM7thfr/RSa85ZzDpLT5JKwuAJi 8H2i+2pq5TYcHm+DSomn+EmAf9cAHpaWT1MKsSnQF5e7WbHunvnxWpE11o5XGey6Gz4z V3YeQkBjWjW5mvYef3XWekXaequhd/vtlDqDrLLi5eCnhwEC2+uatuQ4pR6HETX7+4ks +jK4kMalzTQk2LCx2k2csRn6y0KRnPPJAYPM0uNMKwE0Kokf31SIyvgXGxNS6pKCnp2N PwNQ== X-Forwarded-Encrypted: i=1; AJvYcCUz19Ldu6dhDlYhC2aPT/FJy+PZUMkZ69QAGeIA6UvV5XlymNjFFd39CX6jWjoeyHVy6GG0BA==@debbugs.gnu.org X-Gm-Message-State: AOJu0Yy4OCRsSoB0Nu3m5651rB9WV9zvXBi9iHuMhaPH6R2YYTau0CKF 5/NW84wX624ILiQaMz0HKkiJexaSbsZ44z02XkNoFh/kxICWC/k3rB4INImcFHrnvYW9/RXzNsT akcINJYvH+v9G9NdhVL7t0z8ijGI= X-Google-Smtp-Source: AGHT+IGwWn1pTZkFBi6a9KJQiakLgYD9noCHH/6CF02QkE0baXSYUmEhtx8QQ05q4/kppX7hZKU6qErk1gA9pxeuVKk= X-Received: by 2002:a05:6402:4301:b0:5c8:8bde:a1d3 with SMTP id 4fb4d7f45d1cf-5c932553ec7mr1044194a12.22.1728517679173; Wed, 09 Oct 2024 16:47:59 -0700 (PDT) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Wed, 9 Oct 2024 23:47:58 +0000 In-Reply-To: <194a0202fd0c9b752d2f6e4f3ff642d8@webmail.orcon.net.nz> 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:293232 Archived-At: Phil Sainty writes: > 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) It looks like a fine addition to me. We'd need the usual documentation, NEWS entry, etc., though.