bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Eli Zaretskii
Subject: bug#49194: kill-whole-line 'plus-newline-even-if-none-in-reality
Date: Fri, 25 Jun 2021 09:01:53 +0300

> From: 積丹尼 Dan Jacobson <jidanni@jidanni.org>
> Cc: Lars Ingebrigtsen <larsi@gnus.org>,  49194@debbugs.gnu.org
> Date: Fri, 25 Jun 2021 04:20:50 +0800
> 
> >>>>> "EZ" == Eli Zaretskii <eliz@gnu.org> writes:
> 
> EZ> That makes no sense to me: the command kills a line of buffer text, it
> EZ> doesn't (and shouldn't) invent characters out of thin air.  When there
> EZ> _is_ a newline at EOL, setting kill-whole-line will cause C-k to kill
> EZ> that newline as well; but if there's no newline there, why should this
> EZ> particular command with that option invent such a newline and save it
> EZ> in kill-ring?
> 
> 1. There may not be a newline yet, but there will be upon sending the
> message, or saving the file, depending on other settings.
> 
> 2. That allows consistent yanking later. C-k ... C-y now will always
> have a newline. Else even though C-k appears to behave the same at the
> end of file, C-y depends different later.
> 
> Anyway, just try making a bunch of lines like this:
>                                    ^^^^^^^^^^^^^^^
>                                    ^^^^^^^^^^^^^^^
>                                    ^^^^^^^^^^^^^^^
> at the end of your reply, without extra fuss when copying the first!

If this is about your personal needs, why not make a keyboard macro to
achieve what you want, and use it thereafter?  IMO, we shouldn't add
to Emacs stuff that is needed by a single user (or a small number of
users) because of their peculiar workflows, and which makes little
sense with other workflows.  Inventing characters at kill time sounds
very strange an unintuitive behavior, so adding it to Emacs, even as
an option, would be a mistake, IMO.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]