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#69097: [PATCH] Add 'kill-region-or-word' command Date: Mon, 2 Sep 2024 11:30:14 -0700 Message-ID: References: <871q9g8z8k.fsf@posteo.net> <87wmob73ds.fsf@posteo.net> <861q6jji0i.fsf@gnu.org> <87o79n6uj6.fsf@posteo.net> <86v83vi2kr.fsf@gnu.org> <86seyzi2by.fsf@gnu.org> <87cyq26bt8.fsf@posteo.net> <864jbeixkt.fsf@gnu.org> <874jbe65u0.fsf@posteo.net> <8634qwkbtc.fsf@mail.linkov.net> <86h6fceij2.fsf@gnu.org> <87edaeevmr.fsf@zephyr.silentflame.com> <87a5l2evdn.fsf@zephyr.silentflame.com> <86ikzqbzac.fsf@gnu.org> <87seujf8bb.fsf@posteo.net> <867cbu9uce.fsf@gnu.org> 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="20614"; mail-complaints-to="usenet@ciao.gmane.io" Cc: juri@linkov.net, rms@gnu.org, 69097@debbugs.gnu.org, spwhitton@spwhitton.name To: Eli Zaretskii , Philip Kaludercic , Andrea Corallo Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Sep 02 20:32:20 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 1slBqc-0005F8-RT for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 02 Sep 2024 20:32:18 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1slBqM-0007ke-TX; Mon, 02 Sep 2024 14:32:03 -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 1slBqL-0007jM-5l for bug-gnu-emacs@gnu.org; Mon, 02 Sep 2024 14:32:01 -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 1slBqK-0005sR-T8 for bug-gnu-emacs@gnu.org; Mon, 02 Sep 2024 14:32:00 -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=W/WO1ZM57aDUJAmSRG0rVb+NQ70YT4ay5A/PBSlCyuM=; b=s3ktdv3fXeDAYY3ZYLave6SeBy86yWQ9WPR+0kQ2wsE/hKuvhdav2RwerOKykE9jnF9IsSdlr8kwWnOXs4lAQrRbd9tVFUvWL2eKATmDHqWCrWIqhRCx444juqFM8kGMRDpWpBa/N9mtySwlX842kHftkCmJWMGvcW96TM+Arazjf1VRpIKzJLl5LQInBcNTkaxwqt5mhcVv1QQqUhMqo5/Yh0qdmcqG+KBPsH7VrOeVcQiUSABmKXzpZB596hr1qDvYEuH7iAQ5kfUWaeM5aPITI3reCzAfr07uSpPvVV/2eXLAhk5R9n8bam9hC6vESRTg+AjYDieuq30ap67zNA==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1slBrJ-0000Y5-NG for bug-gnu-emacs@gnu.org; Mon, 02 Sep 2024 14:33:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 02 Sep 2024 18:33:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69097 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 69097-submit@debbugs.gnu.org id=B69097.17253019482008 (code B ref 69097); Mon, 02 Sep 2024 18:33:01 +0000 Original-Received: (at 69097) by debbugs.gnu.org; 2 Sep 2024 18:32:28 +0000 Original-Received: from localhost ([127.0.0.1]:51129 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1slBql-0000WJ-JW for submit@debbugs.gnu.org; Mon, 02 Sep 2024 14:32:27 -0400 Original-Received: from mail-lj1-f177.google.com ([209.85.208.177]:60482) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1slBqi-0000Vu-Fc for 69097@debbugs.gnu.org; Mon, 02 Sep 2024 14:32:25 -0400 Original-Received: by mail-lj1-f177.google.com with SMTP id 38308e7fff4ca-2f4f8742138so50596561fa.0 for <69097@debbugs.gnu.org>; Mon, 02 Sep 2024 11:31:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725301816; x=1725906616; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:mime-version:references:in-reply-to :from:from:to:cc:subject:date:message-id:reply-to; bh=W/WO1ZM57aDUJAmSRG0rVb+NQ70YT4ay5A/PBSlCyuM=; b=jo4FoppLH1qkV3ycJIms1CQcvHSRFSPPbiHOoAUvP2qU562CzXBVxbBY8fTreNcZqk e5cRAeyEv3fDP0fiYafJbl6Dc1BFs1SD/NAkksy1pQDGOmFB1VmUUCPMUJqL04IPeJEG uqWl/P1ZyEp5uYFfAPxhdrW7GSYWPpBKjjP7AAYGQFQMvZirrKxy0nZNqh8Hm5e+Dcbm C3P1T7ixWBgTmZekhqiGiE3vpmqxHtb4nNJBKrrEhksAwg1FL1Ik3ljqE7oDMmTyYS2U DbgexXS9AWN/4YkyatZQWLfrYR9gxcreCK/4HQ8nWiEjEMwB8VOTRe7BgPF+468uo3+H CJuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725301816; x=1725906616; h=cc: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=W/WO1ZM57aDUJAmSRG0rVb+NQ70YT4ay5A/PBSlCyuM=; b=qcK3zxiP8V3NwJDp7G8wj0LhMsX0bLraa5tB1VHKqoY+saY4YKgpBgfh1/IMQu1P6M DIJkNev9wyux4hjAuGoBZ3nAQ4sg2r0xjoiXQh2V2JyUmSBpbqwtpZmdLyNonl9flUn4 dLd/NhMI5xNikjnYQm45WzlaY/07OZuaZeWma88sLyahWar1Xbg3kT6fq0bnUnoSJ3Kh oInGjRW/8Mc+Z7IDhPnXcK8zoQhOyDKfKsdzh09TzUhv2CZTaXGSUQjgEFQTo+uEKIVB So5b9lZ2inzPEVm3qHU01TxIbKJ0gWc6RLT8P0KrId+dlIboZfkHUVZSPp2XA+6oPIno +vDw== X-Forwarded-Encrypted: i=1; AJvYcCWtx29ZKfArBKwO3gnM+4RNOvf7lgYlDsa/zNa6pEw14XPm6Gf8lcrKWQUwr1AvtzgGcHoZWA==@debbugs.gnu.org X-Gm-Message-State: AOJu0YxzJiWd8YhInvyZHKiNATNb37JQyP053MMQUlzb6QxblXH9zsCo VWORMXOWi7IlcenPhdiaIgRZo3V12a78nGRj1chTZYtNJcGJbcBeZgRF3N7BRK+Vbz2ftOPpuZ6 aabgulncZYEWMVXeJkY2EMgDL1Pc= X-Google-Smtp-Source: AGHT+IEA65lhSy3z5cYkPMjCt+FeTO5Aj4NzHF/3YJz9lsSdXVYX7Ec0QvbC/bM4DEP0BzaZib9daSpEdNhzlZbfGH4= X-Received: by 2002:a05:651c:2207:b0:2f0:1f06:2b43 with SMTP id 38308e7fff4ca-2f6108a7771mr110686501fa.41.1725301815296; Mon, 02 Sep 2024 11:30:15 -0700 (PDT) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Mon, 2 Sep 2024 11:30:14 -0700 In-Reply-To: <867cbu9uce.fsf@gnu.org> 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:291116 Archived-At: Eli Zaretskii writes: >> From: Philip Kaludercic >> Cc: Sean Whitton , juri@linkov.net, rms@gnu.org, >> 69097@debbugs.gnu.org >> Date: Sun, 01 Sep 2024 20:06:00 +0000 >> >> Ping. I am not sure how to proceed on this patch. IIRC the issue was >> that the notion of a word differs in Emacs and in Bash. I am still in >> favour of utilising Emacs's definition, as it remains more useful >> for some given major mode and the fact that it is easier to implement. > > Or you could make the defcustom a tristate, and implement both > behaviors... > > As for how to proceed: Stefan and Andrea, do you have an opinion on > this? Binding C-w to backward-kill-word, or some version thereof, is an old Emacs power user trick that has been recommended in many places over the years. See, for example: https://sites.google.com/site/steveyegge2/effective-emacs#h.p_ID_193 https://emacs-fu.blogspot.com/2009/11/copying-lines-without-selecting-them.html So I think this command would be a good addition. Making the word boundary behaviour into a tristate option sounds like a reasonable way forward, which should make everyone happy and let people experiment with what works best for them.