From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Philip Kaludercic Newsgroups: gmane.emacs.bugs Subject: bug#69097: [PATCH] Add 'kill-region-or-word' command Date: Sun, 05 May 2024 16:54:57 +0000 Message-ID: <87plu05hcu.fsf@posteo.net> 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> <86zft4jl5d.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27074"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , rms@gnu.org, 69097@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun May 05 18:56: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 1s3f9e-0006na-Cw for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 05 May 2024 18:56:02 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s3f9P-0004eR-Et; Sun, 05 May 2024 12:55:48 -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 1s3f9K-0004dC-N7 for bug-gnu-emacs@gnu.org; Sun, 05 May 2024 12:55:44 -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 1s3f9G-0003Xq-PB for bug-gnu-emacs@gnu.org; Sun, 05 May 2024 12:55:42 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1s3f9e-0001hh-35 for bug-gnu-emacs@gnu.org; Sun, 05 May 2024 12:56:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 05 May 2024 16:56: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.17149281326531 (code B ref 69097); Sun, 05 May 2024 16:56:02 +0000 Original-Received: (at 69097) by debbugs.gnu.org; 5 May 2024 16:55:32 +0000 Original-Received: from localhost ([127.0.0.1]:60675 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s3f9A-0001hH-CG for submit@debbugs.gnu.org; Sun, 05 May 2024 12:55:32 -0400 Original-Received: from mout01.posteo.de ([185.67.36.65]:36343) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1s3f97-0001h6-G9 for 69097@debbugs.gnu.org; Sun, 05 May 2024 12:55:31 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id ED665240028 for <69097@debbugs.gnu.org>; Sun, 5 May 2024 18:54:59 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1714928100; bh=WHERTphYjlEArYeneMguS/un908hl6HYC+UfVuUwDtg=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=cMPVTv5GJwQJpQLg+Y7+dGKttr24jtIFczyrk+lCTmVI/gxz05BXWE5nxhmbvXVnV F55QEnX1GWsUm8BPrUfPJP/7iGzML/vi9YuT8YadGnRFT+drXTDiiEw9zIIA/binkn 3xLOkZKb8R9+qgHMXNWYAqIouDuz6DvYs5gMjCEZFwGlh3DYO197e35KH01yYLW5mk uFkBMst+6HByQkZJt0rAiFQwt3cDeNNxnO3jLaFhcv6egWBMxjQGH0h4NmemDarkVD zQv4z/BUru4+Bwm5rcK39R43qEoRnSwh7hJYNXkwokrN3DwYlncqQBs/N/CSvOH5cg jWw5DNe3Pygpg== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4VXVyW2JK1z6tn4; Sun, 5 May 2024 18:54:59 +0200 (CEST) In-Reply-To: <86zft4jl5d.fsf@mail.linkov.net> (Juri Linkov's message of "Sun, 05 May 2024 19:29:18 +0300") X-Hashcash: 1:20:240505:69097@debbugs.gnu.org::cp/dl8RTMrzWDzIV:Dlg X-Hashcash: 1:20:240505:rms@gnu.org::Ie0KNhuPCvJVJl5R:02W1 X-Hashcash: 1:20:240505:eliz@gnu.org::FEj13/wZLuBAa9zn:16iS X-Hashcash: 1:20:240505:juri@linkov.net::eD7SjZYdakOxloWc:2acw 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:284518 Archived-At: Juri Linkov writes: >>> > +(defcustom kill-word-if-no-region nil >>> > + "Non-nil means that `kill-region' without a region will kill the last word." >>> > + :type 'boolean >>> > + :group 'killing) >>> >>> 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 word? >>> 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. >> >> https://debbugs.gnu.org/cgi/bugreport.cgi?bug=69097#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?). > > So this is for Readline compatibility: > > 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. > > Then I have no opinion, since 'backward-kill-word' (C-, M-DEL). > already does this just fine. Right, the initial command just merges `backward-kill-word' and `kill-region' into one. -- Philip Kaludercic on icterid