[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#69097: [PATCH] Add 'kill-region-or-word' command
From: |
Juri Linkov |
Subject: |
bug#69097: [PATCH] Add 'kill-region-or-word' command |
Date: |
Sun, 05 May 2024 19:59:46 +0300 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/30.0.50 (x86_64-pc-linux-gnu) |
>>>> > +(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-<backspace>, M-DEL).
>> already does this just fine.
>
> Right, the initial command just merges `backward-kill-word' and
> `kill-region' into one.
There are two ways to merge:
1. `backward-kill-word' into `kill-region'
2. `kill-region' into `backward-kill-word'
I don't know why prefer one over another.
- bug#69097: [PATCH] Add 'kill-region-or-word' command, (continued)
- bug#69097: [PATCH] Add 'kill-region-or-word' command, Eli Zaretskii, 2024/05/03
- bug#69097: [PATCH] Add 'kill-region-or-word' command, Eli Zaretskii, 2024/05/03
- bug#69097: [PATCH] Add 'kill-region-or-word' command, Philip Kaludercic, 2024/05/03
- bug#69097: [PATCH] Add 'kill-region-or-word' command, Eli Zaretskii, 2024/05/03
- bug#69097: [PATCH] Add 'kill-region-or-word' command, Philip Kaludercic, 2024/05/03
- bug#69097: [PATCH] Add 'kill-region-or-word' command, Eli Zaretskii, 2024/05/04
- bug#69097: [PATCH] Add 'kill-region-or-word' command, Juri Linkov, 2024/05/05
- bug#69097: [PATCH] Add 'kill-region-or-word' command, Eli Zaretskii, 2024/05/05
- bug#69097: [PATCH] Add 'kill-region-or-word' command, Juri Linkov, 2024/05/05
- bug#69097: [PATCH] Add 'kill-region-or-word' command, Philip Kaludercic, 2024/05/05
- bug#69097: [PATCH] Add 'kill-region-or-word' command,
Juri Linkov <=
- bug#69097: [PATCH] Add 'kill-region-or-word' command, Drew Adams, 2024/05/05
- bug#69097: [PATCH] Add 'kill-region-or-word' command, Philip Kaludercic, 2024/05/05
- bug#69097: [PATCH] Add 'kill-region-or-word' command, Drew Adams, 2024/05/05
- bug#69097: [PATCH] Add 'kill-region-or-word' command, Eli Zaretskii, 2024/05/05
- bug#69097: [PATCH] Add 'kill-region-or-word' command, Drew Adams, 2024/05/05
- bug#69097: [PATCH] Add 'kill-region-or-word' command, Sean Whitton, 2024/05/05
- bug#69097: [PATCH] Add 'kill-region-or-word' command, Sean Whitton, 2024/05/06
- bug#69097: [PATCH] Add 'kill-region-or-word' command, Sean Whitton, 2024/05/06
- bug#69097: [PATCH] Add 'kill-region-or-word' command, Eli Zaretskii, 2024/05/06
- bug#69097: [PATCH] Add 'kill-region-or-word' command, Sean Whitton, 2024/05/07