From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#69097: [PATCH] Add 'kill-region-or-word' command Date: Tue, 03 Sep 2024 17:27:59 +0300 Message-ID: <86bk147qxc.fsf@gnu.org> 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> <87cyllg57r.fsf@posteo.net> <87zfopbxdk.fsf@zephyr.silentflame.com> <87seuhbx87.fsf@zephyr.silentflame.com> <87zfopep5q.fsf@posteo.net> <86r0a16i71.fsf@gnu.org> <87ttewu9lo.fsf@gmail.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14856"; mail-complaints-to="usenet@ciao.gmane.io" Cc: philipk@posteo.net, rms@gnu.org, 69097@debbugs.gnu.org, juri@linkov.net, stefankangas@gmail.com, acorallo@gnu.org, spwhitton@spwhitton.name To: Robert Pluim Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Sep 03 16:29: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 1slUWv-0003jx-N9 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 03 Sep 2024 16:29:14 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1slUWj-00066h-QA; Tue, 03 Sep 2024 10:29:01 -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 1slUWj-00066X-27 for bug-gnu-emacs@gnu.org; Tue, 03 Sep 2024 10:29: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 1slUWi-000334-Pg for bug-gnu-emacs@gnu.org; Tue, 03 Sep 2024 10:29:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=References:In-Reply-To:From:Date:To:Subject; bh=Ufy4PWL4L6ZfJhGFzbwnDm7IBqH+DUBT85apJ/aidRk=; b=HzM35FhGlispgkkNyqw649GCHzXuSlymDhI1M0y6blXfWS2uHI+JEvryFsxbxJqyW6+kgsnYpqii8RzBPpWXgCgIinvzOA3MvuVWnv4ZFIMsgmXHwyNUrCDI8d+qi62l8dhIYh/noMEsORrYytigRi51IhyUdyu2RFPPbwEn1J9mn+YO0x/WG2ObpKjIUyA1R7oxOtEI+SqZNj8aSkF9iooCg2nlaQssM6GNrtjUNvEY3JOGh7/sRT0c2IKza7NTvEgLykIi0qYx6nJiQYT0BkID8WHuIg00k7EFUJO+C0ZVut3X+0MGhm+DmgM3b/zxAWDSO+G39A296rij7LwzEg==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1slUXi-00061P-PM for bug-gnu-emacs@gnu.org; Tue, 03 Sep 2024 10:30:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 03 Sep 2024 14:30: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.172537376223058 (code B ref 69097); Tue, 03 Sep 2024 14:30:02 +0000 Original-Received: (at 69097) by debbugs.gnu.org; 3 Sep 2024 14:29:22 +0000 Original-Received: from localhost ([127.0.0.1]:60457 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1slUX4-0005zp-Cm for submit@debbugs.gnu.org; Tue, 03 Sep 2024 10:29:22 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:53314) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1slUX1-0005zS-1Q for 69097@debbugs.gnu.org; Tue, 03 Sep 2024 10:29:20 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1slUVu-0002xm-5p; Tue, 03 Sep 2024 10:28:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=Ufy4PWL4L6ZfJhGFzbwnDm7IBqH+DUBT85apJ/aidRk=; b=MEwFrfp8M7kL bEadIx3FD5gWas+iG3DWGJ6oXIhdF9HUqLQFIQroKiT8sd0ISTk5BoYlZfFEobYIW6wFebfSpuMAL Ea5e1YuceY+rGQttkAomxnaB8ozqEfrMxq+tUDHZpC7FbDaXxrQm83SVDaaUTf5qxqY9aTP9lfOkD oQ11iGEvx3jD9ilpnSF7xngtyaqffzoebXtZlgex13gKd9rHe1Jlifccgm8H3J28JcvaxlSG0uRyq 42NJ+fRjui4Zsi4NRjkLqHyjW0KMhSH3yE8xyUrp5MLJyHXaserscI6ggA9D3F1GpVZsFmGrSzxg3 jDqm1MoH+LyPo+KfaCEO7A==; In-Reply-To: <87ttewu9lo.fsf@gmail.com> (message from Robert Pluim on Tue, 03 Sep 2024 15:53:39 +0200) 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:291148 Archived-At: > From: Robert Pluim > Cc: Philip Kaludercic , rms@gnu.org, > 69097@debbugs.gnu.org, juri@linkov.net, stefankangas@gmail.com, > acorallo@gnu.org, spwhitton@spwhitton.name > Date: Tue, 03 Sep 2024 15:53:39 +0200 > > >>>>> On Tue, 03 Sep 2024 15:21:54 +0300, Eli Zaretskii said: > > >> From: Philip Kaludercic > >> Cc: Eli Zaretskii , Stefan Kangas , > >> Andrea Corallo , juri@linkov.net, rms@gnu.org, > >> 69097@debbugs.gnu.org > >> Date: Mon, 02 Sep 2024 21:12:01 +0000 > >> > >> I had misremembered the last state of this patch. It is easier to just > >> have a tristate option. Here is the updated proposal: > > Eli> Thanks. > > >> +(defcustom kill-word-if-no-region nil > > Eli> I would call this 'kill-region-dwim' instead. > > >> + "Behaviour when `kill-region' is invoked without an active region. > >> +If set to nil (default), then an error occurs and nothing is killed. If > >> +set to `emacs-word', then kill a the last word as defined by the current > >> +major mode. If set to `unix-word', then kill the last word in the style > >> +of a shell like Bash, disregarding the major mode." > >> + :type '(choice (const :tag "Kill a word like `backward-kill-word'" emacs-word) > >> + (const :tag "Kill a word like Bash would" unix-word) > >> + (const :tag "Do not kill anything" nil)) > >> + :group 'killing) > > Eli> :version tag is missing. > > Is it worth allowing a user-specified function? I don't understand what you are asking, sorry. Allow a function where and to do what?