GNU bug report logs -
#72862
29.1; Strange interaction between append-next-kill and kill-whole-line
Previous Next
Reported by: Sean McAfee <eefacm <at> gmail.com>
Date: Wed, 28 Aug 2024 21:14:02 UTC
Severity: normal
Found in version 29.1
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> From: Sean McAfee <eefacm <at> gmail.com>
> Date: Mon, 9 Sep 2024 22:13:06 -0500
> Cc: 72862 <at> debbugs.gnu.org
>
> Since kill-whole-line kills both backward and forward from point, it
> seems we should expect that the first part is prepended to previous
> kill, whereas the second part is appended. Which is what the command
> already does.
>
> WDYT?
>
> Since the current behavior is explicitly documented in the code, I suppose that settles it. I really can't imagine a
> good use case for it, though. But then again, until I filed this ticket, I didn't know that append-next-kill could
> sometimes prepend instead of append. It seems a small miracle that I've never stumbled across the
> prepending function by accident.
>
> Perhaps kill-whole-line does technically kill both forwards and backwards, but to me it's always been just a
> welcome shortcut for the classic Emacs idiom C-a C-k C-k. And the name kill-whole-line certainly implies to me
> that the line is killed as a single unit, not killed in two steps in opposite directions. If the current behavior is to
> stay, then I think it could stand to be called out explicitly in the documentation for kill-whole-line.
I think this behavior must stay because in at least one case it's what
users will expect: C-u 5 C-d C-M-w C-S-<Backspace>. If this is invoked in
the middle of a line, it kills 5 characters, then kills the whole of
the remaining line under "append-next-kill".
> Anyway! Although I'd prefer to see what I'd consider to be the more sensible behavior built into Emacs, I can
> achieve it on my own by just rebinding C-S-backspace to a command that moves to the beginning of the line
> before calling kill-whole-line.
OK, thanks. I will wait for a few days to let people comment, before
closing this bug.
This bug report was last modified 247 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.