Subject: bug#65734: [BUG] kill-whole-line on folded subtrees [9.6.8 (release_9.6.8-3-g21171d @ /home/w/usr/emacs/0/29/0/lisp/org/)]

From: Eli Zaretskii <[email-masked]>
Date: Sat, 06 Jan 2024 10:58:36 +0200

> From: Sebastian Miele <[email-masked]>
> Cc: [email-masked], [email-masked]
> Date: Mon, 25 Dec 2023 19:53:36 +0100
> 
> Attached are two patches.  The first patch introduces the tests,
> including two tests that are expected to be failing for the current
> `kill-whole-line'.
> 
> The test `kill-whole-line-read-only' does not fail because of the bug
> reported in this bug report, but because of another bug that I stumbled
> upon while investigating and testing: `kill-whole-line' always kills by
> two calls to `kill-region'.  When the buffer is readonly, the first of
> the two calls to `kill-region' errors out / exits non-locally.  That
> causes `kill-region' to omit to put the remaining stuff (from the second
> `kill-region') into the kill ring.
> 
> The second patch fixes both bugs, and removes the corresponding
> `:expected-result :failed' from the tests.

Thanks.

The patches lack suitable ChangeLog-style commit log messages (see
CONTRIBUTE for details and you can use "git log" to show examples of
how we do this).

I'd also ask Stefan Monnier and Stefan Kangas to review the patch,
since this is an important command and I would like to avoid breaking
it.