From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Drew Adams via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#73723: 31.0.50; Add copy/kill/mark commands to isearch Date: Thu, 10 Oct 2024 18:20:15 +0000 Message-ID: References: <194a0202fd0c9b752d2f6e4f3ff642d8@webmail.orcon.net.nz> <86a5fc5uq6.fsf@mail.linkov.net> <86cyk7zx7w.fsf@mail.linkov.net> Reply-To: Drew Adams Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30621"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Phil Sainty , "73723@debbugs.gnu.org" <73723@debbugs.gnu.org> To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Oct 10 20:21:14 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 1syxmi-0007nJ-FY for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 10 Oct 2024 20:21:12 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1syxmP-0006dI-HH; Thu, 10 Oct 2024 14:20:53 -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 1syxmN-0006ct-Bw for bug-gnu-emacs@gnu.org; Thu, 10 Oct 2024 14:20:51 -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 1syxmN-0000UG-3m for bug-gnu-emacs@gnu.org; Thu, 10 Oct 2024 14:20:51 -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:In-Reply-To:References:Date:From:To:Subject; bh=OstdvxyIvJDwbcXi/FDPgK8AIKCT0hE+KiSQRI61JEE=; b=UwMKdKIbdo943fh80CiF9epKW3e8cyvVwxF4R0Z4hgDQIHOPXNoTjOPuEnn9UWY6DYitbU0boahawzagm37fpGFSjHJ9ZDXrcQqqngvx8KcAumyqEsF4IebepLpy3CGBl3MuCsI7LUmq2hJ/e4KMj7YcdyzEkNISJL2jdSsZt7fnog18lwyElcgkNXK3fCSvsCr23o9ncwr/EMQJWefW79TOywEHfFyi2sJ8T5OrrsAaSA/vm7BaaIun71L8YS8nUvIcfiXw8vmdA9Dv0Uz6dm0FeQuUy+Xz0tym2pKwb0/0SXyUdt4FSlSFvNYzit7sYwBmNvIwNborrpUsQ7dK4w==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1syxmY-0000iw-HS for bug-gnu-emacs@gnu.org; Thu, 10 Oct 2024 14:21:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 10 Oct 2024 18:21: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.17285844352716 (code B ref 73723); Thu, 10 Oct 2024 18:21:02 +0000 Original-Received: (at 73723) by debbugs.gnu.org; 10 Oct 2024 18:20:35 +0000 Original-Received: from localhost ([127.0.0.1]:60506 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1syxm6-0000hi-QH for submit@debbugs.gnu.org; Thu, 10 Oct 2024 14:20:35 -0400 Original-Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]:33346) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1syxm4-0000hW-CT for 73723@debbugs.gnu.org; Thu, 10 Oct 2024 14:20:33 -0400 Original-Received: from pps.filterd (m0333520.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 49AHtaI9029321; Thu, 10 Oct 2024 18:20:19 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=cc :content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s= corp-2023-11-20; bh=OstdvxyIvJDwbcXi/FDPgK8AIKCT0hE+KiSQRI61JEE=; b= fiDTkpuZ8ZdrIUOELUHPcpmQWg7plhy2JzlJEvPpqgiEwkIuEx3TXmk72O4wMBZW S/zTR4xgh9cTm0ScICCw5EW+RPF0tkK1rJmp4byce83gdpbGYVu0CijJgK+JSWM5 1JxeELb6rO8rWwGKZoLYRP66vNpSIsni/yCXLtrInqbCwgeKO6uisck59tJfegV1 CaCam5/KwL0I4HtMtPIBNhPqsNWftzhzRc69dsxsTyUjlUrehLDFbn+ZHHjimAj3 Lo++Gdnru6O0L6gZ6IOuHRmkOMbJvskT9ntgxytbqw5oKC50QXvdhIJBB7Pl7onE bG5ym5iZDn527newfmFqyQ== Original-Received: from phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta03.appoci.oracle.com [138.1.37.129]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 423034ut6r-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 10 Oct 2024 18:20:19 +0000 (GMT) Original-Received: from pps.filterd (phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (8.18.1.2/8.18.1.2) with ESMTP id 49AHGXvp009072; Thu, 10 Oct 2024 18:20:18 GMT Original-Received: from nam04-bn8-obe.outbound.protection.outlook.com (mail-bn8nam04lp2043.outbound.protection.outlook.com [104.47.74.43]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 422uwadawk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 10 Oct 2024 18:20:18 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=KwoW8sHtiYbMqtrkhEBjlTXupkI+PcK9lu86or8CPlac67SrRca/rAbEC7t4IfH0u8GY1rBcx+bjH16BSi7afDLWBFWfONiw/Qr/HUbf7Q3c3/3YpJ+fH5i+OVFYK0VaO4dDyvKCGjrNzyB/MgggQvq2ImY6c0eLsMIcKiiaxjx8HOxxYs0WRmLoOTMbaLWiNelUSUIyGjL9b80GJv7kjpdXfWvWG2KyUIz0/M7nOyxNJ4d6EGQjdZQiM5g2S561l3zzGdzkk9UiKgQJ4n6sPx1aRJyUdIxhMVvCOHtYNUQj9PQW95Vt4kTCRJXvRM/8OxE83jHii3Bm0AEC9AEwPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=OstdvxyIvJDwbcXi/FDPgK8AIKCT0hE+KiSQRI61JEE=; b=RLupU8/LehJSdyTK9wjgNomKQUw0p+pj9dXMr5kS6EgJlU9bOIdGiNlPZerg341OnRtFvdsOC1jl5Zqwcw2BaqA5/k0x2y7NutJS/HZOUiITCbMZmxpNfM7NCAt/JBlfkZMgbxD5gVU9hf/a9ye+6lK4Nj6nLtHg8lfMkDdijfzBBMQOTQ/Y9zfNx6+8wxrdf0pZ/xadImNZxfmiW3MwoeeGrevIIhmeb7elbLA9n0ZommkSRZ4BNqLYkley3vQPWInIVI7Ts5BVNghJ+Z6D6X3yJvZrh1z+2zu0DndRPWj9M1pB+UugHKNLu9FN3PrYVmvIWtwgr6qgl6iP5XUkzw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=OstdvxyIvJDwbcXi/FDPgK8AIKCT0hE+KiSQRI61JEE=; b=dYw/ageSzVquNXGHRvdF8wirbFm5QNysCty/YI35mFvxpwBQLAdDZ95dDX0aB0QC6SXAeJMeHfwY9SiHaXe4kq1Mr6zdzyg4E33NnTaW88Tja/MvsFWSsM1fAQThK1GGIZRDYYNkwrAYkbxCkFy5ixLHdY9ONzb1WCHCDGreDW4= Original-Received: from DS7PR10MB5232.namprd10.prod.outlook.com (2603:10b6:5:3aa::24) by PH0PR10MB5871.namprd10.prod.outlook.com (2603:10b6:510:149::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8026.23; Thu, 10 Oct 2024 18:20:15 +0000 Original-Received: from DS7PR10MB5232.namprd10.prod.outlook.com ([fe80::8303:658f:14f8:2324]) by DS7PR10MB5232.namprd10.prod.outlook.com ([fe80::8303:658f:14f8:2324%4]) with mapi id 15.20.8048.017; Thu, 10 Oct 2024 18:20:15 +0000 Thread-Topic: [External] : bug#73723: 31.0.50; Add copy/kill/mark commands to isearch Thread-Index: AQHbGzsdtrMtgjzYEUqCFQS7AUI4FLKAQJSQ In-Reply-To: <86cyk7zx7w.fsf@mail.linkov.net> Accept-Language: en-US Content-Language: en-US x-ms-publictraffictype: Email x-ms-traffictypediagnostic: DS7PR10MB5232:EE_|PH0PR10MB5871:EE_ x-ms-office365-filtering-correlation-id: ae008c9a-f255-4b6a-cd57-08dce9583021 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; ARA:13230040|376014|1800799024|366016|38070700018; x-microsoft-antispam-message-info: jJeoOo1qsRoNSwNUY90iAtCxp1+qW+Wwxn/nIXEAA7N3DyLby1H4e3DqQeow+via2bpnkjkbgRUfX+SHb0xUjLn6s3/xkKB9SRZ2qV3EN3BWkULINJ5ZUe+gkm9IPz7VDCTPw8y5ZmP4KqTdbyHIY5wrV4OlegAWllNiOfQQdHmiEcHmtJo3VYxOofRAzUtf7ABM1y6HkuAlZrJXgdwKIsDAlYx80Q3QJbVuSktlUWY6CLoKf6A7XX1OGzGIF9yOO0KT6xYFLZDxQDH817oy3/Kx2/B5jyxNSoeHwF09oZWgMJ1ivkeFJToPilx2TfdqHAm0kjPfOSKeKyW4itLSvzMtWsGlFLeOw4pRaQkvcyKSeDxWscI2rVykjpCFWp/JfBISeYPB9wMAXl1z+wErUUBSCs/jvPmvlrqm5+35Jyn1JAelHxe9Tj3WakAhfO3Q7lJHVe49ZSqJVnAtd/AdVgfbjgYI/g0BCMPIfaZ2oqouwbiWOX0ovpsrbV0A1TrYJEDJD7CxCfz9bkIYFiFXOnOrJX4vIpl6ElFY6/+aIGW9Ix0IigOAnoYl4vP8e9rOz0KgjlvqQeNhgYeNLXrV/z9rhW9wTDM0rR2TJb9zBxlCq4kFgx0lSVRmeFPXexrXobFN9wRdnHdZX1y8PVsJZpORKXXV1rEWUtYFaEtMqA03NxPTB90OFmiKmRepC5vJwjkNnhCQJfT9cK/lrXle6y0PEiEdXs4DBb/sFLVsyyfHS7gkY/fdFYD3YRCHw aee92Wy7IjaRWw1rdAL9DWKl1vkXP0f73+1T6qTd5U8zHSxZ0GdFlwsmXp/vHvSQVF2YqYGjHLa1JjdT/VoEKJGjeyp7QL78YS x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DS7PR10MB5232.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(376014)(1800799024)(366016)(38070700018); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: dS86/EH4gHeSgSm/veipE4PIZw5Rw5Gcw+UDAaT5U8pyFnoHVMnxysqMko6KLLCwrIAXB6bQTK5pJXszbVww8uTJeJpJhpyr8AcZazYZm/OGCUR8YprBRVfvBBf+vztIzc7aZt55tB5Cxm7eGBeTUodINWzqsyNJTlN3F3DHfbzmT2+g7aGDJt4wKZP5mQQG9vCGsrOdaHnT+k02mfbnwPBOEQ2xZfCbuhW8BMx7UNAOi80kUP+KuLvl0UnqowJi9zAh6Gk/sWbWhy5GPSIzNe0nOmTQeGpEb9jFFdyXCSjPPtna8Sj0Ol5bPqrE2OquXmF0IS1+dUFfG9p+Ar4ShKV/11yoRx6M7uQTOYdXjQ0yzLH4S5q0TLmYEW3nZct7tD8aTf/2kEiy1qwt75OsCohTfuuvPd1FnI4ejWIPg+uIgYWRJqJQEIovGoneg5rpg8VIUB4m7t6CtdCTpXAGrILvqi+1c8o+wkw5/yO6LFrWBKEIOy6R8ZXbFXXi1MzuSgOkNS/3I0wJDJNlnh9twaNimkzehDulihtpvf+/P0DOz4OKoBD19YOeymnJetAxDEEeL2ELsY9I8GU6TSkeYR7m4JywNwOvVs/2hjRfdx26W4lRMVuizMKR2AwOA73kfy1ukmlXe9sw2I0lplX0Sp44eoHUK1YidF08sCnwE/EaPzG1intAkXYfwjIEy7240Hudo3C6eCxRl7KTu6K074B2nx+xo/NfyjdV3h1vNHTYlaOWUApdJUUwtm 7Axdh7jB3gR3hkQBvDjOF4Px5EyQBAy19mtyyAyGS2H8Q3stbVYmcagOGuqVNEDAGCTRCi+xtFMzjq48QZAS+ZpwGb1aGvnVs/ X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: GBCxswdbosvCXfdVMz3GO2dpbbDrtJZjpIOWGWydu6OWssMpjYsPbI2cPqQYfL9xagwQ9xY4GzJfI9gxYR4c2GKtWc2VRZcJepCoFtK4D4Xmdh9PbG1peM8ksZVnMeYJ3m+LIRunhlMN0Y0iWg13Cibzfu/oIjDGBIuSc24KzixSQS3S/7HD8irhRk4RP+1sTOvkAsi8nftzI8Dh9pRUt+k01Ql9Mjc7BjWN9e2g1uH+TUOgLxQPRfyvETxUcOMi56WKGb20uFTNgGxa6kR3VXEdmgsv69QYGu7v1qciErZXfs+5WZRU81HQoniaev+obapW4n9q1k1tnK287JihtR9bsdDiNPAp0Lf0mkRoowGvID95sXoIfHKVEMDKdHRkptxjXe13wY891/so+Q2g3jl+TZOU3i9x4cIoWTFVe4ziUjy6ItDbMGQF+6jXGtkOmSxCd+sXhsBuvPVncrU/111nOXbUsUY4J13QUP5z+wKtwKlJ7R7AW4XN49T1dnVbvojOjW7ShcEoELdcLFy9DpeGFB+LhKJ9/8zIKM8XGAMeb6CQ/mpRPMC1cO5Md+v/xSWUGb1KYp81EjHTEDwkwMH2Iwiw51+WAp4/Yy/D7e0= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DS7PR10MB5232.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: ae008c9a-f255-4b6a-cd57-08dce9583021 X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Oct 2024 18:20:15.3063 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 3Ckf/Eg+dh5zgjt24K0YibZqtYpk8jNlZv1C+Ks6mDzMO7+PKYjIosEnVtpuq2RrJtIuEzxNCjc1/HVWfloSeA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR10MB5871 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1051,Hydra:6.0.680,FMLib:17.12.62.30 definitions=2024-10-10_13,2024-10-10_01,2024-09-30_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 adultscore=0 mlxscore=0 spamscore=0 phishscore=0 bulkscore=0 suspectscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2409260000 definitions=main-2410100121 X-Proofpoint-GUID: YQjCp6PXWfZE5eInHippW37L2XIpDJrp X-Proofpoint-ORIG-GUID: YQjCp6PXWfZE5eInHippW37L2XIpDJrp 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:293302 Archived-At: > >> 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. > > > > FWIW, in isearch+.el I define `isearchp-kill-ring-save' > > and bind it to `M-w'. > > This has been the case since 2013. >=20 > Since `M-w' can't be used according to the comments in > https://urldefense.com/v3/__https://old.reddit.com/r/emacs/comments/1fzv > wig/copy_search_string_to_killring/__;!!ACWV5N9M2RV99hQ!L5HGxhm07QP4heBq > z0oZG6Hs1DF2e5hty8aAHJG_sxr39y7pRCFJPoP2E_m9P8iyv-lGni4NgqrGZg$ I don't see anything there that says why `M-w' can't be used. What's the reason you think is given there? Is it this? "I have muscle memory for pressing M-w to end the search and save the region from where point was before starting isearch to the location where the search string was found." ? There are other ways to get the region to be from the initial position to the end (if forward) or the start (if backward) of the search match. In any case, we are (should be) talking about default key bindings (in `isearch-mode-map'). Both copying the search match as a kill and setting the region to origin-to-search-end are useful, and they can both have default key bindings. Which should be `M-w' by default is something to decide. You know what my recommendation is: copy the match. IME, if someone wants to set the region from the initial position they usually know that _before_ searching - in which case it's enough to do `C-SPC' before searching. * `M-w' _during_ search should copy the search match because it can be done anytime _during_ a search. It can even be done multiple times _during_ a search, and for the _same or different search patterns_. It's a very useful, versatile operation. * `M-w' _after_ a search is something else, whether or not you want to extend the region to initial position. It makes no sense to use a key to set the region from the initial position more than once during a search. At most once per search is all you need, for that. The question is whether to have a `isearch-mode-map' key to _set the mark_ at the initial position (instead of someone setting mark there before searching). If we have such a key, then `M-w' _after_ the search is just the _normal_ `M-w': `kill-ring-save'. IOW, we need not have a search-map key to set that region, since that's done after searching (and once only). To implement a command to _set mark_ at init position during search we can always let-bind that position at the outset, and then use it only when a user hits the key to set the mark there (and that key shouldn't be `M-w'.) > what remains is `M-s M-w'. Lots of possibilities remain. But you might want to use `M-s M-w' not for copying search matches but for setting mark at the initial position. Why? See above: You only do that once, and you might want to copy multiple (different) search matches to the kill ring during the same search. The key for copying search matches should be `M-w' (IMO).