From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Sean Whitton via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#69097: [PATCH] Add 'kill-region-or-word' command Date: Mon, 6 May 2024 01:21:59 +0100 Message-ID: <1A1EDC83-2E69-4570-A7E4-2DAA64B9C6DB@spwhitton.name> References: <86zft4jl5d.fsf@mail.linkov.net> Reply-To: Sean Whitton Mime-Version: 1.0 (1.0) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25658"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 69097@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon May 06 02:23:02 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 1s3m8D-0006Rp-QU for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 06 May 2024 02:23:02 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s3m7u-0001JR-Ce; Sun, 05 May 2024 20:22:42 -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 1s3m7s-0001JD-Hg for bug-gnu-emacs@gnu.org; Sun, 05 May 2024 20:22:40 -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 1s3m7q-0004R8-Mu for bug-gnu-emacs@gnu.org; Sun, 05 May 2024 20:22:40 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s3m8E-00016d-5x for bug-gnu-emacs@gnu.org; Sun, 05 May 2024 20:23:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Sean Whitton Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 06 May 2024 00:23:02 +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.17149549734245 (code B ref 69097); Mon, 06 May 2024 00:23:02 +0000 Original-Received: (at 69097) by debbugs.gnu.org; 6 May 2024 00:22:53 +0000 Original-Received: from localhost ([127.0.0.1]:34354 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s3m81-00016P-L2 for submit@debbugs.gnu.org; Sun, 05 May 2024 20:22:52 -0400 Original-Received: from sendmail.purelymail.com ([34.202.193.197]:56076) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s3m7w-00016H-Qk for 69097@debbugs.gnu.org; Sun, 05 May 2024 20:22:48 -0400 DKIM-Signature: a=rsa-sha256; b=et2p9G5JuslMysHWtoLqH6MuQsfCNnphC9jkF/dl+y/WSwiQcAx3lMIhjwsZy2sRiBowqgrT6dRlGgMfsoTY+VEQW1mlyjztafqeh8cNMGofitt4ePi/QQ6Q8CITSukXQcolnF39aQIVgtYBuKJqED0hgPss2ylY0VfFCQrV4KSPLBHj6afZ8pLmhwN6e4wIUFvq2nB/LKFd3jYTtgOXAmx72wDGb2rtSeWOsMN0TKoP/W7H5tOs+zYdb242W0OlQxlggPdi7ZhXIDnnnsyINp9RcPblZSrO09DGjk03UVdUd1Bn/0ZSNsgvqkswIf5c/BBH75GXUmNDIfDDetPohA==; s=purelymail1; d=spwhitton.name; v=1; bh=mmIi1wCj25mmpWDADdHZqDZbI3PuwmSWrkGO4FUJy6g=; h=Received:From:Subject:To; DKIM-Signature: a=rsa-sha256; b=IXveq1KYovuPrpdHaZrC/6V9aICVQ6bng5qTDYRZcdTBNgMW3lFFwBHZuaPrgSMXAnLMABSidfP+Tk/d3UT1a4MFxU+QuPsFobuNdDK8hYVW6ujkZLqMU2Kpzmo/fHGyLDeX8oAJIYfVPxV0fE7yMI17MhBSkmsq+FQGZ8eB5kKojXioTRoL+KXQLJFBTeHVRcjDjvkrEJdJQt7XAejBDaUD4/hO1xFPM/E2Y5vtWKEbwW8lffwee858djQBwAzQwR6gnk9CJPukxRPuM5EMRvgJYGxAK0+AYioNKnvofCEGmzrwkmdfk1siON30m2sZjbBAVS+33I1Wd9sAj9r1ug==; s=purelymail1; d=purelymail.com; v=1; bh=mmIi1wCj25mmpWDADdHZqDZbI3PuwmSWrkGO4FUJy6g=; h=Feedback-ID:Received:From:Subject:To; Feedback-ID: 20115:3760:null:purelymail X-Pm-Original-To: 69097@debbugs.gnu.org Original-Received: by smtp.purelymail.com (Purelymail SMTP) with ESMTPSA id -183066484; (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Mon, 06 May 2024 00:22:11 +0000 (UTC) In-Reply-To: <86zft4jl5d.fsf@mail.linkov.net> X-Mailer: iPhone Mail (21E236) 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:284545 Archived-At: M-DEL and unix-word-rubout have different word boundaries though. I have bin= dings for both. --=20 Sean Whitton Please excuse top-posting and brevity. I am writing to you from a mobile pho= ne. > On 5 May 2024, at 17:45, Juri Linkov wrote: >=20 > =EF=BB=BF >>=20 >>>> +(defcustom kill-word-if-no-region nil >>>> + "Non-nil means that `kill-region' without a region will kill the las= t word." >>>> + :type 'boolean >>>> + :group 'killing) >>>=20 >>> What a strange thing. `kill-region' is not related to word commands >>> in no way. Why not kill a sentence? Why not kill a line? Why just wor= d? >>> All existing commands handle an active region. But there is no commands= >>> that do in the opposite direction where a general command handles >>> one random specific case. This is because the region is a more >>> general concept. >>=20 >> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D69097#14 is supposed to >> provide the rationale (consistency with what C-w does in a terminal, >> which I presume means in Bash or similar programs which use >> Readline?). >=20 > So this is for Readline compatibility: >=20 > unix-word-rubout (C-w) > Kill the word behind point, using white space as a word boundary. > The killed text is saved on the kill-ring. >=20 > Then I have no opinion, since 'backward-kill-word' (C-, M-DEL).= > already does this just fine. >=20 >=20 >=20