From: Eli Zaretskii <eliz@gnu.org>
To: Sean McAfee <eefacm@gmail.com>
Cc: 72862@debbugs.gnu.org
Subject: bug#72862: 29.1; Strange interaction between append-next-kill and kill-whole-line
Date: Tue, 10 Sep 2024 14:54:57 +0300 [thread overview]
Message-ID: <86a5gfvi3y.fsf@gnu.org> (raw)
In-Reply-To: <CANan03YsYez+ghrJzoU+icLBdSH58_VOmsPkyp6-NmDVsw3nkA@mail.gmail.com> (message from Sean McAfee on Mon, 9 Sep 2024 22:13:06 -0500)
> From: Sean McAfee <eefacm@gmail.com>
> Date: Mon, 9 Sep 2024 22:13:06 -0500
> Cc: 72862@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.
prev parent reply other threads:[~2024-09-10 11:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-28 21:12 bug#72862: 29.1; Strange interaction between append-next-kill and kill-whole-line Sean McAfee
2024-08-29 4:53 ` Eli Zaretskii
2024-09-08 6:56 ` Eli Zaretskii
2024-09-10 3:13 ` Sean McAfee
2024-09-10 11:54 ` Eli Zaretskii [this message]
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=86a5gfvi3y.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=72862@debbugs.gnu.org \
--cc=eefacm@gmail.com \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).