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: Thu, 05 Sep 2024 10:02:45 +0000 Message-ID: <87o752ju4a.fsf@posteo.net> References: <871q9g8z8k.fsf@posteo.net> <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> <877cbshf4h.fsf@posteo.net> <87a5gnzf5f.fsf@zephyr.silentflame.com> <87y146jv6z.fsf@posteo.net> <86a5gm4ec7.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21454"; mail-complaints-to="usenet@ciao.gmane.io" Cc: rms@gnu.org, 69097@debbugs.gnu.org, juri@linkov.net, stefankangas@gmail.com, acorallo@gnu.org, spwhitton@spwhitton.name To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Sep 05 12:03:22 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 1sm9Kk-0005Mw-D0 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 05 Sep 2024 12:03:22 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sm9KO-0003KR-Cx; Thu, 05 Sep 2024 06:03:00 -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 1sm9KM-0003K7-Bh for bug-gnu-emacs@gnu.org; Thu, 05 Sep 2024 06:02:58 -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 1sm9KL-0000Nt-Ao for bug-gnu-emacs@gnu.org; Thu, 05 Sep 2024 06:02:57 -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:Date:References:In-Reply-To:From:To:Subject; bh=+o3jEok+5evtWk0NnfJlSBRDCJxNP9nHHUMB/o9F6Jg=; b=KlJgJFkHIp7ocl2YupbIsohJQSuy719h2aFIUxhAfNu77JFAXNx8xYZu26QS7OdsVn2pQZPmd3wr8ILgZdtiQS9qge5xODt5OnOLGkPk+30NJUgacn9EOK+mYjjx4HT+m5k+1gO8Y1f7IcciQijBHFUHqOv6Y+J3vtal+4F0sa505cuJcwraG+8kqfNRxX7a/IvbdTz/+T0MmfgJXUTW375KhAX+GEvvs9Zk0ALGvh1Mdm/ZrWWND/xcIOQWHn4FkAYFpSRgjNgF0sRD0qi7ZePhj4ELObHp4+ya+WZ12BD5Je0VSs+2x3u3wLWrhhi0CAS5IDTl4vu/uSn2Z0SDlg==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sm9LO-0002Ez-36 for bug-gnu-emacs@gnu.org; Thu, 05 Sep 2024 06:04: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: Thu, 05 Sep 2024 10:04: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.17255306418606 (code B ref 69097); Thu, 05 Sep 2024 10:04:02 +0000 Original-Received: (at 69097) by debbugs.gnu.org; 5 Sep 2024 10:04:01 +0000 Original-Received: from localhost ([127.0.0.1]:36228 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sm9LM-0002Ek-IM for submit@debbugs.gnu.org; Thu, 05 Sep 2024 06:04:00 -0400 Original-Received: from mout01.posteo.de ([185.67.36.65]:53879) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sm9LK-0002ED-Re for 69097@debbugs.gnu.org; Thu, 05 Sep 2024 06:03:59 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 50C43240027 for <69097@debbugs.gnu.org>; Thu, 5 Sep 2024 12:02:47 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1725530568; bh=GJ+6gcV4iiQS9587hY45/SPTvYbyFJh/dMIxMdCs4pw=; h=From:To:Cc:Subject:Autocrypt:OpenPGP:Date:Message-ID:MIME-Version: Content-Type:From; b=DII+UpJPe+zJyHImU1VXHbccAjtW94H1tuBmhEbx0qp3CP8y6UwmT7s3m0cHuCbbu Wk7FIS8HAu+/BxuoMj9tA9kpXHLmNON+RLTlsOa+pPjGAdfok9yLTAD+ba93+PPNlI uQ+ygbNfPsN2qor/EoU3jHL6TRgr8XmPEyA56r3l4NnqF3H7ctRrh5u0hH5+HWTLwu VX3EjBJ1sHa5wVzVI/84KlBIOPR+ToLZFvlB/eqS5hCUcErMeWRMhnJZSbuj94Qwdr HaV/FnqbrcTYWSlGqXLeYf6mSItEzEXmDywvfaYOL+2nw/FiSlNpLnsJlGXn0mCiad jE09Q50MRBxUA== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Wzw06507hz9rxL; Thu, 5 Sep 2024 12:02:46 +0200 (CEST) In-Reply-To: <86a5gm4ec7.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 05 Sep 2024 12:52:40 +0300") Autocrypt: addr=philipk@posteo.net; keydata= mDMEZBBQQhYJKwYBBAHaRw8BAQdAHJuofBrfqFh12uQu0Yi7mrl525F28eTmwUDflFNmdui0QlBo aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0 ZW8ubmV0PoiWBBMWCAA+FiEEDg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwMFCQHhM4AFCwkI BwIGFQoJCAsCBBYCAwECHgECF4AACgkQ8xYDWXahwulikAEA77hloUiSrXgFkUVJhlKBpLCHUjA0 mWZ9j9w5d08+jVwBAK6c4iGP7j+/PhbkxaEKa4V3MzIl7zJkcNNjHCXmvFcEuDgEZBBQQhIKKwYB BAGXVQEFAQEHQI5NLiLRjZy3OfSt1dhCmFyn+fN/QKELUYQetiaoe+MMAwEIB4h+BBgWCAAmFiEE Dg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwwFCQHhM4AACgkQ8xYDWXahwukm+wEA8cml4JpK NeAu65rg+auKrPOP6TP/4YWRCTIvuYDm0joBALw98AMz7/qMHvSCeU/hw9PL6u6R2EScxtpKnWof z4oM OpenPGP: id=philipk@posteo.net; url="https://keys.openpgp.org/vks/v1/by-email/philipk@posteo.net"; preference=signencrypt 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:291246 Archived-At: Eli Zaretskii writes: >> From: Philip Kaludercic >> Cc: Eli Zaretskii , stefankangas@gmail.com, >> acorallo@gnu.org, juri@linkov.net, rms@gnu.org, 69097@debbugs.gnu.org >> Date: Thu, 05 Sep 2024 09:39:32 +0000 >> >> >> I think I'm missing something here. When it's nil and there is no >> >> *active* region, but there is a region, it should kill that, surely? >> >> With or without TMM. >> > >> > Yes, you are right. It sounds like we made wrong assumptions about >> > what happens in that case, and should rethink this. >> > >> > C-w signals an error only if there's no mark in the buffer. >> > >> > So I guess we need a new command after all. >> >> Not necessarily (unless I am mistaken above), but I am not opposed to it either. > > If we don't introduce a new command, then what will be the modified > behavior of kill-region? Specifically, when will it delete the last > word? If the new user option is non-nil /and/ there is no region. If `kill-region-dwim' is nil (default), then nothing should change. > > In Emacs buffers, it is very rare not to have the mark, so it > sounds like the Bash-like behavior will very rarely if ever available, > no? It will kick-in whenever `use-region-p' returns a non-nil value. I recognise that this isn't useful for people who don't rely on transient mark mode, but in that case we'll need to commands anyway, as I don't want to use the behaviour that Sean describes. -- Philip Kaludercic on siskin