Subject: bug#69097: [PATCH] Add 'kill-region-or-word' command

From: Philip Kaludercic <[email-masked]>
Date: Sat, 07 Sep 2024 10:10:29 +0000

Eli Zaretskii <[email-masked]> writes:

>> From: Sean Whitton <[email-masked]>
>> Cc: [email-masked],  [email-masked],  [email-masked],
>>   [email-masked],  [email-masked],  [email-masked]
>> Date: Fri, 06 Sep 2024 14:54:58 +0100
>> 
>> +(defun forward-unix-word (arg &optional delim)
>> +  "Move forward ARG unix-words.
>> +A unix-word is whitespace-delimited.
>> +Interactively, ARG is the numeric prefix argument, defaulting to 1.
>> +A negative ARG means go backwards to the beginning of unix-words.
>
> I again ask whether we need this command.  It is okay to have a
> function (perhaps even an internal one) to move by Unix-words, but
> what are the use cases for such a command?

I think it is conceivable that some users might prefer to have
deterministic word movement that doesn't change depending on the major
mode.  But as mention earlier, this is functionality that might be worth
relegating into a subword-mode-like mode, instead of defining new
commands.

>> +(defun unix-filename-rubout (arg)
>> +  "Kill ARG unix-words backwards, also treating `/' as whitespace.
>> +A unix-word is whitespace-delimited.
>> +Interactively, ARG is the numeric prefix argument, defaulting to 1.
>> +A negative ARG means to kill forwards.
>> +
>> +This is like `unix-word-rubout' (which see), but `/' is also considered
>> +whitespace.
>
> I'd say '/' is treated as word delimiter.  "Considered whitespace"
> sounds strange to me.
>
> Should we also treat a backslash as delimiter, for MS-Windows?

-- 
	Philip Kaludercic on siskin