Subject: bug#49194: kill-whole-line 'plus-newline-even-if-none-in-reality

From: Eli Zaretskii <[email-masked]>
Date: Thu, 24 Jun 2021 21:51:42 +0300

> From: Lars Ingebrigtsen <[email-masked]>
> Cc: [email-masked],  [email-masked]
> Date: Thu, 24 Jun 2021 20:46:37 +0200
> 
> Eli Zaretskii <[email-masked]> writes:
> 
> > AFAIU, what the OP wants already happens: the newline is saved in
> > kill-ring together with the line, and is yanked back with C-y.  So I
> > don't think I understand the request.
> 
> He wants to kill the final line in a buffer (that might not have a
> newline character at the end), but end up with a string in the kill ring
> that does have a newline at the end.

That makes no sense to me: the command kills a line of buffer text, it
doesn't (and shouldn't) invent characters out of thin air.  When there
_is_ a newline at EOL, setting kill-whole-line will cause C-k to kill
that newline as well; but if there's no newline there, why should this
particular command with that option invent such a newline and save it
in kill-ring?