Subject: Re: bug#72862: 29.1; Strange interaction between append-next-kill and kill-whole-line
From: Eli Zaretskii <[email-masked]>
To: [email-masked]
Cc: [email-masked]
Date: Sat, 21 Sep 2024 12:16:23 +0300
List-Id: <debbugs-submit.debbugs.gnu.org>

> Cc: [email-masked]
> Date: Tue, 10 Sep 2024 14:54:57 +0300
> From: Eli Zaretskii <[email-masked]>
> 
> > From: Sean McAfee <[email-masked]>
> > Date: Mon, 9 Sep 2024 22:13:06 -0500
> > Cc: [email-masked]
> > 
> >  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.

No further comments within 11 days, so I'm now closing this bug.