GNU bug report logs - #49194
kill-whole-line 'plus-newline-even-if-none-in-reality

Previous Next

Package: emacs;

Reported by: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>

Date: Wed, 23 Jun 2021 17:49:02 UTC

Severity: wishlist

Tags: moreinfo, wontfix

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
To: 49194 <at> debbugs.gnu.org
Subject: bug#49194: kill-whole-line 'plus-newline-even-if-none-in-reality
Date: Wed, 23 Jun 2021 23:34:29 +0800
The kill-whole-line variable is great, but not great enough.

(info "(emacs) Killing by Lines") says:
     If the variable ‘kill-whole-line’ is non-‘nil’, ‘C-k’ at the very
  beginning of a line kills the entire line including the following
  newline.  This variable is normally ‘nil’.

So setting it to non-nil allows us to get newlines, 99% of the time.

I hereby propose an additional value, call it one of:

   'always
   'no-matter-what
   'plus-newline-even-at-eof
   'plus-newline-even-if-none-in-reality

> See (info "(emacs) Customize Save") for require-final-newline. Bye.

Wait! Who says I even want the file to end in a newline? I just want
kill-whole-line to have a setting to consistently get a newline at the
end, and not 99% of the time.

> Then add a newline there yourself and remove it when you are finished. Bye.

Wait! The file might even be a readonly file owned by someone else. I
can't just "add one there myself."

> Well then copy the file first. Bye.

Seems like overkill, just to kill (copy) one line.

Anyway 'plus-newline-even-if-none-in-reality etc., being non-nil, would
also be 99% backwards compatible too!




This bug report was last modified 3 years and 332 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.