all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Philip Kaludercic <philipk@posteo.net>
To: Juri Linkov <juri@linkov.net>
Cc: Eli Zaretskii <eliz@gnu.org>, rms@gnu.org, 69097@debbugs.gnu.org
Subject: bug#69097: [PATCH] Add 'kill-region-or-word' command
Date: Sun, 05 May 2024 18:27:07 +0000	[thread overview]
Message-ID: <87le4o2jyc.fsf@posteo.net> (raw)
In-Reply-To: <86jzk8i48t.fsf@mail.linkov.net> (Juri Linkov's message of "Sun,  05 May 2024 19:59:46 +0300")

Juri Linkov <juri@linkov.net> 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-<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'

And

3. a separate command, like `kill-region-or-word'

> I don't know why prefer one over another.

-- 
	Philip Kaludercic on peregrine





  parent reply	other threads:[~2024-05-05 18:27 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-13  9:55 bug#69097: [PATCH] Add 'kill-region-or-word' command Philip Kaludercic
2024-02-17  3:53 ` Richard Stallman
     [not found]   ` <87ttm7gi9i.fsf@posteo.net>
2024-02-19  3:44     ` Richard Stallman
     [not found]       ` <87sf1obkw9.fsf@posteo.net>
2024-02-23  3:04         ` Richard Stallman
     [not found]           ` <871q93rzv8.fsf@posteo.net>
2024-02-25  3:16             ` Richard Stallman
     [not found]               ` <87frxgn73g.fsf@posteo.net>
2024-02-27  3:12                 ` Richard Stallman
2024-05-03  7:37 ` Philip Kaludercic
2024-05-03 10:40   ` Eli Zaretskii
2024-05-03 10:48     ` Philip Kaludercic
2024-05-03 10:59       ` Eli Zaretskii
2024-05-03 11:04         ` Eli Zaretskii
2024-05-03 17:32           ` Philip Kaludercic
2024-05-03 18:01             ` Eli Zaretskii
2024-05-03 19:41               ` Philip Kaludercic
2024-05-04  6:20                 ` Eli Zaretskii
2024-05-05  6:53                 ` Juri Linkov
2024-05-05  9:04                   ` Eli Zaretskii
2024-05-05 16:29                     ` Juri Linkov
2024-05-05 16:54                       ` Philip Kaludercic
2024-05-05 16:59                         ` Juri Linkov
2024-05-05 17:08                           ` Drew Adams via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-05 18:27                           ` Philip Kaludercic [this message]
2024-05-05 17:05                         ` Drew Adams via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-05 17:13                           ` Eli Zaretskii
2024-05-05 17:53                             ` Drew Adams via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-06  0:21                       ` Sean Whitton via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-06 16:46                     ` Sean Whitton via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-06 16:51                       ` Sean Whitton via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-06 17:55                         ` Eli Zaretskii
2024-05-07  8:47                           ` Sean Whitton via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-07  8:47                             ` Sean Whitton via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-05 16:47                   ` Drew Adams via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-03 16:20         ` Philip Kaludercic

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87le4o2jyc.fsf@posteo.net \
    --to=philipk@posteo.net \
    --cc=69097@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=juri@linkov.net \
    --cc=rms@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.