unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#49194: kill-whole-line 'plus-newline-even-if-none-in-reality
@ 2021-06-23 15:34 積丹尼 Dan Jacobson
  2021-06-24 16:11 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 13+ messages in thread
From: 積丹尼 Dan Jacobson @ 2021-06-23 15:34 UTC (permalink / raw)
  To: 49194

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!





^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2021-06-26 17:12 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-23 15:34 bug#49194: kill-whole-line 'plus-newline-even-if-none-in-reality 積丹尼 Dan Jacobson
2021-06-24 16:11 ` Lars Ingebrigtsen
2021-06-24 17:59   ` 積丹尼 Dan Jacobson
2021-06-24 18:26     ` Lars Ingebrigtsen
2021-06-24 18:42       ` 積丹尼 Dan Jacobson
2021-06-24 18:42       ` Eli Zaretskii
2021-06-24 18:46         ` Lars Ingebrigtsen
2021-06-24 18:51           ` Eli Zaretskii
2021-06-24 20:20             ` 積丹尼 Dan Jacobson
2021-06-25  6:01               ` Eli Zaretskii
2021-06-25 14:02                 ` Lars Ingebrigtsen
2021-06-25 14:03                   ` Eli Zaretskii
2021-06-26 17:12                   ` 積丹尼 Dan Jacobson

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).